diff --git a/AndroidStudioExample/app/packageMe.ps1 b/AndroidStudioExample/app/packageMe.ps1 index 77524e28..96452c07 100644 --- a/AndroidStudioExample/app/packageMe.ps1 +++ b/AndroidStudioExample/app/packageMe.ps1 @@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds popd cd target -Copy-Item client-sdk-0.221.240802.jar -Destination ../../builds/client-sdk-0.221.240802.jar \ No newline at end of file +Copy-Item client-sdk-0.223.240816.jar -Destination ../../builds/client-sdk-0.223.240816.jar \ No newline at end of file diff --git a/AndroidStudioExample/app/packageMe.sh b/AndroidStudioExample/app/packageMe.sh index f0b036dc..4b3a90ec 100644 --- a/AndroidStudioExample/app/packageMe.sh +++ b/AndroidStudioExample/app/packageMe.sh @@ -7,4 +7,4 @@ mkdir -p ./builds popd cd target -cp client-sdk-0.221.240802.jar ../../builds/client-sdk-0.221.240802.jar +cp client-sdk-0.223.240816.jar ../../builds/client-sdk-0.223.240816.jar diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabAddonAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabAddonAPI.java new file mode 100644 index 00000000..61256eb8 --- /dev/null +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabAddonAPI.java @@ -0,0 +1,1690 @@ +package com.playfab; + +import com.playfab.internal.*; +import com.playfab.PlayFabAddonModels.*; +import com.playfab.PlayFabErrors.*; +import com.playfab.PlayFabSettings; +import java.util.concurrent.*; +import java.util.*; +import com.google.gson.*; +import com.google.gson.reflect.*; + + /** APIs for managing addons. */ +public class PlayFabAddonAPI { + private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return Async Task will return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + } + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateApple(final CreateOrUpdateAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Apple addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest 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("/Addon/CreateOrUpdateApple"), 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()); + CreateOrUpdateAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return Async Task will return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebook(final CreateOrUpdateFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest 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("/Addon/CreateOrUpdateFacebook"), 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()); + CreateOrUpdateFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return Async Task will return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebookInstantGames(final CreateOrUpdateFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook Instant Games addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest 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("/Addon/CreateOrUpdateFacebookInstantGames"), 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()); + CreateOrUpdateFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return Async Task will return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateGoogle(final CreateOrUpdateGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Google addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest 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("/Addon/CreateOrUpdateGoogle"), 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()); + CreateOrUpdateGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return Async Task will return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateKongregate(final CreateOrUpdateKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Kongregate addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest 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("/Addon/CreateOrUpdateKongregate"), 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()); + CreateOrUpdateKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return Async Task will return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateNintendo(final CreateOrUpdateNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Nintendo addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest 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("/Addon/CreateOrUpdateNintendo"), 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()); + CreateOrUpdateNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return Async Task will return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdatePSN(final CreateOrUpdatePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the PSN addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest 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("/Addon/CreateOrUpdatePSN"), 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()); + CreateOrUpdatePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return Async Task will return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateSteam(final CreateOrUpdateSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Steam addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest 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("/Addon/CreateOrUpdateSteam"), 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()); + CreateOrUpdateSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return Async Task will return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateTwitch(final CreateOrUpdateTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Twitch addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest 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("/Addon/CreateOrUpdateTwitch"), 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()); + CreateOrUpdateTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return Async Task will return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteAppleAsync(final DeleteAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteApple(final DeleteAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Apple addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteAppleAsync(final DeleteAppleRequest 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("/Addon/DeleteApple"), 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()); + DeleteAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return Async Task will return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookAsync(final DeleteFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebook(final DeleteFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookAsync(final DeleteFacebookRequest 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("/Addon/DeleteFacebook"), 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()); + DeleteFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return Async Task will return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebookInstantGames(final DeleteFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest 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("/Addon/DeleteFacebookInstantGames"), 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()); + DeleteFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return Async Task will return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteGoogleAsync(final DeleteGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteGoogle(final DeleteGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Google addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteGoogleAsync(final DeleteGoogleRequest 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("/Addon/DeleteGoogle"), 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()); + DeleteGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return Async Task will return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteKongregateAsync(final DeleteKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteKongregate(final DeleteKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Kongregate addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteKongregateAsync(final DeleteKongregateRequest 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("/Addon/DeleteKongregate"), 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()); + DeleteKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return Async Task will return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteNintendoAsync(final DeleteNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteNintendo(final DeleteNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Nintendo addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteNintendoAsync(final DeleteNintendoRequest 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("/Addon/DeleteNintendo"), 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()); + DeleteNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return Async Task will return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeletePSNAsync(final DeletePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeletePSN(final DeletePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the PSN addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeletePSNAsync(final DeletePSNRequest 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("/Addon/DeletePSN"), 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()); + DeletePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return Async Task will return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteSteamAsync(final DeleteSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteSteam(final DeleteSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Steam addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteSteamAsync(final DeleteSteamRequest 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("/Addon/DeleteSteam"), 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()); + DeleteSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return Async Task will return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteTwitchAsync(final DeleteTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteTwitch(final DeleteTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Twitch addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteTwitchAsync(final DeleteTwitchRequest 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("/Addon/DeleteTwitch"), 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()); + DeleteTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return Async Task will return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetAppleAsync(final GetAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetApple(final GetAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Apple addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetAppleAsync(final GetAppleRequest 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("/Addon/GetApple"), 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()); + GetAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return Async Task will return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookAsync(final GetFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebook(final GetFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookAsync(final GetFacebookRequest 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("/Addon/GetFacebook"), 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()); + GetFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return Async Task will return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebookInstantGames(final GetFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook Instant Games addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest 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("/Addon/GetFacebookInstantGames"), 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()); + GetFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return Async Task will return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetGoogleAsync(final GetGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetGoogle(final GetGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Google addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetGoogleAsync(final GetGoogleRequest 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("/Addon/GetGoogle"), 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()); + GetGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return Async Task will return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetKongregateAsync(final GetKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetKongregate(final GetKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Kongregate addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetKongregateAsync(final GetKongregateRequest 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("/Addon/GetKongregate"), 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()); + GetKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return Async Task will return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetNintendoAsync(final GetNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetNintendo(final GetNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Nintendo addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetNintendoAsync(final GetNintendoRequest 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("/Addon/GetNintendo"), 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()); + GetNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return Async Task will return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPSNAsync(final GetPSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPSN(final GetPSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the PSN addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPSNAsync(final GetPSNRequest 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("/Addon/GetPSN"), 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()); + GetPSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return Async Task will return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetSteamAsync(final GetSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetSteam(final GetSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Steam addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetSteamAsync(final GetSteamRequest 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("/Addon/GetSteam"), 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()); + GetSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return Async Task will return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTwitchAsync(final GetTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTwitch(final GetTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Twitch addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTwitchAsync(final GetTwitchRequest 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("/Addon/GetTwitch"), 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()); + GetTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + +} diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabAddonModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabAddonModels.java new file mode 100644 index 00000000..8c01a4cc --- /dev/null +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabAddonModels.java @@ -0,0 +1,503 @@ +package com.playfab; + +import java.util.*; +import com.playfab.PlayFabUtil.*; + +public class PlayFabAddonModels { + + public static class CreateOrUpdateAppleRequest { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** iOS App Shared Secret obtained after setting up your app in the App Store. */ + public String AppSharedSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Ignore expiration date for identity tokens. Be aware that when set to true this can invalidate expired tokens in the + * case where Apple rotates their signing keys. + */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class CreateOrUpdateAppleResponse { + + } + + public static class CreateOrUpdateFacebookInstantGamesRequest { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook Instant Games. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateFacebookInstantGamesResponse { + + } + + public static class CreateOrUpdateFacebookRequest { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class CreateOrUpdateFacebookResponse { + + } + + public static class CreateOrUpdateGoogleRequest { + /** + * Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppLicenseKey; + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + /** + * Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientSecret; + /** Needed to enable pending purchase handling and subscription processing. */ + public String ServiceAccountKey; + + } + + public static class CreateOrUpdateGoogleResponse { + + } + + public static class CreateOrUpdateKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Kongregate Secret API Key obtained after setting up your game in your Kongregate developer account. */ + public String SecretAPIKey; + + } + + public static class CreateOrUpdateKongregateResponse { + + } + + public static class CreateOrUpdateNintendoRequest { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** List of Nintendo Environments, currently supporting up to 4. Needs Catalog enabled. */ + public ArrayList Environments; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateNintendoResponse { + + } + + public static class CreateOrUpdatePSNRequest { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Client secret obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + /** + * Client secret obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientSecret; + + } + + public static class CreateOrUpdatePSNResponse { + + } + + public static class CreateOrUpdateSteamRequest { + /** Application ID obtained after setting up your app in Valve's developer portal. */ + public String ApplicationId; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Sercet Key obtained after setting up your app in Valve's developer portal. */ + public String SecretKey; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class CreateOrUpdateSteamResponse { + + } + + public static class CreateOrUpdateTwitchRequest { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Client Secret obtained after creating your Twitch developer account. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateTwitchResponse { + + } + + public static class DeleteAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteAppleResponse { + + } + + public static class DeleteFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookInstantGamesResponse { + + } + + public static class DeleteFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookResponse { + + } + + public static class DeleteGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteGoogleResponse { + + } + + public static class DeleteKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteKongregateResponse { + + } + + public static class DeleteNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteNintendoResponse { + + } + + public static class DeletePSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeletePSNResponse { + + } + + public static class DeleteSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteSteamResponse { + + } + + public static class DeleteTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteTwitchResponse { + + } + + /** Combined entity type and ID structure which uniquely identifies a single entity. */ + public static class EntityKey { + /** Unique ID of the entity. */ + public String Id; + /** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */ + public String Type; + + } + + public static class GetAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetAppleResponse { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** Addon status. */ + public Boolean Created; + /** Ignore expiration date for identity tokens. */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class GetFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookInstantGamesResponse { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + + } + + public static class GetFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookResponse { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class GetGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetGoogleResponse { + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** Addon status. */ + public Boolean Created; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + + } + + public static class GetKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetKongregateResponse { + /** Addon status. */ + public Boolean Created; + + } + + public static class GetNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetNintendoResponse { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** Addon status. */ + public Boolean Created; + /** List of Nintendo Environments, currently supporting up to 4. */ + public ArrayList Environments; + + } + + public static class GetPSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetPSNResponse { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + + } + + public static class GetSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetSteamResponse { + /** Application ID obtained after setting up your game in Valve's developer portal. */ + public String ApplicationId; + /** Addon status. */ + public Boolean Created; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class GetTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetTwitchResponse { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + + } + + public static class NintendoEnvironment { + /** Client ID for the Nintendo Environment. */ + public String ClientID; + /** Client Secret for the Nintendo Environment. */ + public String ClientSecret; + /** ID for the Nintendo Environment. */ + public String ID; + + } + +} diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java index f397810d..05e0b425 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java @@ -1427,8 +1427,9 @@ public static class GetFriendsListRequest { /** * If any additional services are queried for the user's friends, those friends who also have a PlayFab account registered * for the title will be returned in the results. For Facebook, user has to have logged into the title's Facebook app - * recently, and only friends who also plays this game will be included. For Xbox Live, user has to have logged into the - * Xbox Live recently, and only friends who also play this game will be included. + * recently, and only friends who also plays this game will be included. Note: If the user authenticated with + * AuthenticationToken when calling LoginWithFacebook, instead of AcessToken, an empty list will be returned. For Xbox + * Live, user has to have logged into the Xbox Live recently, and only friends who also play this game will be included. */ public static class GetFriendsListResult { /** Array of friends found. */ @@ -2907,11 +2908,14 @@ public static class LoginWithFacebookInstantGamesIdRequest { * same Facebook applications between PlayFab Title IDs, as Facebook provides unique user IDs per application and doing so * can result in issues with the Facebook ID for the user in their PlayFab account information. If you must re-use an * application in a new PlayFab Title ID, please be sure to first unlink all accounts from Facebook, or delete all users in - * the first Title ID. + * the first Title ID. Note: If the user is authenticated with AuthenticationToken, instead of AccessToken, the + * GetFriendsList API will return an empty list. */ public static class LoginWithFacebookRequest { /** Unique identifier from Facebook for the user. */ public String AccessToken; + /** Token used for limited login authentication. */ + public String AuthenticationToken; /** Automatically create a PlayFab account if one is not currently linked to this ID. */ public Boolean CreateAccount; /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java index 705a9fc0..71cca2a3 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java @@ -861,6 +861,12 @@ public static enum PlayFabErrorCode { GameSaveManifestNotFound(20300), GameSaveManifestVersionAlreadyExists(20301), GameSaveConflictUpdatingManifest(20302), + GameSaveManifestUpdatesNotAllowed(20303), + GameSaveFileAlreadyExists(20304), + GameSaveManifestVersionNotFinalized(20305), + GameSaveUnknownFileInManifest(20306), + GameSaveFileExceededReportedSize(20307), + GameSaveFileNotUploaded(20308), StateShareForbidden(21000), StateShareTitleNotInFlight(21001), StateShareStateNotFound(21002), diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMatchmakerAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMatchmakerAPI.java new file mode 100644 index 00000000..a12172be --- /dev/null +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMatchmakerAPI.java @@ -0,0 +1,16 @@ +package com.playfab; + +import com.playfab.internal.*; +import com.playfab.PlayFabMatchmakerModels.*; +import com.playfab.PlayFabErrors.*; +import com.playfab.PlayFabSettings; +import java.util.concurrent.*; +import java.util.*; +import com.google.gson.*; +import com.google.gson.reflect.*; + + /** Enables the use of an external match-making service in conjunction with PlayFab hosted Game Server instances */ +public class PlayFabMatchmakerAPI { + private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); + +} diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMatchmakerModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMatchmakerModels.java new file mode 100644 index 00000000..45431fc1 --- /dev/null +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMatchmakerModels.java @@ -0,0 +1,8 @@ +package com.playfab; + +import java.util.*; +import com.playfab.PlayFabUtil.*; + +public class PlayFabMatchmakerModels { + +} diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProgressionAPI.java similarity index 99% rename from AndroidStudioExample/app/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java rename to AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProgressionAPI.java index af2b0f87..12f748ad 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProgressionAPI.java @@ -1,7 +1,7 @@ package com.playfab; import com.playfab.internal.*; -import com.playfab.PlayFabLeaderboardsModels.*; +import com.playfab.PlayFabProgressionModels.*; import com.playfab.PlayFabErrors.*; import com.playfab.PlayFabSettings; import java.util.concurrent.*; @@ -9,8 +9,8 @@ import com.google.gson.*; import com.google.gson.reflect.*; - /** Manage entity statistics Manage entity statistics */ -public class PlayFabLeaderboardsAPI { + /** Manage entity statistics Manage entity leaderboards */ +public class PlayFabProgressionAPI { private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); /** diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProgressionModels.java similarity index 99% rename from PlayFabSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java rename to AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProgressionModels.java index 9224031a..e617a9d1 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProgressionModels.java @@ -3,7 +3,7 @@ import java.util.*; import com.playfab.PlayFabUtil.*; -public class PlayFabLeaderboardsModels { +public class PlayFabProgressionModels { public static class CreateLeaderboardDefinitionRequest { /** Leaderboard columns describing the sort directions, cannot be changed after creation. */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabSettings.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabSettings.java index 266f5f33..30b17d3c 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabSettings.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabSettings.java @@ -9,9 +9,9 @@ import com.playfab.PlayFabErrors.ErrorCallback; public class PlayFabSettings { - public static String SdkVersion = "0.221.240802"; - public static String BuildIdentifier = "adobuild_javasdk_118"; - public static String SdkVersionString = "JavaSDK-0.221.240802"; + public static String SdkVersion = "0.223.240816"; + public static String BuildIdentifier = "adobuild_javasdk_116"; + public static String SdkVersionString = "JavaSDK-0.223.240816"; public static Map RequestGetParams; static { diff --git a/PlayFabClientSDK/packageMe.ps1 b/PlayFabClientSDK/packageMe.ps1 index 77524e28..96452c07 100644 --- a/PlayFabClientSDK/packageMe.ps1 +++ b/PlayFabClientSDK/packageMe.ps1 @@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds popd cd target -Copy-Item client-sdk-0.221.240802.jar -Destination ../../builds/client-sdk-0.221.240802.jar \ No newline at end of file +Copy-Item client-sdk-0.223.240816.jar -Destination ../../builds/client-sdk-0.223.240816.jar \ No newline at end of file diff --git a/PlayFabClientSDK/packageMe.sh b/PlayFabClientSDK/packageMe.sh index f0b036dc..4b3a90ec 100644 --- a/PlayFabClientSDK/packageMe.sh +++ b/PlayFabClientSDK/packageMe.sh @@ -7,4 +7,4 @@ mkdir -p ./builds popd cd target -cp client-sdk-0.221.240802.jar ../../builds/client-sdk-0.221.240802.jar +cp client-sdk-0.223.240816.jar ../../builds/client-sdk-0.223.240816.jar diff --git a/PlayFabClientSDK/pom.xml b/PlayFabClientSDK/pom.xml index 00963b26..90f138dd 100644 --- a/PlayFabClientSDK/pom.xml +++ b/PlayFabClientSDK/pom.xml @@ -14,7 +14,7 @@ com.playfab client-sdk - 0.221.240802 + 0.223.240816 PlayFab Client API 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. https://docs.microsoft.com/gaming/playfab/ diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabAddonAPI.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabAddonAPI.java new file mode 100644 index 00000000..61256eb8 --- /dev/null +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabAddonAPI.java @@ -0,0 +1,1690 @@ +package com.playfab; + +import com.playfab.internal.*; +import com.playfab.PlayFabAddonModels.*; +import com.playfab.PlayFabErrors.*; +import com.playfab.PlayFabSettings; +import java.util.concurrent.*; +import java.util.*; +import com.google.gson.*; +import com.google.gson.reflect.*; + + /** APIs for managing addons. */ +public class PlayFabAddonAPI { + private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return Async Task will return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + } + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateApple(final CreateOrUpdateAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Apple addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest 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("/Addon/CreateOrUpdateApple"), 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()); + CreateOrUpdateAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return Async Task will return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebook(final CreateOrUpdateFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest 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("/Addon/CreateOrUpdateFacebook"), 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()); + CreateOrUpdateFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return Async Task will return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebookInstantGames(final CreateOrUpdateFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook Instant Games addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest 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("/Addon/CreateOrUpdateFacebookInstantGames"), 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()); + CreateOrUpdateFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return Async Task will return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateGoogle(final CreateOrUpdateGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Google addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest 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("/Addon/CreateOrUpdateGoogle"), 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()); + CreateOrUpdateGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return Async Task will return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateKongregate(final CreateOrUpdateKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Kongregate addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest 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("/Addon/CreateOrUpdateKongregate"), 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()); + CreateOrUpdateKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return Async Task will return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateNintendo(final CreateOrUpdateNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Nintendo addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest 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("/Addon/CreateOrUpdateNintendo"), 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()); + CreateOrUpdateNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return Async Task will return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdatePSN(final CreateOrUpdatePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the PSN addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest 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("/Addon/CreateOrUpdatePSN"), 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()); + CreateOrUpdatePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return Async Task will return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateSteam(final CreateOrUpdateSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Steam addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest 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("/Addon/CreateOrUpdateSteam"), 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()); + CreateOrUpdateSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return Async Task will return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateTwitch(final CreateOrUpdateTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Twitch addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest 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("/Addon/CreateOrUpdateTwitch"), 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()); + CreateOrUpdateTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return Async Task will return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteAppleAsync(final DeleteAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteApple(final DeleteAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Apple addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteAppleAsync(final DeleteAppleRequest 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("/Addon/DeleteApple"), 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()); + DeleteAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return Async Task will return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookAsync(final DeleteFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebook(final DeleteFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookAsync(final DeleteFacebookRequest 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("/Addon/DeleteFacebook"), 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()); + DeleteFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return Async Task will return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebookInstantGames(final DeleteFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest 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("/Addon/DeleteFacebookInstantGames"), 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()); + DeleteFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return Async Task will return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteGoogleAsync(final DeleteGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteGoogle(final DeleteGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Google addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteGoogleAsync(final DeleteGoogleRequest 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("/Addon/DeleteGoogle"), 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()); + DeleteGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return Async Task will return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteKongregateAsync(final DeleteKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteKongregate(final DeleteKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Kongregate addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteKongregateAsync(final DeleteKongregateRequest 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("/Addon/DeleteKongregate"), 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()); + DeleteKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return Async Task will return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteNintendoAsync(final DeleteNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteNintendo(final DeleteNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Nintendo addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteNintendoAsync(final DeleteNintendoRequest 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("/Addon/DeleteNintendo"), 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()); + DeleteNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return Async Task will return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeletePSNAsync(final DeletePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeletePSN(final DeletePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the PSN addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeletePSNAsync(final DeletePSNRequest 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("/Addon/DeletePSN"), 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()); + DeletePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return Async Task will return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteSteamAsync(final DeleteSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteSteam(final DeleteSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Steam addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteSteamAsync(final DeleteSteamRequest 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("/Addon/DeleteSteam"), 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()); + DeleteSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return Async Task will return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteTwitchAsync(final DeleteTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteTwitch(final DeleteTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Twitch addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteTwitchAsync(final DeleteTwitchRequest 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("/Addon/DeleteTwitch"), 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()); + DeleteTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return Async Task will return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetAppleAsync(final GetAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetApple(final GetAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Apple addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetAppleAsync(final GetAppleRequest 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("/Addon/GetApple"), 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()); + GetAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return Async Task will return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookAsync(final GetFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebook(final GetFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookAsync(final GetFacebookRequest 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("/Addon/GetFacebook"), 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()); + GetFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return Async Task will return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebookInstantGames(final GetFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook Instant Games addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest 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("/Addon/GetFacebookInstantGames"), 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()); + GetFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return Async Task will return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetGoogleAsync(final GetGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetGoogle(final GetGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Google addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetGoogleAsync(final GetGoogleRequest 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("/Addon/GetGoogle"), 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()); + GetGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return Async Task will return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetKongregateAsync(final GetKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetKongregate(final GetKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Kongregate addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetKongregateAsync(final GetKongregateRequest 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("/Addon/GetKongregate"), 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()); + GetKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return Async Task will return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetNintendoAsync(final GetNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetNintendo(final GetNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Nintendo addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetNintendoAsync(final GetNintendoRequest 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("/Addon/GetNintendo"), 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()); + GetNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return Async Task will return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPSNAsync(final GetPSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPSN(final GetPSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the PSN addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPSNAsync(final GetPSNRequest 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("/Addon/GetPSN"), 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()); + GetPSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return Async Task will return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetSteamAsync(final GetSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetSteam(final GetSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Steam addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetSteamAsync(final GetSteamRequest 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("/Addon/GetSteam"), 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()); + GetSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return Async Task will return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTwitchAsync(final GetTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTwitch(final GetTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Twitch addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTwitchAsync(final GetTwitchRequest 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("/Addon/GetTwitch"), 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()); + GetTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + +} diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabAddonModels.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabAddonModels.java new file mode 100644 index 00000000..8c01a4cc --- /dev/null +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabAddonModels.java @@ -0,0 +1,503 @@ +package com.playfab; + +import java.util.*; +import com.playfab.PlayFabUtil.*; + +public class PlayFabAddonModels { + + public static class CreateOrUpdateAppleRequest { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** iOS App Shared Secret obtained after setting up your app in the App Store. */ + public String AppSharedSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Ignore expiration date for identity tokens. Be aware that when set to true this can invalidate expired tokens in the + * case where Apple rotates their signing keys. + */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class CreateOrUpdateAppleResponse { + + } + + public static class CreateOrUpdateFacebookInstantGamesRequest { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook Instant Games. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateFacebookInstantGamesResponse { + + } + + public static class CreateOrUpdateFacebookRequest { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class CreateOrUpdateFacebookResponse { + + } + + public static class CreateOrUpdateGoogleRequest { + /** + * Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppLicenseKey; + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + /** + * Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientSecret; + /** Needed to enable pending purchase handling and subscription processing. */ + public String ServiceAccountKey; + + } + + public static class CreateOrUpdateGoogleResponse { + + } + + public static class CreateOrUpdateKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Kongregate Secret API Key obtained after setting up your game in your Kongregate developer account. */ + public String SecretAPIKey; + + } + + public static class CreateOrUpdateKongregateResponse { + + } + + public static class CreateOrUpdateNintendoRequest { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** List of Nintendo Environments, currently supporting up to 4. Needs Catalog enabled. */ + public ArrayList Environments; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateNintendoResponse { + + } + + public static class CreateOrUpdatePSNRequest { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Client secret obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + /** + * Client secret obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientSecret; + + } + + public static class CreateOrUpdatePSNResponse { + + } + + public static class CreateOrUpdateSteamRequest { + /** Application ID obtained after setting up your app in Valve's developer portal. */ + public String ApplicationId; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Sercet Key obtained after setting up your app in Valve's developer portal. */ + public String SecretKey; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class CreateOrUpdateSteamResponse { + + } + + public static class CreateOrUpdateTwitchRequest { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Client Secret obtained after creating your Twitch developer account. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateTwitchResponse { + + } + + public static class DeleteAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteAppleResponse { + + } + + public static class DeleteFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookInstantGamesResponse { + + } + + public static class DeleteFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookResponse { + + } + + public static class DeleteGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteGoogleResponse { + + } + + public static class DeleteKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteKongregateResponse { + + } + + public static class DeleteNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteNintendoResponse { + + } + + public static class DeletePSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeletePSNResponse { + + } + + public static class DeleteSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteSteamResponse { + + } + + public static class DeleteTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteTwitchResponse { + + } + + /** Combined entity type and ID structure which uniquely identifies a single entity. */ + public static class EntityKey { + /** Unique ID of the entity. */ + public String Id; + /** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */ + public String Type; + + } + + public static class GetAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetAppleResponse { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** Addon status. */ + public Boolean Created; + /** Ignore expiration date for identity tokens. */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class GetFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookInstantGamesResponse { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + + } + + public static class GetFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookResponse { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class GetGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetGoogleResponse { + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** Addon status. */ + public Boolean Created; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + + } + + public static class GetKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetKongregateResponse { + /** Addon status. */ + public Boolean Created; + + } + + public static class GetNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetNintendoResponse { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** Addon status. */ + public Boolean Created; + /** List of Nintendo Environments, currently supporting up to 4. */ + public ArrayList Environments; + + } + + public static class GetPSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetPSNResponse { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + + } + + public static class GetSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetSteamResponse { + /** Application ID obtained after setting up your game in Valve's developer portal. */ + public String ApplicationId; + /** Addon status. */ + public Boolean Created; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class GetTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetTwitchResponse { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + + } + + public static class NintendoEnvironment { + /** Client ID for the Nintendo Environment. */ + public String ClientID; + /** Client Secret for the Nintendo Environment. */ + public String ClientSecret; + /** ID for the Nintendo Environment. */ + public String ID; + + } + +} diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabClientModels.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabClientModels.java index f397810d..05e0b425 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabClientModels.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabClientModels.java @@ -1427,8 +1427,9 @@ public static class GetFriendsListRequest { /** * If any additional services are queried for the user's friends, those friends who also have a PlayFab account registered * for the title will be returned in the results. For Facebook, user has to have logged into the title's Facebook app - * recently, and only friends who also plays this game will be included. For Xbox Live, user has to have logged into the - * Xbox Live recently, and only friends who also play this game will be included. + * recently, and only friends who also plays this game will be included. Note: If the user authenticated with + * AuthenticationToken when calling LoginWithFacebook, instead of AcessToken, an empty list will be returned. For Xbox + * Live, user has to have logged into the Xbox Live recently, and only friends who also play this game will be included. */ public static class GetFriendsListResult { /** Array of friends found. */ @@ -2907,11 +2908,14 @@ public static class LoginWithFacebookInstantGamesIdRequest { * same Facebook applications between PlayFab Title IDs, as Facebook provides unique user IDs per application and doing so * can result in issues with the Facebook ID for the user in their PlayFab account information. If you must re-use an * application in a new PlayFab Title ID, please be sure to first unlink all accounts from Facebook, or delete all users in - * the first Title ID. + * the first Title ID. Note: If the user is authenticated with AuthenticationToken, instead of AccessToken, the + * GetFriendsList API will return an empty list. */ public static class LoginWithFacebookRequest { /** Unique identifier from Facebook for the user. */ public String AccessToken; + /** Token used for limited login authentication. */ + public String AuthenticationToken; /** Automatically create a PlayFab account if one is not currently linked to this ID. */ public Boolean CreateAccount; /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java index 705a9fc0..71cca2a3 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java @@ -861,6 +861,12 @@ public static enum PlayFabErrorCode { GameSaveManifestNotFound(20300), GameSaveManifestVersionAlreadyExists(20301), GameSaveConflictUpdatingManifest(20302), + GameSaveManifestUpdatesNotAllowed(20303), + GameSaveFileAlreadyExists(20304), + GameSaveManifestVersionNotFinalized(20305), + GameSaveUnknownFileInManifest(20306), + GameSaveFileExceededReportedSize(20307), + GameSaveFileNotUploaded(20308), StateShareForbidden(21000), StateShareTitleNotInFlight(21001), StateShareStateNotFound(21002), diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMatchmakerAPI.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMatchmakerAPI.java new file mode 100644 index 00000000..a12172be --- /dev/null +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMatchmakerAPI.java @@ -0,0 +1,16 @@ +package com.playfab; + +import com.playfab.internal.*; +import com.playfab.PlayFabMatchmakerModels.*; +import com.playfab.PlayFabErrors.*; +import com.playfab.PlayFabSettings; +import java.util.concurrent.*; +import java.util.*; +import com.google.gson.*; +import com.google.gson.reflect.*; + + /** Enables the use of an external match-making service in conjunction with PlayFab hosted Game Server instances */ +public class PlayFabMatchmakerAPI { + private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); + +} diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMatchmakerModels.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMatchmakerModels.java new file mode 100644 index 00000000..45431fc1 --- /dev/null +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMatchmakerModels.java @@ -0,0 +1,8 @@ +package com.playfab; + +import java.util.*; +import com.playfab.PlayFabUtil.*; + +public class PlayFabMatchmakerModels { + +} diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java similarity index 99% rename from PlayFabSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java rename to PlayFabClientSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java index af2b0f87..12f748ad 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java @@ -1,7 +1,7 @@ package com.playfab; import com.playfab.internal.*; -import com.playfab.PlayFabLeaderboardsModels.*; +import com.playfab.PlayFabProgressionModels.*; import com.playfab.PlayFabErrors.*; import com.playfab.PlayFabSettings; import java.util.concurrent.*; @@ -9,8 +9,8 @@ import com.google.gson.*; import com.google.gson.reflect.*; - /** Manage entity statistics Manage entity statistics */ -public class PlayFabLeaderboardsAPI { + /** Manage entity statistics Manage entity leaderboards */ +public class PlayFabProgressionAPI { private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); /** diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabLeaderboardsModels.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProgressionModels.java similarity index 99% rename from AndroidStudioExample/app/src/main/java/com/playfab/PlayFabLeaderboardsModels.java rename to PlayFabClientSDK/src/main/java/com/playfab/PlayFabProgressionModels.java index 9224031a..e617a9d1 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabLeaderboardsModels.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProgressionModels.java @@ -3,7 +3,7 @@ import java.util.*; import com.playfab.PlayFabUtil.*; -public class PlayFabLeaderboardsModels { +public class PlayFabProgressionModels { public static class CreateLeaderboardDefinitionRequest { /** Leaderboard columns describing the sort directions, cannot be changed after creation. */ diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabSettings.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabSettings.java index a157ae5e..aa50667e 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabSettings.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabSettings.java @@ -8,9 +8,9 @@ import com.playfab.PlayFabErrors.ErrorCallback; public class PlayFabSettings { - public static String SdkVersion = "0.221.240802"; - public static String BuildIdentifier = "adobuild_javasdk_118"; - public static String SdkVersionString = "JavaSDK-0.221.240802"; + public static String SdkVersion = "0.223.240816"; + public static String BuildIdentifier = "adobuild_javasdk_116"; + public static String SdkVersionString = "JavaSDK-0.223.240816"; public static Map RequestGetParams; static { diff --git a/PlayFabSDK/packageMe.ps1 b/PlayFabSDK/packageMe.ps1 index c095f493..98169b16 100644 --- a/PlayFabSDK/packageMe.ps1 +++ b/PlayFabSDK/packageMe.ps1 @@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds popd cd target -Copy-Item combo-sdk-0.221.240802.jar -Destination ../../builds/combo-sdk-0.221.240802.jar \ No newline at end of file +Copy-Item combo-sdk-0.223.240816.jar -Destination ../../builds/combo-sdk-0.223.240816.jar \ No newline at end of file diff --git a/PlayFabSDK/packageMe.sh b/PlayFabSDK/packageMe.sh index 56a6b84e..a518ae89 100644 --- a/PlayFabSDK/packageMe.sh +++ b/PlayFabSDK/packageMe.sh @@ -7,4 +7,4 @@ mkdir -p ./builds popd cd target -cp combo-sdk-0.221.240802.jar ../../builds/combo-sdk-0.221.240802.jar +cp combo-sdk-0.223.240816.jar ../../builds/combo-sdk-0.223.240816.jar diff --git a/PlayFabSDK/pom.xml b/PlayFabSDK/pom.xml index 10dbe586..325c16c2 100644 --- a/PlayFabSDK/pom.xml +++ b/PlayFabSDK/pom.xml @@ -14,7 +14,7 @@ com.playfab combo-sdk - 0.221.240802 + 0.223.240816 PlayFab Combo API 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. https://docs.microsoft.com/gaming/playfab/ diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabAddonAPI.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabAddonAPI.java new file mode 100644 index 00000000..61256eb8 --- /dev/null +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabAddonAPI.java @@ -0,0 +1,1690 @@ +package com.playfab; + +import com.playfab.internal.*; +import com.playfab.PlayFabAddonModels.*; +import com.playfab.PlayFabErrors.*; +import com.playfab.PlayFabSettings; +import java.util.concurrent.*; +import java.util.*; +import com.google.gson.*; +import com.google.gson.reflect.*; + + /** APIs for managing addons. */ +public class PlayFabAddonAPI { + private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return Async Task will return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + } + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateApple(final CreateOrUpdateAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Apple addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest 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("/Addon/CreateOrUpdateApple"), 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()); + CreateOrUpdateAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return Async Task will return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebook(final CreateOrUpdateFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest 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("/Addon/CreateOrUpdateFacebook"), 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()); + CreateOrUpdateFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return Async Task will return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebookInstantGames(final CreateOrUpdateFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook Instant Games addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest 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("/Addon/CreateOrUpdateFacebookInstantGames"), 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()); + CreateOrUpdateFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return Async Task will return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateGoogle(final CreateOrUpdateGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Google addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest 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("/Addon/CreateOrUpdateGoogle"), 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()); + CreateOrUpdateGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return Async Task will return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateKongregate(final CreateOrUpdateKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Kongregate addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest 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("/Addon/CreateOrUpdateKongregate"), 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()); + CreateOrUpdateKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return Async Task will return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateNintendo(final CreateOrUpdateNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Nintendo addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest 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("/Addon/CreateOrUpdateNintendo"), 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()); + CreateOrUpdateNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return Async Task will return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdatePSN(final CreateOrUpdatePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the PSN addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest 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("/Addon/CreateOrUpdatePSN"), 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()); + CreateOrUpdatePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return Async Task will return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateSteam(final CreateOrUpdateSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Steam addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest 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("/Addon/CreateOrUpdateSteam"), 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()); + CreateOrUpdateSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return Async Task will return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateTwitch(final CreateOrUpdateTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Twitch addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest 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("/Addon/CreateOrUpdateTwitch"), 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()); + CreateOrUpdateTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return Async Task will return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteAppleAsync(final DeleteAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteApple(final DeleteAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Apple addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteAppleAsync(final DeleteAppleRequest 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("/Addon/DeleteApple"), 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()); + DeleteAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return Async Task will return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookAsync(final DeleteFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebook(final DeleteFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookAsync(final DeleteFacebookRequest 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("/Addon/DeleteFacebook"), 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()); + DeleteFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return Async Task will return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebookInstantGames(final DeleteFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest 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("/Addon/DeleteFacebookInstantGames"), 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()); + DeleteFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return Async Task will return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteGoogleAsync(final DeleteGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteGoogle(final DeleteGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Google addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteGoogleAsync(final DeleteGoogleRequest 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("/Addon/DeleteGoogle"), 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()); + DeleteGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return Async Task will return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteKongregateAsync(final DeleteKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteKongregate(final DeleteKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Kongregate addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteKongregateAsync(final DeleteKongregateRequest 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("/Addon/DeleteKongregate"), 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()); + DeleteKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return Async Task will return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteNintendoAsync(final DeleteNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteNintendo(final DeleteNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Nintendo addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteNintendoAsync(final DeleteNintendoRequest 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("/Addon/DeleteNintendo"), 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()); + DeleteNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return Async Task will return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeletePSNAsync(final DeletePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeletePSN(final DeletePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the PSN addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeletePSNAsync(final DeletePSNRequest 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("/Addon/DeletePSN"), 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()); + DeletePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return Async Task will return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteSteamAsync(final DeleteSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteSteam(final DeleteSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Steam addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteSteamAsync(final DeleteSteamRequest 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("/Addon/DeleteSteam"), 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()); + DeleteSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return Async Task will return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteTwitchAsync(final DeleteTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteTwitch(final DeleteTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Twitch addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteTwitchAsync(final DeleteTwitchRequest 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("/Addon/DeleteTwitch"), 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()); + DeleteTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return Async Task will return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetAppleAsync(final GetAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetApple(final GetAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Apple addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetAppleAsync(final GetAppleRequest 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("/Addon/GetApple"), 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()); + GetAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return Async Task will return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookAsync(final GetFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebook(final GetFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookAsync(final GetFacebookRequest 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("/Addon/GetFacebook"), 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()); + GetFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return Async Task will return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebookInstantGames(final GetFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook Instant Games addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest 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("/Addon/GetFacebookInstantGames"), 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()); + GetFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return Async Task will return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetGoogleAsync(final GetGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetGoogle(final GetGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Google addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetGoogleAsync(final GetGoogleRequest 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("/Addon/GetGoogle"), 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()); + GetGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return Async Task will return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetKongregateAsync(final GetKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetKongregate(final GetKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Kongregate addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetKongregateAsync(final GetKongregateRequest 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("/Addon/GetKongregate"), 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()); + GetKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return Async Task will return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetNintendoAsync(final GetNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetNintendo(final GetNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Nintendo addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetNintendoAsync(final GetNintendoRequest 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("/Addon/GetNintendo"), 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()); + GetNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return Async Task will return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPSNAsync(final GetPSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPSN(final GetPSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the PSN addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPSNAsync(final GetPSNRequest 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("/Addon/GetPSN"), 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()); + GetPSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return Async Task will return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetSteamAsync(final GetSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetSteam(final GetSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Steam addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetSteamAsync(final GetSteamRequest 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("/Addon/GetSteam"), 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()); + GetSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return Async Task will return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTwitchAsync(final GetTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTwitch(final GetTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Twitch addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTwitchAsync(final GetTwitchRequest 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("/Addon/GetTwitch"), 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()); + GetTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + +} diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabAddonModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabAddonModels.java new file mode 100644 index 00000000..8c01a4cc --- /dev/null +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabAddonModels.java @@ -0,0 +1,503 @@ +package com.playfab; + +import java.util.*; +import com.playfab.PlayFabUtil.*; + +public class PlayFabAddonModels { + + public static class CreateOrUpdateAppleRequest { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** iOS App Shared Secret obtained after setting up your app in the App Store. */ + public String AppSharedSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Ignore expiration date for identity tokens. Be aware that when set to true this can invalidate expired tokens in the + * case where Apple rotates their signing keys. + */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class CreateOrUpdateAppleResponse { + + } + + public static class CreateOrUpdateFacebookInstantGamesRequest { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook Instant Games. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateFacebookInstantGamesResponse { + + } + + public static class CreateOrUpdateFacebookRequest { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class CreateOrUpdateFacebookResponse { + + } + + public static class CreateOrUpdateGoogleRequest { + /** + * Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppLicenseKey; + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + /** + * Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientSecret; + /** Needed to enable pending purchase handling and subscription processing. */ + public String ServiceAccountKey; + + } + + public static class CreateOrUpdateGoogleResponse { + + } + + public static class CreateOrUpdateKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Kongregate Secret API Key obtained after setting up your game in your Kongregate developer account. */ + public String SecretAPIKey; + + } + + public static class CreateOrUpdateKongregateResponse { + + } + + public static class CreateOrUpdateNintendoRequest { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** List of Nintendo Environments, currently supporting up to 4. Needs Catalog enabled. */ + public ArrayList Environments; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateNintendoResponse { + + } + + public static class CreateOrUpdatePSNRequest { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Client secret obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + /** + * Client secret obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientSecret; + + } + + public static class CreateOrUpdatePSNResponse { + + } + + public static class CreateOrUpdateSteamRequest { + /** Application ID obtained after setting up your app in Valve's developer portal. */ + public String ApplicationId; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Sercet Key obtained after setting up your app in Valve's developer portal. */ + public String SecretKey; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class CreateOrUpdateSteamResponse { + + } + + public static class CreateOrUpdateTwitchRequest { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Client Secret obtained after creating your Twitch developer account. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateTwitchResponse { + + } + + public static class DeleteAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteAppleResponse { + + } + + public static class DeleteFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookInstantGamesResponse { + + } + + public static class DeleteFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookResponse { + + } + + public static class DeleteGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteGoogleResponse { + + } + + public static class DeleteKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteKongregateResponse { + + } + + public static class DeleteNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteNintendoResponse { + + } + + public static class DeletePSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeletePSNResponse { + + } + + public static class DeleteSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteSteamResponse { + + } + + public static class DeleteTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteTwitchResponse { + + } + + /** Combined entity type and ID structure which uniquely identifies a single entity. */ + public static class EntityKey { + /** Unique ID of the entity. */ + public String Id; + /** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */ + public String Type; + + } + + public static class GetAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetAppleResponse { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** Addon status. */ + public Boolean Created; + /** Ignore expiration date for identity tokens. */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class GetFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookInstantGamesResponse { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + + } + + public static class GetFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookResponse { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class GetGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetGoogleResponse { + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** Addon status. */ + public Boolean Created; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + + } + + public static class GetKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetKongregateResponse { + /** Addon status. */ + public Boolean Created; + + } + + public static class GetNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetNintendoResponse { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** Addon status. */ + public Boolean Created; + /** List of Nintendo Environments, currently supporting up to 4. */ + public ArrayList Environments; + + } + + public static class GetPSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetPSNResponse { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + + } + + public static class GetSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetSteamResponse { + /** Application ID obtained after setting up your game in Valve's developer portal. */ + public String ApplicationId; + /** Addon status. */ + public Boolean Created; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class GetTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetTwitchResponse { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + + } + + public static class NintendoEnvironment { + /** Client ID for the Nintendo Environment. */ + public String ClientID; + /** Client Secret for the Nintendo Environment. */ + public String ClientSecret; + /** ID for the Nintendo Environment. */ + public String ID; + + } + +} diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java index 8c2332fe..b44782da 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java @@ -2354,6 +2354,12 @@ public static enum GenericErrorCodes { GameSaveManifestNotFound, GameSaveManifestVersionAlreadyExists, GameSaveConflictUpdatingManifest, + GameSaveManifestUpdatesNotAllowed, + GameSaveFileAlreadyExists, + GameSaveManifestVersionNotFinalized, + GameSaveUnknownFileInManifest, + GameSaveFileExceededReportedSize, + GameSaveFileNotUploaded, StateShareForbidden, StateShareTitleNotInFlight, StateShareStateNotFound, diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabClientModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabClientModels.java index f397810d..05e0b425 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabClientModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabClientModels.java @@ -1427,8 +1427,9 @@ public static class GetFriendsListRequest { /** * If any additional services are queried for the user's friends, those friends who also have a PlayFab account registered * for the title will be returned in the results. For Facebook, user has to have logged into the title's Facebook app - * recently, and only friends who also plays this game will be included. For Xbox Live, user has to have logged into the - * Xbox Live recently, and only friends who also play this game will be included. + * recently, and only friends who also plays this game will be included. Note: If the user authenticated with + * AuthenticationToken when calling LoginWithFacebook, instead of AcessToken, an empty list will be returned. For Xbox + * Live, user has to have logged into the Xbox Live recently, and only friends who also play this game will be included. */ public static class GetFriendsListResult { /** Array of friends found. */ @@ -2907,11 +2908,14 @@ public static class LoginWithFacebookInstantGamesIdRequest { * same Facebook applications between PlayFab Title IDs, as Facebook provides unique user IDs per application and doing so * can result in issues with the Facebook ID for the user in their PlayFab account information. If you must re-use an * application in a new PlayFab Title ID, please be sure to first unlink all accounts from Facebook, or delete all users in - * the first Title ID. + * the first Title ID. Note: If the user is authenticated with AuthenticationToken, instead of AccessToken, the + * GetFriendsList API will return an empty list. */ public static class LoginWithFacebookRequest { /** Unique identifier from Facebook for the user. */ public String AccessToken; + /** Token used for limited login authentication. */ + public String AuthenticationToken; /** Automatically create a PlayFab account if one is not currently linked to this ID. */ public Boolean CreateAccount; /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java index 705a9fc0..71cca2a3 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java @@ -861,6 +861,12 @@ public static enum PlayFabErrorCode { GameSaveManifestNotFound(20300), GameSaveManifestVersionAlreadyExists(20301), GameSaveConflictUpdatingManifest(20302), + GameSaveManifestUpdatesNotAllowed(20303), + GameSaveFileAlreadyExists(20304), + GameSaveManifestVersionNotFinalized(20305), + GameSaveUnknownFileInManifest(20306), + GameSaveFileExceededReportedSize(20307), + GameSaveFileNotUploaded(20308), StateShareForbidden(21000), StateShareTitleNotInFlight(21001), StateShareStateNotFound(21002), diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java similarity index 99% rename from PlayFabClientSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java rename to PlayFabSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java index af2b0f87..12f748ad 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java @@ -1,7 +1,7 @@ package com.playfab; import com.playfab.internal.*; -import com.playfab.PlayFabLeaderboardsModels.*; +import com.playfab.PlayFabProgressionModels.*; import com.playfab.PlayFabErrors.*; import com.playfab.PlayFabSettings; import java.util.concurrent.*; @@ -9,8 +9,8 @@ import com.google.gson.*; import com.google.gson.reflect.*; - /** Manage entity statistics Manage entity statistics */ -public class PlayFabLeaderboardsAPI { + /** Manage entity statistics Manage entity leaderboards */ +public class PlayFabProgressionAPI { private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); /** diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabProgressionModels.java similarity index 99% rename from PlayFabServerSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java rename to PlayFabSDK/src/main/java/com/playfab/PlayFabProgressionModels.java index 9224031a..e617a9d1 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabProgressionModels.java @@ -3,7 +3,7 @@ import java.util.*; import com.playfab.PlayFabUtil.*; -public class PlayFabLeaderboardsModels { +public class PlayFabProgressionModels { public static class CreateLeaderboardDefinitionRequest { /** Leaderboard columns describing the sort directions, cannot be changed after creation. */ diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java index b4d5daa3..cc888bfc 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java @@ -1959,6 +1959,12 @@ public static enum GenericErrorCodes { GameSaveManifestNotFound, GameSaveManifestVersionAlreadyExists, GameSaveConflictUpdatingManifest, + GameSaveManifestUpdatesNotAllowed, + GameSaveFileAlreadyExists, + GameSaveManifestVersionNotFinalized, + GameSaveUnknownFileInManifest, + GameSaveFileExceededReportedSize, + GameSaveFileNotUploaded, StateShareForbidden, StateShareTitleNotInFlight, StateShareStateNotFound, diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabSettings.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabSettings.java index a157ae5e..aa50667e 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabSettings.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabSettings.java @@ -8,9 +8,9 @@ import com.playfab.PlayFabErrors.ErrorCallback; public class PlayFabSettings { - public static String SdkVersion = "0.221.240802"; - public static String BuildIdentifier = "adobuild_javasdk_118"; - public static String SdkVersionString = "JavaSDK-0.221.240802"; + public static String SdkVersion = "0.223.240816"; + public static String BuildIdentifier = "adobuild_javasdk_116"; + public static String SdkVersionString = "JavaSDK-0.223.240816"; public static Map RequestGetParams; static { diff --git a/PlayFabServerSDK/packageMe.ps1 b/PlayFabServerSDK/packageMe.ps1 index d5faa133..83a97219 100644 --- a/PlayFabServerSDK/packageMe.ps1 +++ b/PlayFabServerSDK/packageMe.ps1 @@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds popd cd target -Copy-Item server-sdk-0.221.240802.jar -Destination ../../builds/server-sdk-0.221.240802.jar \ No newline at end of file +Copy-Item server-sdk-0.223.240816.jar -Destination ../../builds/server-sdk-0.223.240816.jar \ No newline at end of file diff --git a/PlayFabServerSDK/packageMe.sh b/PlayFabServerSDK/packageMe.sh index e63db020..a457b26c 100644 --- a/PlayFabServerSDK/packageMe.sh +++ b/PlayFabServerSDK/packageMe.sh @@ -7,4 +7,4 @@ mkdir -p ./builds popd cd target -cp server-sdk-0.221.240802.jar ../../builds/server-sdk-0.221.240802.jar +cp server-sdk-0.223.240816.jar ../../builds/server-sdk-0.223.240816.jar diff --git a/PlayFabServerSDK/pom.xml b/PlayFabServerSDK/pom.xml index 510597c7..3777158d 100644 --- a/PlayFabServerSDK/pom.xml +++ b/PlayFabServerSDK/pom.xml @@ -14,7 +14,7 @@ com.playfab server-sdk - 0.221.240802 + 0.223.240816 PlayFab Server API 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. https://docs.microsoft.com/gaming/playfab/ diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAddonAPI.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAddonAPI.java new file mode 100644 index 00000000..61256eb8 --- /dev/null +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAddonAPI.java @@ -0,0 +1,1690 @@ +package com.playfab; + +import com.playfab.internal.*; +import com.playfab.PlayFabAddonModels.*; +import com.playfab.PlayFabErrors.*; +import com.playfab.PlayFabSettings; +import java.util.concurrent.*; +import java.util.*; +import com.google.gson.*; +import com.google.gson.reflect.*; + + /** APIs for managing addons. */ +public class PlayFabAddonAPI { + private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return Async Task will return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + } + + /** + * Creates the Apple addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateAppleRequest + * @return CreateOrUpdateAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateApple(final CreateOrUpdateAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Apple addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateAppleAsync(final CreateOrUpdateAppleRequest 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("/Addon/CreateOrUpdateApple"), 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()); + CreateOrUpdateAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return Async Task will return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + } + + /** + * Creates the Facebook addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookRequest + * @return CreateOrUpdateFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebook(final CreateOrUpdateFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookAsync(final CreateOrUpdateFacebookRequest 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("/Addon/CreateOrUpdateFacebook"), 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()); + CreateOrUpdateFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return Async Task will return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateFacebookInstantGamesRequest + * @return CreateOrUpdateFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateFacebookInstantGames(final CreateOrUpdateFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Facebook Instant Games addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateFacebookInstantGamesAsync(final CreateOrUpdateFacebookInstantGamesRequest 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("/Addon/CreateOrUpdateFacebookInstantGames"), 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()); + CreateOrUpdateFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return Async Task will return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + } + + /** + * Creates the Google addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateGoogleRequest + * @return CreateOrUpdateGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateGoogle(final CreateOrUpdateGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Google addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateGoogleAsync(final CreateOrUpdateGoogleRequest 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("/Addon/CreateOrUpdateGoogle"), 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()); + CreateOrUpdateGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return Async Task will return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + } + + /** + * Creates the Kongregate addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateKongregateRequest + * @return CreateOrUpdateKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateKongregate(final CreateOrUpdateKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Kongregate addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateKongregateAsync(final CreateOrUpdateKongregateRequest 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("/Addon/CreateOrUpdateKongregate"), 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()); + CreateOrUpdateKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return Async Task will return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + } + + /** + * Creates the Nintendo addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateNintendoRequest + * @return CreateOrUpdateNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateNintendo(final CreateOrUpdateNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Nintendo addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateNintendoAsync(final CreateOrUpdateNintendoRequest 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("/Addon/CreateOrUpdateNintendo"), 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()); + CreateOrUpdateNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return Async Task will return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + } + + /** + * Creates the PSN addon on a title, or updates it if it already exists. + * @param request CreateOrUpdatePSNRequest + * @return CreateOrUpdatePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdatePSN(final CreateOrUpdatePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdatePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the PSN addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdatePSNAsync(final CreateOrUpdatePSNRequest 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("/Addon/CreateOrUpdatePSN"), 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()); + CreateOrUpdatePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return Async Task will return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + } + + /** + * Creates the Steam addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateSteamRequest + * @return CreateOrUpdateSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateSteam(final CreateOrUpdateSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Steam addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateSteamAsync(final CreateOrUpdateSteamRequest 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("/Addon/CreateOrUpdateSteam"), 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()); + CreateOrUpdateSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return Async Task will return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> CreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + } + + /** + * Creates the Twitch addon on a title, or updates it if it already exists. + * @param request CreateOrUpdateTwitchRequest + * @return CreateOrUpdateTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult CreateOrUpdateTwitch(final CreateOrUpdateTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateCreateOrUpdateTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Creates the Twitch addon on a title, or updates it if it already exists. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateCreateOrUpdateTwitchAsync(final CreateOrUpdateTwitchRequest 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("/Addon/CreateOrUpdateTwitch"), 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()); + CreateOrUpdateTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return Async Task will return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteAppleAsync(final DeleteAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + } + + /** + * Deletes the Apple addon on a title. + * @param request DeleteAppleRequest + * @return DeleteAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteApple(final DeleteAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Apple addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteAppleAsync(final DeleteAppleRequest 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("/Addon/DeleteApple"), 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()); + DeleteAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return Async Task will return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookAsync(final DeleteFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookRequest + * @return DeleteFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebook(final DeleteFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookAsync(final DeleteFacebookRequest 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("/Addon/DeleteFacebook"), 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()); + DeleteFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return Async Task will return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Deletes the Facebook addon on a title. + * @param request DeleteFacebookInstantGamesRequest + * @return DeleteFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteFacebookInstantGames(final DeleteFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Facebook addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteFacebookInstantGamesAsync(final DeleteFacebookInstantGamesRequest 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("/Addon/DeleteFacebookInstantGames"), 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()); + DeleteFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return Async Task will return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteGoogleAsync(final DeleteGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + } + + /** + * Deletes the Google addon on a title. + * @param request DeleteGoogleRequest + * @return DeleteGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteGoogle(final DeleteGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Google addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteGoogleAsync(final DeleteGoogleRequest 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("/Addon/DeleteGoogle"), 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()); + DeleteGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return Async Task will return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteKongregateAsync(final DeleteKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + } + + /** + * Deletes the Kongregate addon on a title. + * @param request DeleteKongregateRequest + * @return DeleteKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteKongregate(final DeleteKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Kongregate addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteKongregateAsync(final DeleteKongregateRequest 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("/Addon/DeleteKongregate"), 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()); + DeleteKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return Async Task will return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteNintendoAsync(final DeleteNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + } + + /** + * Deletes the Nintendo addon on a title. + * @param request DeleteNintendoRequest + * @return DeleteNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteNintendo(final DeleteNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Nintendo addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteNintendoAsync(final DeleteNintendoRequest 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("/Addon/DeleteNintendo"), 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()); + DeleteNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return Async Task will return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeletePSNAsync(final DeletePSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + } + + /** + * Deletes the PSN addon on a title. + * @param request DeletePSNRequest + * @return DeletePSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeletePSN(final DeletePSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeletePSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the PSN addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeletePSNAsync(final DeletePSNRequest 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("/Addon/DeletePSN"), 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()); + DeletePSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return Async Task will return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteSteamAsync(final DeleteSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + } + + /** + * Deletes the Steam addon on a title. + * @param request DeleteSteamRequest + * @return DeleteSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteSteam(final DeleteSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Steam addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteSteamAsync(final DeleteSteamRequest 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("/Addon/DeleteSteam"), 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()); + DeleteSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return Async Task will return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> DeleteTwitchAsync(final DeleteTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + } + + /** + * Deletes the Twitch addon on a title. + * @param request DeleteTwitchRequest + * @return DeleteTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult DeleteTwitch(final DeleteTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateDeleteTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Deletes the Twitch addon on a title. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateDeleteTwitchAsync(final DeleteTwitchRequest 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("/Addon/DeleteTwitch"), 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()); + DeleteTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return Async Task will return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetAppleAsync(final GetAppleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + } + + /** + * Gets information of the Apple addon on a title, omits secrets. + * @param request GetAppleRequest + * @return GetAppleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetApple(final GetAppleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetAppleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Apple addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetAppleAsync(final GetAppleRequest 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("/Addon/GetApple"), 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()); + GetAppleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return Async Task will return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookAsync(final GetFacebookRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + } + + /** + * Gets information of the Facebook addon on a title, omits secrets. + * @param request GetFacebookRequest + * @return GetFacebookResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebook(final GetFacebookRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookAsync(final GetFacebookRequest 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("/Addon/GetFacebook"), 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()); + GetFacebookResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return Async Task will return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + } + + /** + * Gets information of the Facebook Instant Games addon on a title, omits secrets. + * @param request GetFacebookInstantGamesRequest + * @return GetFacebookInstantGamesResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetFacebookInstantGames(final GetFacebookInstantGamesRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetFacebookInstantGamesAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Facebook Instant Games addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetFacebookInstantGamesAsync(final GetFacebookInstantGamesRequest 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("/Addon/GetFacebookInstantGames"), 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()); + GetFacebookInstantGamesResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return Async Task will return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetGoogleAsync(final GetGoogleRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + } + + /** + * Gets information of the Google addon on a title, omits secrets. + * @param request GetGoogleRequest + * @return GetGoogleResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetGoogle(final GetGoogleRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetGoogleAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Google addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetGoogleAsync(final GetGoogleRequest 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("/Addon/GetGoogle"), 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()); + GetGoogleResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return Async Task will return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetKongregateAsync(final GetKongregateRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + } + + /** + * Gets information of the Kongregate addon on a title, omits secrets. + * @param request GetKongregateRequest + * @return GetKongregateResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetKongregate(final GetKongregateRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetKongregateAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Kongregate addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetKongregateAsync(final GetKongregateRequest 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("/Addon/GetKongregate"), 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()); + GetKongregateResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return Async Task will return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetNintendoAsync(final GetNintendoRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + } + + /** + * Gets information of the Nintendo addon on a title, omits secrets. + * @param request GetNintendoRequest + * @return GetNintendoResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetNintendo(final GetNintendoRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetNintendoAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Nintendo addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetNintendoAsync(final GetNintendoRequest 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("/Addon/GetNintendo"), 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()); + GetNintendoResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return Async Task will return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetPSNAsync(final GetPSNRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + } + + /** + * Gets information of the PSN addon on a title, omits secrets. + * @param request GetPSNRequest + * @return GetPSNResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetPSN(final GetPSNRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetPSNAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the PSN addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetPSNAsync(final GetPSNRequest 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("/Addon/GetPSN"), 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()); + GetPSNResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return Async Task will return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetSteamAsync(final GetSteamRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + } + + /** + * Gets information of the Steam addon on a title, omits secrets. + * @param request GetSteamRequest + * @return GetSteamResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetSteam(final GetSteamRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetSteamAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Steam addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetSteamAsync(final GetSteamRequest 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("/Addon/GetSteam"), 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()); + GetSteamResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return Async Task will return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTwitchAsync(final GetTwitchRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + } + + /** + * Gets information of the Twitch addon on a title, omits secrets. + * @param request GetTwitchRequest + * @return GetTwitchResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTwitch(final GetTwitchRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTwitchAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + PlayFabResult exceptionResult = new PlayFabResult(); + exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null); + return exceptionResult; + } + } + + /** Gets information of the Twitch addon on a title, omits secrets. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTwitchAsync(final GetTwitchRequest 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("/Addon/GetTwitch"), 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()); + GetTwitchResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + +} diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAddonModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAddonModels.java new file mode 100644 index 00000000..8c01a4cc --- /dev/null +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAddonModels.java @@ -0,0 +1,503 @@ +package com.playfab; + +import java.util.*; +import com.playfab.PlayFabUtil.*; + +public class PlayFabAddonModels { + + public static class CreateOrUpdateAppleRequest { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** iOS App Shared Secret obtained after setting up your app in the App Store. */ + public String AppSharedSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Ignore expiration date for identity tokens. Be aware that when set to true this can invalidate expired tokens in the + * case where Apple rotates their signing keys. + */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class CreateOrUpdateAppleResponse { + + } + + public static class CreateOrUpdateFacebookInstantGamesRequest { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook Instant Games. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateFacebookInstantGamesResponse { + + } + + public static class CreateOrUpdateFacebookRequest { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Facebook App Secret obtained after setting up your app in Facebook. */ + public String AppSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class CreateOrUpdateFacebookResponse { + + } + + public static class CreateOrUpdateGoogleRequest { + /** + * Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppLicenseKey; + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + /** + * Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientSecret; + /** Needed to enable pending purchase handling and subscription processing. */ + public String ServiceAccountKey; + + } + + public static class CreateOrUpdateGoogleResponse { + + } + + public static class CreateOrUpdateKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Kongregate Secret API Key obtained after setting up your game in your Kongregate developer account. */ + public String SecretAPIKey; + + } + + public static class CreateOrUpdateKongregateResponse { + + } + + public static class CreateOrUpdateNintendoRequest { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** List of Nintendo Environments, currently supporting up to 4. Needs Catalog enabled. */ + public ArrayList Environments; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateNintendoResponse { + + } + + public static class CreateOrUpdatePSNRequest { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Client secret obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + /** + * Client secret obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientSecret; + + } + + public static class CreateOrUpdatePSNResponse { + + } + + public static class CreateOrUpdateSteamRequest { + /** Application ID obtained after setting up your app in Valve's developer portal. */ + public String ApplicationId; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + /** Sercet Key obtained after setting up your app in Valve's developer portal. */ + public String SecretKey; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class CreateOrUpdateSteamResponse { + + } + + public static class CreateOrUpdateTwitchRequest { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Client Secret obtained after creating your Twitch developer account. */ + public String ClientSecret; + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + /** If an error should be returned if the addon already exists. */ + public Boolean ErrorIfExists; + + } + + public static class CreateOrUpdateTwitchResponse { + + } + + public static class DeleteAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteAppleResponse { + + } + + public static class DeleteFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookInstantGamesResponse { + + } + + public static class DeleteFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteFacebookResponse { + + } + + public static class DeleteGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteGoogleResponse { + + } + + public static class DeleteKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteKongregateResponse { + + } + + public static class DeleteNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteNintendoResponse { + + } + + public static class DeletePSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeletePSNResponse { + + } + + public static class DeleteSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteSteamResponse { + + } + + public static class DeleteTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class DeleteTwitchResponse { + + } + + /** Combined entity type and ID structure which uniquely identifies a single entity. */ + public static class EntityKey { + /** Unique ID of the entity. */ + public String Id; + /** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */ + public String Type; + + } + + public static class GetAppleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetAppleResponse { + /** iOS App Bundle ID obtained after setting up your app in the App Store. */ + public String AppBundleId; + /** Addon status. */ + public Boolean Created; + /** Ignore expiration date for identity tokens. */ + public Boolean IgnoreExpirationDate; + /** Require secure authentication only for this app. */ + public Boolean RequireSecureAuthentication; + + } + + public static class GetFacebookInstantGamesRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookInstantGamesResponse { + /** Facebook App ID obtained after setting up your app in Facebook Instant Games. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + + } + + public static class GetFacebookRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetFacebookResponse { + /** Facebook App ID obtained after setting up your app in Facebook. */ + public String AppID; + /** Addon status. */ + public Boolean Created; + /** Email address for purchase dispute notifications. */ + public String NotificationEmail; + + } + + public static class GetGoogleRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetGoogleResponse { + /** + * Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + * receipt validation. + */ + public String AppPackageID; + /** Addon status. */ + public Boolean Created; + /** + * Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + * Required if using Google Authentication. + */ + public String OAuthClientID; + + } + + public static class GetKongregateRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetKongregateResponse { + /** Addon status. */ + public Boolean Created; + + } + + public static class GetNintendoRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetNintendoResponse { + /** Nintendo Switch Application ID, without the "0x" prefix. */ + public String ApplicationID; + /** Addon status. */ + public Boolean Created; + /** List of Nintendo Environments, currently supporting up to 4. */ + public ArrayList Environments; + + } + + public static class GetPSNRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetPSNResponse { + /** Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + /** + * Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + * includes PS5, cross-generation for PS4, and unified entitlements. + */ + public String NextGenClientID; + + } + + public static class GetSteamRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetSteamResponse { + /** Application ID obtained after setting up your game in Valve's developer portal. */ + public String ApplicationId; + /** Addon status. */ + public Boolean Created; + /** Enforce usage of AzurePlayFab identity in user authentication tickets. */ + public Boolean EnforceServiceSpecificTickets; + /** Use Steam Payments sandbox endpoint for test transactions. */ + public Boolean UseSandbox; + + } + + public static class GetTwitchRequest { + /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */ + public Map CustomTags; + /** The optional entity to perform this action on. Defaults to the currently logged in entity. */ + public EntityKey Entity; + + } + + public static class GetTwitchResponse { + /** Client ID obtained after creating your Twitch developer account. */ + public String ClientID; + /** Addon status. */ + public Boolean Created; + + } + + public static class NintendoEnvironment { + /** Client ID for the Nintendo Environment. */ + public String ClientID; + /** Client Secret for the Nintendo Environment. */ + public String ClientSecret; + /** ID for the Nintendo Environment. */ + public String ID; + + } + +} diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java index 8c2332fe..b44782da 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java @@ -2354,6 +2354,12 @@ public static enum GenericErrorCodes { GameSaveManifestNotFound, GameSaveManifestVersionAlreadyExists, GameSaveConflictUpdatingManifest, + GameSaveManifestUpdatesNotAllowed, + GameSaveFileAlreadyExists, + GameSaveManifestVersionNotFinalized, + GameSaveUnknownFileInManifest, + GameSaveFileExceededReportedSize, + GameSaveFileNotUploaded, StateShareForbidden, StateShareTitleNotInFlight, StateShareStateNotFound, diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java index 705a9fc0..71cca2a3 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java @@ -861,6 +861,12 @@ public static enum PlayFabErrorCode { GameSaveManifestNotFound(20300), GameSaveManifestVersionAlreadyExists(20301), GameSaveConflictUpdatingManifest(20302), + GameSaveManifestUpdatesNotAllowed(20303), + GameSaveFileAlreadyExists(20304), + GameSaveManifestVersionNotFinalized(20305), + GameSaveUnknownFileInManifest(20306), + GameSaveFileExceededReportedSize(20307), + GameSaveFileNotUploaded(20308), StateShareForbidden(21000), StateShareTitleNotInFlight(21001), StateShareStateNotFound(21002), diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java similarity index 99% rename from PlayFabServerSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java rename to PlayFabServerSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java index af2b0f87..12f748ad 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabLeaderboardsAPI.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProgressionAPI.java @@ -1,7 +1,7 @@ package com.playfab; import com.playfab.internal.*; -import com.playfab.PlayFabLeaderboardsModels.*; +import com.playfab.PlayFabProgressionModels.*; import com.playfab.PlayFabErrors.*; import com.playfab.PlayFabSettings; import java.util.concurrent.*; @@ -9,8 +9,8 @@ import com.google.gson.*; import com.google.gson.reflect.*; - /** Manage entity statistics Manage entity statistics */ -public class PlayFabLeaderboardsAPI { + /** Manage entity statistics Manage entity leaderboards */ +public class PlayFabProgressionAPI { private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); /** diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProgressionModels.java similarity index 99% rename from PlayFabClientSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java rename to PlayFabServerSDK/src/main/java/com/playfab/PlayFabProgressionModels.java index 9224031a..e617a9d1 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabLeaderboardsModels.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProgressionModels.java @@ -3,7 +3,7 @@ import java.util.*; import com.playfab.PlayFabUtil.*; -public class PlayFabLeaderboardsModels { +public class PlayFabProgressionModels { public static class CreateLeaderboardDefinitionRequest { /** Leaderboard columns describing the sort directions, cannot be changed after creation. */ diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java index b4d5daa3..cc888bfc 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java @@ -1959,6 +1959,12 @@ public static enum GenericErrorCodes { GameSaveManifestNotFound, GameSaveManifestVersionAlreadyExists, GameSaveConflictUpdatingManifest, + GameSaveManifestUpdatesNotAllowed, + GameSaveFileAlreadyExists, + GameSaveManifestVersionNotFinalized, + GameSaveUnknownFileInManifest, + GameSaveFileExceededReportedSize, + GameSaveFileNotUploaded, StateShareForbidden, StateShareTitleNotInFlight, StateShareStateNotFound, diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabSettings.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabSettings.java index a7305d1f..f157f31c 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabSettings.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabSettings.java @@ -8,9 +8,9 @@ import com.playfab.PlayFabErrors.ErrorCallback; public class PlayFabSettings { - public static String SdkVersion = "0.221.240802"; - public static String BuildIdentifier = "adobuild_javasdk_118"; - public static String SdkVersionString = "JavaSDK-0.221.240802"; + public static String SdkVersion = "0.223.240816"; + public static String BuildIdentifier = "adobuild_javasdk_116"; + public static String SdkVersionString = "JavaSDK-0.223.240816"; public static Map RequestGetParams; static { diff --git a/builds/client-sdk-0.223.240816.jar b/builds/client-sdk-0.223.240816.jar new file mode 100644 index 00000000..1e05fc2e Binary files /dev/null and b/builds/client-sdk-0.223.240816.jar differ diff --git a/builds/combo-sdk-0.223.240816.jar b/builds/combo-sdk-0.223.240816.jar new file mode 100644 index 00000000..adfe1e3f Binary files /dev/null and b/builds/combo-sdk-0.223.240816.jar differ diff --git a/builds/server-sdk-0.223.240816.jar b/builds/server-sdk-0.223.240816.jar new file mode 100644 index 00000000..83e24d9c Binary files /dev/null and b/builds/server-sdk-0.223.240816.jar differ