diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java index d4239dd0..84b20324 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabErrors.java @@ -454,6 +454,7 @@ public static enum PlayFabErrorCode { EconomyServiceInternalError(1451), QueryRateLimitExceeded(1452), EntityAPIKeyCreationDisabledForEntity(1453), + ForbiddenByEntityPolicy(1454), StudioCreationRateLimited(1456), StudioCreationInProgress(1457), DuplicateStudioName(1458), @@ -472,6 +473,14 @@ public static enum PlayFabErrorCode { CloudScriptAzureFunctionsArgumentSizeExceeded(1471), CloudScriptAzureFunctionsReturnSizeExceeded(1472), CloudScriptAzureFunctionsHTTPRequestError(1473), + VirtualCurrencyBetaGetError(1474), + VirtualCurrencyBetaCreateError(1475), + VirtualCurrencyBetaInitialDepositSaveError(1476), + VirtualCurrencyBetaSaveError(1477), + VirtualCurrencyBetaDeleteError(1478), + VirtualCurrencyBetaRestoreError(1479), + VirtualCurrencyBetaSaveConflict(1480), + VirtualCurrencyBetaUpdateError(1481), MatchmakingEntityInvalid(2001), MatchmakingPlayerAttributesInvalid(2002), MatchmakingQueueNotFound(2016), @@ -511,22 +520,30 @@ public static enum PlayFabErrorCode { ExportInvalidStatusUpdate(5000), ExportInvalidPrefix(5001), ExportBlobContainerDoesNotExist(5002), - ExportEventNameNotFound(5003), - ExportExportTitleIdNotFound(5004), + ExportNotFound(5004), ExportCouldNotUpdate(5005), ExportInvalidStorageType(5006), ExportAmazonBucketDoesNotExist(5007), ExportInvalidBlobStorage(5008), ExportKustoException(5009), - ExportKustoExceptionPartialErrorOnNewExport(5010), - ExportKustoExceptionEdit(5011), ExportKustoConnectionFailed(5012), ExportUnknownError(5013), ExportCantEditPendingExport(5014), ExportLimitExports(5015), ExportLimitEvents(5016), TitleNotEnabledForParty(6000), - PartyVersionNotFound(6001); + PartyVersionNotFound(6001), + MultiplayerServerBuildReferencedByMatchmakingQueue(6002), + ExperimentationExperimentStopped(7000), + ExperimentationExperimentRunning(7001), + ExperimentationExperimentNotFound(7002), + ExperimentationExperimentNeverStarted(7003), + ExperimentationExperimentDeleted(7004), + ExperimentationClientTimeout(7005), + ExperimentationExceededVariantNameLength(7006), + ExperimentationExceededMaxVariantLength(7007), + ExperimentInvalidId(7008), + SnapshotNotFound(11000); public int id; diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMultiplayerModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMultiplayerModels.java index b36b683d..a84db228 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMultiplayerModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabMultiplayerModels.java @@ -145,8 +145,7 @@ public static class CancelAllMatchmakingTicketsForPlayerResult { public static enum CancellationReason { Requested, Internal, - Timeout, - ServerAllocationFailed + Timeout } /** @@ -233,20 +232,8 @@ public static class CreateBuildWithCustomContainerRequest { public ContainerFlavor ContainerFlavor; /** The container reference, consisting of the image name and tag. */ public ContainerImageReference ContainerImageReference; - /** - * The name of the container repository. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerRepositoryName; /** The container command to run when the multiplayer server has been allocated, including any arguments. */ public String ContainerRunCommand; - /** - * The tag for the container. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerTag; /** The list of game assets related to the build. */ public ArrayList GameAssetReferences; /** The game certificates for the build. */ @@ -619,8 +606,14 @@ public static class GetMatchmakingTicketRequest { } public static class GetMatchmakingTicketResult { - /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + /** + * The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. + * @deprecated Please use CancellationReasonString instead. + */ + @Deprecated public CancellationReason CancellationReason; + /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + public String CancellationReasonString; /** The server date and time at which ticket was created. */ public Date Created; /** The Creator's entity key. */ diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesAPI.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesAPI.java index 50f7ed86..2071300a 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesAPI.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesAPI.java @@ -196,6 +196,66 @@ private static PlayFabResult privateGetProfilesAsync( return pfResult; } + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return Async Task will return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + } + + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTitlePlayersFromMasterPlayerAccountIds(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** Retrieves the title player accounts associated with the given master player account. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest 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("/Profile/GetTitlePlayersFromMasterPlayerAccountIds"), 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()); + GetTitlePlayersFromMasterPlayerAccountIdsResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Sets the global title access policy * @param request SetGlobalPolicyRequest diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesModels.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesModels.java index 569e3462..e292581b 100644 --- a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesModels.java +++ b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabProfilesModels.java @@ -80,6 +80,8 @@ public static class EntityProfileBody { public Map Files; /** The language on this profile. */ public String Language; + /** Leaderboard metadata for the entity. */ + public String LeaderboardMetadata; /** The lineage of this profile. */ public EntityLineage Lineage; /** The objects on this profile. */ @@ -195,6 +197,21 @@ public static class GetGlobalPolicyResponse { } + /** Given a master player account id (PlayFab ID), returns all title player accounts associated with it. */ + public static class GetTitlePlayersFromMasterPlayerAccountIdsRequest { + /** Master player account ids. */ + public ArrayList MasterPlayerAccountIds; + /** Id of title to get players from. */ + public String TitleId; + + } + + public static class GetTitlePlayersFromMasterPlayerAccountIdsResponse { + /** Dictionary of master player ids mapped to title player entity keys and id pairs */ + public Map TitlePlayerAccounts; + + } + public static enum OperationTypes { Created, Updated, diff --git a/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabSettings.java b/AndroidStudioExample/app/src/main/java/com/playfab/PlayFabSettings.java index 4567562a..e49975d9 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.93.190625"; - public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-3_1"; - public static String SdkVersionString = "JavaSDK-0.93.190625"; + public static String SdkVersion = "0.94.190717"; + public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-1_0"; + public static String SdkVersionString = "JavaSDK-0.94.190717"; public static Map RequestGetParams; static { diff --git a/PlayFabClientSDK/pom.xml b/PlayFabClientSDK/pom.xml index f2a84f99..fe94b3eb 100644 --- a/PlayFabClientSDK/pom.xml +++ b/PlayFabClientSDK/pom.xml @@ -14,7 +14,7 @@ com.playfab client-sdk - 0.93.190625 + 0.94.190717 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. http://api.playfab.com/ diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java index d4239dd0..84b20324 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabErrors.java @@ -454,6 +454,7 @@ public static enum PlayFabErrorCode { EconomyServiceInternalError(1451), QueryRateLimitExceeded(1452), EntityAPIKeyCreationDisabledForEntity(1453), + ForbiddenByEntityPolicy(1454), StudioCreationRateLimited(1456), StudioCreationInProgress(1457), DuplicateStudioName(1458), @@ -472,6 +473,14 @@ public static enum PlayFabErrorCode { CloudScriptAzureFunctionsArgumentSizeExceeded(1471), CloudScriptAzureFunctionsReturnSizeExceeded(1472), CloudScriptAzureFunctionsHTTPRequestError(1473), + VirtualCurrencyBetaGetError(1474), + VirtualCurrencyBetaCreateError(1475), + VirtualCurrencyBetaInitialDepositSaveError(1476), + VirtualCurrencyBetaSaveError(1477), + VirtualCurrencyBetaDeleteError(1478), + VirtualCurrencyBetaRestoreError(1479), + VirtualCurrencyBetaSaveConflict(1480), + VirtualCurrencyBetaUpdateError(1481), MatchmakingEntityInvalid(2001), MatchmakingPlayerAttributesInvalid(2002), MatchmakingQueueNotFound(2016), @@ -511,22 +520,30 @@ public static enum PlayFabErrorCode { ExportInvalidStatusUpdate(5000), ExportInvalidPrefix(5001), ExportBlobContainerDoesNotExist(5002), - ExportEventNameNotFound(5003), - ExportExportTitleIdNotFound(5004), + ExportNotFound(5004), ExportCouldNotUpdate(5005), ExportInvalidStorageType(5006), ExportAmazonBucketDoesNotExist(5007), ExportInvalidBlobStorage(5008), ExportKustoException(5009), - ExportKustoExceptionPartialErrorOnNewExport(5010), - ExportKustoExceptionEdit(5011), ExportKustoConnectionFailed(5012), ExportUnknownError(5013), ExportCantEditPendingExport(5014), ExportLimitExports(5015), ExportLimitEvents(5016), TitleNotEnabledForParty(6000), - PartyVersionNotFound(6001); + PartyVersionNotFound(6001), + MultiplayerServerBuildReferencedByMatchmakingQueue(6002), + ExperimentationExperimentStopped(7000), + ExperimentationExperimentRunning(7001), + ExperimentationExperimentNotFound(7002), + ExperimentationExperimentNeverStarted(7003), + ExperimentationExperimentDeleted(7004), + ExperimentationClientTimeout(7005), + ExperimentationExceededVariantNameLength(7006), + ExperimentationExceededMaxVariantLength(7007), + ExperimentInvalidId(7008), + SnapshotNotFound(11000); public int id; diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java index b36b683d..a84db228 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java @@ -145,8 +145,7 @@ public static class CancelAllMatchmakingTicketsForPlayerResult { public static enum CancellationReason { Requested, Internal, - Timeout, - ServerAllocationFailed + Timeout } /** @@ -233,20 +232,8 @@ public static class CreateBuildWithCustomContainerRequest { public ContainerFlavor ContainerFlavor; /** The container reference, consisting of the image name and tag. */ public ContainerImageReference ContainerImageReference; - /** - * The name of the container repository. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerRepositoryName; /** The container command to run when the multiplayer server has been allocated, including any arguments. */ public String ContainerRunCommand; - /** - * The tag for the container. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerTag; /** The list of game assets related to the build. */ public ArrayList GameAssetReferences; /** The game certificates for the build. */ @@ -619,8 +606,14 @@ public static class GetMatchmakingTicketRequest { } public static class GetMatchmakingTicketResult { - /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + /** + * The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. + * @deprecated Please use CancellationReasonString instead. + */ + @Deprecated public CancellationReason CancellationReason; + /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + public String CancellationReasonString; /** The server date and time at which ticket was created. */ public Date Created; /** The Creator's entity key. */ diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java index 50f7ed86..2071300a 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java @@ -196,6 +196,66 @@ private static PlayFabResult privateGetProfilesAsync( return pfResult; } + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return Async Task will return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + } + + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTitlePlayersFromMasterPlayerAccountIds(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** Retrieves the title player accounts associated with the given master player account. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest 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("/Profile/GetTitlePlayersFromMasterPlayerAccountIds"), 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()); + GetTitlePlayersFromMasterPlayerAccountIdsResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Sets the global title access policy * @param request SetGlobalPolicyRequest diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesModels.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesModels.java index 569e3462..e292581b 100644 --- a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesModels.java +++ b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesModels.java @@ -80,6 +80,8 @@ public static class EntityProfileBody { public Map Files; /** The language on this profile. */ public String Language; + /** Leaderboard metadata for the entity. */ + public String LeaderboardMetadata; /** The lineage of this profile. */ public EntityLineage Lineage; /** The objects on this profile. */ @@ -195,6 +197,21 @@ public static class GetGlobalPolicyResponse { } + /** Given a master player account id (PlayFab ID), returns all title player accounts associated with it. */ + public static class GetTitlePlayersFromMasterPlayerAccountIdsRequest { + /** Master player account ids. */ + public ArrayList MasterPlayerAccountIds; + /** Id of title to get players from. */ + public String TitleId; + + } + + public static class GetTitlePlayersFromMasterPlayerAccountIdsResponse { + /** Dictionary of master player ids mapped to title player entity keys and id pairs */ + public Map TitlePlayerAccounts; + + } + public static enum OperationTypes { Created, Updated, diff --git a/PlayFabClientSDK/src/main/java/com/playfab/PlayFabSettings.java b/PlayFabClientSDK/src/main/java/com/playfab/PlayFabSettings.java index 52de40e5..69187357 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.93.190625"; - public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-3_1"; - public static String SdkVersionString = "JavaSDK-0.93.190625"; + public static String SdkVersion = "0.94.190717"; + public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-1_0"; + public static String SdkVersionString = "JavaSDK-0.94.190717"; public static Map RequestGetParams; static { diff --git a/PlayFabSDK/pom.xml b/PlayFabSDK/pom.xml index 12d19c3a..68dfc7a2 100644 --- a/PlayFabSDK/pom.xml +++ b/PlayFabSDK/pom.xml @@ -14,7 +14,7 @@ com.playfab combo-sdk - 0.93.190625 + 0.94.190717 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. http://api.playfab.com/ diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java index 2daa36c1..cad573a5 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java @@ -1685,6 +1685,7 @@ public static enum GenericErrorCodes { EconomyServiceInternalError, QueryRateLimitExceeded, EntityAPIKeyCreationDisabledForEntity, + ForbiddenByEntityPolicy, StudioCreationRateLimited, StudioCreationInProgress, DuplicateStudioName, @@ -1703,6 +1704,14 @@ public static enum GenericErrorCodes { CloudScriptAzureFunctionsArgumentSizeExceeded, CloudScriptAzureFunctionsReturnSizeExceeded, CloudScriptAzureFunctionsHTTPRequestError, + VirtualCurrencyBetaGetError, + VirtualCurrencyBetaCreateError, + VirtualCurrencyBetaInitialDepositSaveError, + VirtualCurrencyBetaSaveError, + VirtualCurrencyBetaDeleteError, + VirtualCurrencyBetaRestoreError, + VirtualCurrencyBetaSaveConflict, + VirtualCurrencyBetaUpdateError, MatchmakingEntityInvalid, MatchmakingPlayerAttributesInvalid, MatchmakingQueueNotFound, @@ -1742,22 +1751,30 @@ public static enum GenericErrorCodes { ExportInvalidStatusUpdate, ExportInvalidPrefix, ExportBlobContainerDoesNotExist, - ExportEventNameNotFound, - ExportExportTitleIdNotFound, + ExportNotFound, ExportCouldNotUpdate, ExportInvalidStorageType, ExportAmazonBucketDoesNotExist, ExportInvalidBlobStorage, ExportKustoException, - ExportKustoExceptionPartialErrorOnNewExport, - ExportKustoExceptionEdit, ExportKustoConnectionFailed, ExportUnknownError, ExportCantEditPendingExport, ExportLimitExports, ExportLimitEvents, TitleNotEnabledForParty, - PartyVersionNotFound + PartyVersionNotFound, + MultiplayerServerBuildReferencedByMatchmakingQueue, + ExperimentationExperimentStopped, + ExperimentationExperimentRunning, + ExperimentationExperimentNotFound, + ExperimentationExperimentNeverStarted, + ExperimentationExperimentDeleted, + ExperimentationClientTimeout, + ExperimentationExceededVariantNameLength, + ExperimentationExceededMaxVariantLength, + ExperimentInvalidId, + SnapshotNotFound } public static class GetActionsOnPlayersInSegmentTaskInstanceResult { diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java index d4239dd0..84b20324 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java @@ -454,6 +454,7 @@ public static enum PlayFabErrorCode { EconomyServiceInternalError(1451), QueryRateLimitExceeded(1452), EntityAPIKeyCreationDisabledForEntity(1453), + ForbiddenByEntityPolicy(1454), StudioCreationRateLimited(1456), StudioCreationInProgress(1457), DuplicateStudioName(1458), @@ -472,6 +473,14 @@ public static enum PlayFabErrorCode { CloudScriptAzureFunctionsArgumentSizeExceeded(1471), CloudScriptAzureFunctionsReturnSizeExceeded(1472), CloudScriptAzureFunctionsHTTPRequestError(1473), + VirtualCurrencyBetaGetError(1474), + VirtualCurrencyBetaCreateError(1475), + VirtualCurrencyBetaInitialDepositSaveError(1476), + VirtualCurrencyBetaSaveError(1477), + VirtualCurrencyBetaDeleteError(1478), + VirtualCurrencyBetaRestoreError(1479), + VirtualCurrencyBetaSaveConflict(1480), + VirtualCurrencyBetaUpdateError(1481), MatchmakingEntityInvalid(2001), MatchmakingPlayerAttributesInvalid(2002), MatchmakingQueueNotFound(2016), @@ -511,22 +520,30 @@ public static enum PlayFabErrorCode { ExportInvalidStatusUpdate(5000), ExportInvalidPrefix(5001), ExportBlobContainerDoesNotExist(5002), - ExportEventNameNotFound(5003), - ExportExportTitleIdNotFound(5004), + ExportNotFound(5004), ExportCouldNotUpdate(5005), ExportInvalidStorageType(5006), ExportAmazonBucketDoesNotExist(5007), ExportInvalidBlobStorage(5008), ExportKustoException(5009), - ExportKustoExceptionPartialErrorOnNewExport(5010), - ExportKustoExceptionEdit(5011), ExportKustoConnectionFailed(5012), ExportUnknownError(5013), ExportCantEditPendingExport(5014), ExportLimitExports(5015), ExportLimitEvents(5016), TitleNotEnabledForParty(6000), - PartyVersionNotFound(6001); + PartyVersionNotFound(6001), + MultiplayerServerBuildReferencedByMatchmakingQueue(6002), + ExperimentationExperimentStopped(7000), + ExperimentationExperimentRunning(7001), + ExperimentationExperimentNotFound(7002), + ExperimentationExperimentNeverStarted(7003), + ExperimentationExperimentDeleted(7004), + ExperimentationClientTimeout(7005), + ExperimentationExceededVariantNameLength(7006), + ExperimentationExceededMaxVariantLength(7007), + ExperimentInvalidId(7008), + SnapshotNotFound(11000); public int id; diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabEventsAPI.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabEventsAPI.java index 9fb436a3..c3e1769c 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabEventsAPI.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabEventsAPI.java @@ -10,8 +10,8 @@ import com.google.gson.reflect.*; /** - * Write custom PlayStream events for any PlayFab entity. PlayStream events can be used for analytics, reporting, - * debugging, or to trigger custom actions in near real-time. + * Write custom PlayStream and Telemetry events for any PlayFab entity. Telemetry events can be used for analytic, + * reporting, or debugging. PlayStream events can do all of that and also trigger custom actions in near real-time. */ public class PlayFabEventsAPI { private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); @@ -75,4 +75,64 @@ private static PlayFabResult privateWriteEventsAsync(final pfResult.Result = result; return pfResult; } + + /** + * Write batches of entity based events to as Telemetry events (bypass PlayStream). + * @param request WriteEventsRequest + * @return Async Task will return WriteEventsResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> WriteTelemetryEventsAsync(final WriteEventsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateWriteTelemetryEventsAsync(request); + } + }); + } + + /** + * Write batches of entity based events to as Telemetry events (bypass PlayStream). + * @param request WriteEventsRequest + * @return WriteEventsResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult WriteTelemetryEvents(final WriteEventsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateWriteTelemetryEventsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** Write batches of entity based events to as Telemetry events (bypass PlayStream). */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateWriteTelemetryEventsAsync(final WriteEventsRequest 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("/Event/WriteTelemetryEvents"), 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()); + WriteEventsResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } } diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java index b36b683d..a84db228 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java @@ -145,8 +145,7 @@ public static class CancelAllMatchmakingTicketsForPlayerResult { public static enum CancellationReason { Requested, Internal, - Timeout, - ServerAllocationFailed + Timeout } /** @@ -233,20 +232,8 @@ public static class CreateBuildWithCustomContainerRequest { public ContainerFlavor ContainerFlavor; /** The container reference, consisting of the image name and tag. */ public ContainerImageReference ContainerImageReference; - /** - * The name of the container repository. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerRepositoryName; /** The container command to run when the multiplayer server has been allocated, including any arguments. */ public String ContainerRunCommand; - /** - * The tag for the container. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerTag; /** The list of game assets related to the build. */ public ArrayList GameAssetReferences; /** The game certificates for the build. */ @@ -619,8 +606,14 @@ public static class GetMatchmakingTicketRequest { } public static class GetMatchmakingTicketResult { - /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + /** + * The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. + * @deprecated Please use CancellationReasonString instead. + */ + @Deprecated public CancellationReason CancellationReason; + /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + public String CancellationReasonString; /** The server date and time at which ticket was created. */ public Date Created; /** The Creator's entity key. */ diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java index 50f7ed86..2071300a 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java @@ -196,6 +196,66 @@ private static PlayFabResult privateGetProfilesAsync( return pfResult; } + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return Async Task will return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + } + + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTitlePlayersFromMasterPlayerAccountIds(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** Retrieves the title player accounts associated with the given master player account. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest 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("/Profile/GetTitlePlayersFromMasterPlayerAccountIds"), 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()); + GetTitlePlayersFromMasterPlayerAccountIdsResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Sets the global title access policy * @param request SetGlobalPolicyRequest diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesModels.java index 569e3462..e292581b 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabProfilesModels.java @@ -80,6 +80,8 @@ public static class EntityProfileBody { public Map Files; /** The language on this profile. */ public String Language; + /** Leaderboard metadata for the entity. */ + public String LeaderboardMetadata; /** The lineage of this profile. */ public EntityLineage Lineage; /** The objects on this profile. */ @@ -195,6 +197,21 @@ public static class GetGlobalPolicyResponse { } + /** Given a master player account id (PlayFab ID), returns all title player accounts associated with it. */ + public static class GetTitlePlayersFromMasterPlayerAccountIdsRequest { + /** Master player account ids. */ + public ArrayList MasterPlayerAccountIds; + /** Id of title to get players from. */ + public String TitleId; + + } + + public static class GetTitlePlayersFromMasterPlayerAccountIdsResponse { + /** Dictionary of master player ids mapped to title player entity keys and id pairs */ + public Map TitlePlayerAccounts; + + } + public static enum OperationTypes { Created, Updated, diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java index 422e11f3..ef131e8a 100644 --- a/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java +++ b/PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java @@ -894,6 +894,7 @@ public static class DeletePlayerResult { } + /** Represents the request to delete a push notification template. */ public static class DeletePushNotificationTemplateRequest { /** Id of the push notification template to be deleted. */ public String PushNotificationTemplateId; @@ -1524,6 +1525,7 @@ public static enum GenericErrorCodes { EconomyServiceInternalError, QueryRateLimitExceeded, EntityAPIKeyCreationDisabledForEntity, + ForbiddenByEntityPolicy, StudioCreationRateLimited, StudioCreationInProgress, DuplicateStudioName, @@ -1542,6 +1544,14 @@ public static enum GenericErrorCodes { CloudScriptAzureFunctionsArgumentSizeExceeded, CloudScriptAzureFunctionsReturnSizeExceeded, CloudScriptAzureFunctionsHTTPRequestError, + VirtualCurrencyBetaGetError, + VirtualCurrencyBetaCreateError, + VirtualCurrencyBetaInitialDepositSaveError, + VirtualCurrencyBetaSaveError, + VirtualCurrencyBetaDeleteError, + VirtualCurrencyBetaRestoreError, + VirtualCurrencyBetaSaveConflict, + VirtualCurrencyBetaUpdateError, MatchmakingEntityInvalid, MatchmakingPlayerAttributesInvalid, MatchmakingQueueNotFound, @@ -1581,22 +1591,30 @@ public static enum GenericErrorCodes { ExportInvalidStatusUpdate, ExportInvalidPrefix, ExportBlobContainerDoesNotExist, - ExportEventNameNotFound, - ExportExportTitleIdNotFound, + ExportNotFound, ExportCouldNotUpdate, ExportInvalidStorageType, ExportAmazonBucketDoesNotExist, ExportInvalidBlobStorage, ExportKustoException, - ExportKustoExceptionPartialErrorOnNewExport, - ExportKustoExceptionEdit, ExportKustoConnectionFailed, ExportUnknownError, ExportCantEditPendingExport, ExportLimitExports, ExportLimitEvents, TitleNotEnabledForParty, - PartyVersionNotFound + PartyVersionNotFound, + MultiplayerServerBuildReferencedByMatchmakingQueue, + ExperimentationExperimentStopped, + ExperimentationExperimentRunning, + ExperimentationExperimentNotFound, + ExperimentationExperimentNeverStarted, + ExperimentationExperimentDeleted, + ExperimentationClientTimeout, + ExperimentationExceededVariantNameLength, + ExperimentationExceededMaxVariantLength, + ExperimentInvalidId, + SnapshotNotFound } public static class GenericPlayFabIdPair { @@ -2713,6 +2731,7 @@ public static class ListUsersCharactersResult { } + /** Contains the localized push notification content. */ public static class LocalizedPushNotificationProperties { /** Message of the localized push notification template. */ public String Message; @@ -3460,6 +3479,7 @@ public static class RevokeItemError { } + /** Represents the save push notification template request. */ public static class SavePushNotificationTemplateRequest { /** Android JSON for the notification template. */ public String AndroidPayload; @@ -3467,13 +3487,14 @@ public static class SavePushNotificationTemplateRequest { public String Id; /** IOS JSON for the notification template. */ public String IOSPayload; - /** Dictionary of localized push notification templates. */ + /** Dictionary of localized push notification templates with the language as the key. */ public Map LocalizedPushNotificationTemplates; /** Name of the push notification template. */ public String Name; } + /** Represents the save push notification template result. */ public static class SavePushNotificationTemplateResult { /** Id of the push notification template that was saved. */ public String PushNotificationTemplateId; @@ -3527,6 +3548,7 @@ public static class SendEmailFromTemplateResult { } + /** Represents the request for sending a push notification template to a recipient. */ public static class SendPushNotificationFromTemplateRequest { /** Id of the push notification template. */ public String PushNotificationTemplateId; diff --git a/PlayFabSDK/src/main/java/com/playfab/PlayFabSettings.java b/PlayFabSDK/src/main/java/com/playfab/PlayFabSettings.java index 52de40e5..69187357 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.93.190625"; - public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-3_1"; - public static String SdkVersionString = "JavaSDK-0.93.190625"; + public static String SdkVersion = "0.94.190717"; + public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-1_0"; + public static String SdkVersionString = "JavaSDK-0.94.190717"; public static Map RequestGetParams; static { diff --git a/PlayFabServerSDK/pom.xml b/PlayFabServerSDK/pom.xml index 173e57b0..1016bb42 100644 --- a/PlayFabServerSDK/pom.xml +++ b/PlayFabServerSDK/pom.xml @@ -14,7 +14,7 @@ com.playfab server-sdk - 0.93.190625 + 0.94.190717 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. http://api.playfab.com/ diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java index 2daa36c1..cad573a5 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java @@ -1685,6 +1685,7 @@ public static enum GenericErrorCodes { EconomyServiceInternalError, QueryRateLimitExceeded, EntityAPIKeyCreationDisabledForEntity, + ForbiddenByEntityPolicy, StudioCreationRateLimited, StudioCreationInProgress, DuplicateStudioName, @@ -1703,6 +1704,14 @@ public static enum GenericErrorCodes { CloudScriptAzureFunctionsArgumentSizeExceeded, CloudScriptAzureFunctionsReturnSizeExceeded, CloudScriptAzureFunctionsHTTPRequestError, + VirtualCurrencyBetaGetError, + VirtualCurrencyBetaCreateError, + VirtualCurrencyBetaInitialDepositSaveError, + VirtualCurrencyBetaSaveError, + VirtualCurrencyBetaDeleteError, + VirtualCurrencyBetaRestoreError, + VirtualCurrencyBetaSaveConflict, + VirtualCurrencyBetaUpdateError, MatchmakingEntityInvalid, MatchmakingPlayerAttributesInvalid, MatchmakingQueueNotFound, @@ -1742,22 +1751,30 @@ public static enum GenericErrorCodes { ExportInvalidStatusUpdate, ExportInvalidPrefix, ExportBlobContainerDoesNotExist, - ExportEventNameNotFound, - ExportExportTitleIdNotFound, + ExportNotFound, ExportCouldNotUpdate, ExportInvalidStorageType, ExportAmazonBucketDoesNotExist, ExportInvalidBlobStorage, ExportKustoException, - ExportKustoExceptionPartialErrorOnNewExport, - ExportKustoExceptionEdit, ExportKustoConnectionFailed, ExportUnknownError, ExportCantEditPendingExport, ExportLimitExports, ExportLimitEvents, TitleNotEnabledForParty, - PartyVersionNotFound + PartyVersionNotFound, + MultiplayerServerBuildReferencedByMatchmakingQueue, + ExperimentationExperimentStopped, + ExperimentationExperimentRunning, + ExperimentationExperimentNotFound, + ExperimentationExperimentNeverStarted, + ExperimentationExperimentDeleted, + ExperimentationClientTimeout, + ExperimentationExceededVariantNameLength, + ExperimentationExceededMaxVariantLength, + ExperimentInvalidId, + SnapshotNotFound } public static class GetActionsOnPlayersInSegmentTaskInstanceResult { diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java index d4239dd0..84b20324 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabErrors.java @@ -454,6 +454,7 @@ public static enum PlayFabErrorCode { EconomyServiceInternalError(1451), QueryRateLimitExceeded(1452), EntityAPIKeyCreationDisabledForEntity(1453), + ForbiddenByEntityPolicy(1454), StudioCreationRateLimited(1456), StudioCreationInProgress(1457), DuplicateStudioName(1458), @@ -472,6 +473,14 @@ public static enum PlayFabErrorCode { CloudScriptAzureFunctionsArgumentSizeExceeded(1471), CloudScriptAzureFunctionsReturnSizeExceeded(1472), CloudScriptAzureFunctionsHTTPRequestError(1473), + VirtualCurrencyBetaGetError(1474), + VirtualCurrencyBetaCreateError(1475), + VirtualCurrencyBetaInitialDepositSaveError(1476), + VirtualCurrencyBetaSaveError(1477), + VirtualCurrencyBetaDeleteError(1478), + VirtualCurrencyBetaRestoreError(1479), + VirtualCurrencyBetaSaveConflict(1480), + VirtualCurrencyBetaUpdateError(1481), MatchmakingEntityInvalid(2001), MatchmakingPlayerAttributesInvalid(2002), MatchmakingQueueNotFound(2016), @@ -511,22 +520,30 @@ public static enum PlayFabErrorCode { ExportInvalidStatusUpdate(5000), ExportInvalidPrefix(5001), ExportBlobContainerDoesNotExist(5002), - ExportEventNameNotFound(5003), - ExportExportTitleIdNotFound(5004), + ExportNotFound(5004), ExportCouldNotUpdate(5005), ExportInvalidStorageType(5006), ExportAmazonBucketDoesNotExist(5007), ExportInvalidBlobStorage(5008), ExportKustoException(5009), - ExportKustoExceptionPartialErrorOnNewExport(5010), - ExportKustoExceptionEdit(5011), ExportKustoConnectionFailed(5012), ExportUnknownError(5013), ExportCantEditPendingExport(5014), ExportLimitExports(5015), ExportLimitEvents(5016), TitleNotEnabledForParty(6000), - PartyVersionNotFound(6001); + PartyVersionNotFound(6001), + MultiplayerServerBuildReferencedByMatchmakingQueue(6002), + ExperimentationExperimentStopped(7000), + ExperimentationExperimentRunning(7001), + ExperimentationExperimentNotFound(7002), + ExperimentationExperimentNeverStarted(7003), + ExperimentationExperimentDeleted(7004), + ExperimentationClientTimeout(7005), + ExperimentationExceededVariantNameLength(7006), + ExperimentationExceededMaxVariantLength(7007), + ExperimentInvalidId(7008), + SnapshotNotFound(11000); public int id; diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabEventsAPI.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabEventsAPI.java index 9fb436a3..c3e1769c 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabEventsAPI.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabEventsAPI.java @@ -10,8 +10,8 @@ import com.google.gson.reflect.*; /** - * Write custom PlayStream events for any PlayFab entity. PlayStream events can be used for analytics, reporting, - * debugging, or to trigger custom actions in near real-time. + * Write custom PlayStream and Telemetry events for any PlayFab entity. Telemetry events can be used for analytic, + * reporting, or debugging. PlayStream events can do all of that and also trigger custom actions in near real-time. */ public class PlayFabEventsAPI { private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create(); @@ -75,4 +75,64 @@ private static PlayFabResult privateWriteEventsAsync(final pfResult.Result = result; return pfResult; } + + /** + * Write batches of entity based events to as Telemetry events (bypass PlayStream). + * @param request WriteEventsRequest + * @return Async Task will return WriteEventsResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> WriteTelemetryEventsAsync(final WriteEventsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateWriteTelemetryEventsAsync(request); + } + }); + } + + /** + * Write batches of entity based events to as Telemetry events (bypass PlayStream). + * @param request WriteEventsRequest + * @return WriteEventsResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult WriteTelemetryEvents(final WriteEventsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateWriteTelemetryEventsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** Write batches of entity based events to as Telemetry events (bypass PlayStream). */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateWriteTelemetryEventsAsync(final WriteEventsRequest 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("/Event/WriteTelemetryEvents"), 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()); + WriteEventsResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } } diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java index b36b683d..a84db228 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabMultiplayerModels.java @@ -145,8 +145,7 @@ public static class CancelAllMatchmakingTicketsForPlayerResult { public static enum CancellationReason { Requested, Internal, - Timeout, - ServerAllocationFailed + Timeout } /** @@ -233,20 +232,8 @@ public static class CreateBuildWithCustomContainerRequest { public ContainerFlavor ContainerFlavor; /** The container reference, consisting of the image name and tag. */ public ContainerImageReference ContainerImageReference; - /** - * The name of the container repository. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerRepositoryName; /** The container command to run when the multiplayer server has been allocated, including any arguments. */ public String ContainerRunCommand; - /** - * The tag for the container. - * @deprecated Please use ContainerImageReference instead. - */ - @Deprecated - public String ContainerTag; /** The list of game assets related to the build. */ public ArrayList GameAssetReferences; /** The game certificates for the build. */ @@ -619,8 +606,14 @@ public static class GetMatchmakingTicketRequest { } public static class GetMatchmakingTicketResult { - /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + /** + * The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. + * @deprecated Please use CancellationReasonString instead. + */ + @Deprecated public CancellationReason CancellationReason; + /** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */ + public String CancellationReasonString; /** The server date and time at which ticket was created. */ public Date Created; /** The Creator's entity key. */ diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java index 50f7ed86..2071300a 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java @@ -196,6 +196,66 @@ private static PlayFabResult privateGetProfilesAsync( return pfResult; } + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return Async Task will return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static FutureTask> GetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + return new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + } + + /** + * Retrieves the title player accounts associated with the given master player account. + * @param request GetTitlePlayersFromMasterPlayerAccountIdsRequest + * @return GetTitlePlayersFromMasterPlayerAccountIdsResponse + */ + @SuppressWarnings("unchecked") + public static PlayFabResult GetTitlePlayersFromMasterPlayerAccountIds(final GetTitlePlayersFromMasterPlayerAccountIdsRequest request) { + FutureTask> task = new FutureTask(new Callable>() { + public PlayFabResult call() throws Exception { + return privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(request); + } + }); + try { + task.run(); + return task.get(); + } catch(Exception e) { + return null; + } + } + + /** Retrieves the title player accounts associated with the given master player account. */ + @SuppressWarnings("unchecked") + private static PlayFabResult privateGetTitlePlayersFromMasterPlayerAccountIdsAsync(final GetTitlePlayersFromMasterPlayerAccountIdsRequest 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("/Profile/GetTitlePlayersFromMasterPlayerAccountIds"), 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()); + GetTitlePlayersFromMasterPlayerAccountIdsResponse result = resultData.data; + + PlayFabResult pfResult = new PlayFabResult(); + pfResult.Result = result; + return pfResult; + } + /** * Sets the global title access policy * @param request SetGlobalPolicyRequest diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesModels.java index 569e3462..e292581b 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesModels.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabProfilesModels.java @@ -80,6 +80,8 @@ public static class EntityProfileBody { public Map Files; /** The language on this profile. */ public String Language; + /** Leaderboard metadata for the entity. */ + public String LeaderboardMetadata; /** The lineage of this profile. */ public EntityLineage Lineage; /** The objects on this profile. */ @@ -195,6 +197,21 @@ public static class GetGlobalPolicyResponse { } + /** Given a master player account id (PlayFab ID), returns all title player accounts associated with it. */ + public static class GetTitlePlayersFromMasterPlayerAccountIdsRequest { + /** Master player account ids. */ + public ArrayList MasterPlayerAccountIds; + /** Id of title to get players from. */ + public String TitleId; + + } + + public static class GetTitlePlayersFromMasterPlayerAccountIdsResponse { + /** Dictionary of master player ids mapped to title player entity keys and id pairs */ + public Map TitlePlayerAccounts; + + } + public static enum OperationTypes { Created, Updated, diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java index 422e11f3..ef131e8a 100644 --- a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java +++ b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabServerModels.java @@ -894,6 +894,7 @@ public static class DeletePlayerResult { } + /** Represents the request to delete a push notification template. */ public static class DeletePushNotificationTemplateRequest { /** Id of the push notification template to be deleted. */ public String PushNotificationTemplateId; @@ -1524,6 +1525,7 @@ public static enum GenericErrorCodes { EconomyServiceInternalError, QueryRateLimitExceeded, EntityAPIKeyCreationDisabledForEntity, + ForbiddenByEntityPolicy, StudioCreationRateLimited, StudioCreationInProgress, DuplicateStudioName, @@ -1542,6 +1544,14 @@ public static enum GenericErrorCodes { CloudScriptAzureFunctionsArgumentSizeExceeded, CloudScriptAzureFunctionsReturnSizeExceeded, CloudScriptAzureFunctionsHTTPRequestError, + VirtualCurrencyBetaGetError, + VirtualCurrencyBetaCreateError, + VirtualCurrencyBetaInitialDepositSaveError, + VirtualCurrencyBetaSaveError, + VirtualCurrencyBetaDeleteError, + VirtualCurrencyBetaRestoreError, + VirtualCurrencyBetaSaveConflict, + VirtualCurrencyBetaUpdateError, MatchmakingEntityInvalid, MatchmakingPlayerAttributesInvalid, MatchmakingQueueNotFound, @@ -1581,22 +1591,30 @@ public static enum GenericErrorCodes { ExportInvalidStatusUpdate, ExportInvalidPrefix, ExportBlobContainerDoesNotExist, - ExportEventNameNotFound, - ExportExportTitleIdNotFound, + ExportNotFound, ExportCouldNotUpdate, ExportInvalidStorageType, ExportAmazonBucketDoesNotExist, ExportInvalidBlobStorage, ExportKustoException, - ExportKustoExceptionPartialErrorOnNewExport, - ExportKustoExceptionEdit, ExportKustoConnectionFailed, ExportUnknownError, ExportCantEditPendingExport, ExportLimitExports, ExportLimitEvents, TitleNotEnabledForParty, - PartyVersionNotFound + PartyVersionNotFound, + MultiplayerServerBuildReferencedByMatchmakingQueue, + ExperimentationExperimentStopped, + ExperimentationExperimentRunning, + ExperimentationExperimentNotFound, + ExperimentationExperimentNeverStarted, + ExperimentationExperimentDeleted, + ExperimentationClientTimeout, + ExperimentationExceededVariantNameLength, + ExperimentationExceededMaxVariantLength, + ExperimentInvalidId, + SnapshotNotFound } public static class GenericPlayFabIdPair { @@ -2713,6 +2731,7 @@ public static class ListUsersCharactersResult { } + /** Contains the localized push notification content. */ public static class LocalizedPushNotificationProperties { /** Message of the localized push notification template. */ public String Message; @@ -3460,6 +3479,7 @@ public static class RevokeItemError { } + /** Represents the save push notification template request. */ public static class SavePushNotificationTemplateRequest { /** Android JSON for the notification template. */ public String AndroidPayload; @@ -3467,13 +3487,14 @@ public static class SavePushNotificationTemplateRequest { public String Id; /** IOS JSON for the notification template. */ public String IOSPayload; - /** Dictionary of localized push notification templates. */ + /** Dictionary of localized push notification templates with the language as the key. */ public Map LocalizedPushNotificationTemplates; /** Name of the push notification template. */ public String Name; } + /** Represents the save push notification template result. */ public static class SavePushNotificationTemplateResult { /** Id of the push notification template that was saved. */ public String PushNotificationTemplateId; @@ -3527,6 +3548,7 @@ public static class SendEmailFromTemplateResult { } + /** Represents the request for sending a push notification template to a recipient. */ public static class SendPushNotificationFromTemplateRequest { /** Id of the push notification template. */ public String PushNotificationTemplateId; diff --git a/PlayFabServerSDK/src/main/java/com/playfab/PlayFabSettings.java b/PlayFabServerSDK/src/main/java/com/playfab/PlayFabSettings.java index 0370b841..6b6cdb5e 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.93.190625"; - public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-3_1"; - public static String SdkVersionString = "JavaSDK-0.93.190625"; + public static String SdkVersion = "0.94.190717"; + public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-1_0"; + public static String SdkVersionString = "JavaSDK-0.94.190717"; public static Map RequestGetParams; static {