跳到主要内容

Server Data Models

Enums

BackfillStrategy

The player filling strategy when backfilling.

/// namespace: Pgos.Server
public enum BackfillStrategy
membervaluedescription
Dummy0
Custom1In this mode, the target player count of each team needs to be specified. However, the number of players per team must comply with the ruleset constraint.
MaxPossible2Backfill matchmaking will target max players as defined in ruleset and ignore expansions on player count.

BackfillStatus

Backfill matchmaking request status.

/// namespace: Pgos.Server
public enum BackfillStatus
membervaluedescription
Dummy0No ongoing or ended backfill request.
Searching1Searching player to backfill with.
Paused2Means that the backfill is suspended, normally because the battle is full. If any player leaves the battle session after the backfill is paused, the backfill status will turn to searching again.
Canceled3The backfill request is canceled.
Completed4Means that the backfill reaches target and stopped, which only happens when using Custom strategy.
Error5Means that the backfill is terminated due to mathcmaking engine failure, submit bug to us when this happened.

CreationPolicy

The player battle session creation policy.

/// namespace: Pgos.Server
public enum CreationPolicy
membervaluedescription
ALLOW_ALL0
DENY_ALL1

EctStatus

The status of ECT.

/// namespace: Pgos.Server
public enum EctStatus
membervaluedescription
Uncompleted0The ECT is in an 'Uncompleted' state, indicating that it has not yet reached the 'Done', 'Canceled', or 'Expired' state. This status implies that the ECT is still in progress or has not been completed.
Done1The status of all the actions were updated to 'SUCCESS'; consequently, the ECT's status will become 'Done'
Canceled2The ECT is canceled.
Expired3The ECT is Expired.

EctActionStatus

The status of ECT action.

/// namespace: Pgos.Server
public enum EctActionStatus
membervaluedescription
Init0The default action status when an ECT is created.
Success1The action is succeeded.
Failed2The action is failed.

PartyJoinStrategy

The strategy controls the rules who could join the party

/// namespace: Pgos.Server
public enum PartyJoinStrategy
membervaluedescription
Public0Open to anyone, it's the default strategy
OnlyFriendsOfLeader1Only friends of the leader could join the party
OnlyFriendsOfMembers2Only friends of any member could join the party
OnlyInvited3Only invited players could join the party
NotAllowed4No one can join

PartyInviteStrategy

The strategy controls the rules who could invite others to the party

/// namespace: Pgos.Server
public enum PartyInviteStrategy
membervaluedescription
AllMembersCanInvite0All members of the party can invite others, it's the default strategy
OnlyLeaderCanInvite1Only the party leader can invite others

Structs

WorldTeamInfo

Information of a team in a world battle session.

/// namespace: Pgos.Server
struct WorldTeamInfo
fieldtypedescription
team_namestringThe world team name
player_idsList<string>Players of the world team
team_capacityUInt32Max number of players in the world team

Balance

The currency in the player's wallet.

/// namespace: Pgos.Server
struct Balance
fieldtypedescription
currency_codestringThe code of the currency.
currency_namestringThe name of the currency.
currency_iconstringThe uri of the currency.
currency_typeCurrencyTypeCurrency type.
amountInt64The balance of the currency.
max_depositInt64The maximum balance that a player can hold for this currency. A value of 0 represents no limitation.

BatchGetPlayerInfoSvrRsp

Response that server batch getting playerInfo.

/// namespace: Pgos.Server
struct BatchGetPlayerInfoSvrRsp
fieldtypedescription
dataDictionary<string, PlayerDetail>Player infos, key: player_id, value: player detail.
fail_playersDictionary<string, string>Players who totally failed, key: player_id, value: failed reason.

BatchIncrOneOfPlayerKVDataRsp

The response that Performs atomic increment operation on a specific kvdata item for multiple players.

/// namespace: Pgos.Server
struct BatchIncrOneOfPlayerKVDataRsp
fieldtypedescription
dataDictionary<string, OnePlayerKVData>data after the increment, key: player_id, value: the player's new kvdata value after the updated.
failed_playersDictionary<string, PgosResult>Players who totally failed, key: player_id, value: failed reason.

KVDataGroupWithResult

A set of kvdata items.

/// namespace: Pgos.Server
struct KVDataGroupWithResult
fieldtypedescription
resultPgosResultThe result corresponding to the data in the structure: If the result.err_code is 0 (success), then the operation for the player is successful and the kvdata is the latest data. If the result.err_code is 11108 (kBackendKVDataVersionMismatched (11108)), then the operation for the player is failed and the kvdata is the latest data, you may try again with the latest version. For other values of the result.err_code, the kvdata is invalid, you can check the result.msg for detail.
versionUInt32The player-wide version of the versioned kvdata
kvdataDictionary<string, KVDataValue>KVData items, key: item key, value: item value.

BatchSetPlayerVersionedKVDataRsp

Response that updates versioned kvdata for multiple players.

/// namespace: Pgos.Server
struct BatchSetPlayerVersionedKVDataRsp
fieldtypedescription
dataDictionary<string, KVDataGroupWithResult>Results and data for each player, key: player_id, value: kvdata with result.

BatchOpenIDToPlayerIDRsp

Response of transform playerIDs of PGOS to account openIDs of external platform.

/// namespace: Pgos.Server
struct BatchOpenIDToPlayerIDRsp
fieldtypedescription
dataDictionary<string, string>Result of successful conversion, key: account openID, value: player id.
failsDictionary<string, string>Account openIDs who failed, key: account openID, value: failed reason.

BattleSession

A battle session corresponds a accessible battle

/// namespace: Pgos.Server
struct BattleSession
fieldtypedescription
battle_session_idstringThe battle session id to query
fleet_idstringThe DS fleet that battle sessions located in
battle_source_dataBattleSourceDataCreation source data of a battle session, contains information about the source type of the battle and player information filled in by the battle creator.
battle_propertiesList<BattleProperty>Custom K-V pairs of a battle session. Preset in matchmaking or world configuration of filled with lobby data
battle_session_datastringCustom string data of a battle session. Preset in matchmaking or world configuration
portInt32The port of the DS holding the battle session.
ip_addressstringThe IP address of the DS holding the battle session.
backfill_statusBackfillStatusBackfill request status.
bucket_pathDictionary<string, string>Mapping from bucket filter attribute name to attribute value. [for WORLD battle session only]
source_typeBattleSourceTypeWhat service that the battle session generated from
configuration_namestringConfiguration name of matchmaking, lobby or world service
max_playersInt32Maximum number of players in the battle session If the source of the battle session is Matchmaking, the max_players is calculated from the teams section of ruleset script If the source of the game is Lobby, the max_players is calculated from the teams section of lobby config
max_teamsInt32Maximum number of teams in the battle session Only filled when the battle session source type is BattleSourceType::World
total_playersInt32Total number of players in the battle session. Only players with a player battle session status of COMPLETED will be excluded
ruleset_namestringRuleset name hit. Filled when battle session source type is BattleSourceType::Matchmaking
lockedboolTrue if the battle session is locked by game server A battle session generated from world service could be locked/unlocked by calling Lock/UnlockWorldBattleSession.
zonestringZone where the battle session placed.
teamsDictionary<string, WorldTeamInfo>Teams info in a world battle session. Only filled when the battle session source type is BattleSourceType::World

PlayerBattleSession

A player-battle-session is a session between a player and a activated battle-session

/// namespace: Pgos.Server
struct PlayerBattleSession
fieldtypedescription
player_battle_session_idstringThe id of player session in the battle, !!! NOT BATTLE SESSION ID !!!
player_idstringThe player id
battle_session_idstringThe battle session id
statusstringPENDING The player battle session requires DS to call the ReservePlayerBattleSession interface for approval. RESERVED Reserved players can be validated through the AcceptPlayerBattleSession interface. ACTIVE Player battle session status turn to ACTIVE after AcceptPlayerBattleSession is called successfully. COMPLETED This is the terminal status of player battle session. The status will turn to COMPLETED after RemovePlayerBattleSession is called or player actively leave the battle session.
payloadstringPayload data set be game client when calling interface JoinWorldBattleSession.
created_timeInt64The Unix timestamp(in seconds) when the battle session was created.
team_namestringTeam name in a world battle session.

PlayerBattleSessionParams

/// namespace: Pgos.Server
struct PlayerBattleSessionParams
fieldtypedescription
battle_session_idstringThe battle session in which the player is participating.
player_battle_session_idstringThe session ID of the player within the battle session. Please note that this parameter is different from the battle session ID. PGOS assigns different player battle session IDs to players who join the same battle session multiple times.
player_idstringPlayer ID.

DescribePlayerBattleSessionsParams

Request info to describe player battle sessions

/// namespace: Pgos.Server
struct DescribePlayerBattleSessionsParams
fieldtypedescription
battle_session_idstringThe battle session id to query
player_battle_session_idstringThe id of player session in the battle, !!! NOT BATTLE SESSION ID !!!
offsetUInt32The next token
countUInt32The limit of the player battle sessions request

DescribePlayerBattleSessionsResult

Information about the players in the battle session.

/// namespace: Pgos.Server
struct DescribePlayerBattleSessionsResult
fieldtypedescription
next_offsetUInt32The next offset.
has_moreboolIf has more players.
total_numUInt32None-completed players count in the battle session.
player_battle_sessionsList<PlayerBattleSession>A list of player battle sessions. Empty if there's no more sessions.

GrantItem

/// namespace: Pgos.Server
struct GrantItem
fieldtypedescription
item_idstringThe id of the item will be granted.
amountUInt32The number of the item will be granted.
mutable_custom_dataDictionary<string, KVDataValue>The mutable kv data of the instance. The key must be prefixed with "int", "flt", or "str_", which respectively indicate that the value type is integer, float, or string. Max 32 keys, each key limited to 128 bytes and each value limited to 4096 bytes(in a narrow-character string).

BatchRevokeInstancesParams

Request struct for revoke instances.

/// namespace: Pgos.Server
struct BatchRevokeInstancesParams : BaseBackendEventParams

parent: BaseBackendEventParams

fieldtypedescription
player_idstringThe player whose item instance will be revoked from inventory.
instance_idsList<string>The item instance ids. Maximum array size: 99.

BatchRevokeInstancesResult

Request struct for batch revoke instances.

/// namespace: Pgos.Server
struct BatchRevokeInstancesResult
fieldtypedescription
left_amountsDictionary<string, UInt32>The number of instance remaining after this operation. key: item instance id, value: left amount.
failsDictionary<string, PgosResult>Item instances that failed to revoke. key: item instance id, value: failed reason.

GrantCurrency

/// namespace: Pgos.Server
struct GrantCurrency
fieldtypedescription
currency_codestringThe code of the currency will be granted.
amountUInt32The amount of the currency will be granted.

GrantItemToPlayerParams

Request struct for grant item to player.

/// namespace: Pgos.Server
struct GrantItemToPlayerParams : BaseBackendEventParams

parent: BaseBackendEventParams

fieldtypedescription
player_idstringThe player id who will be granted items to.
itemsList<GrantItem>The items will be granted.
idempotency_tokenstring[Optional] Used to ensure the idempotence of the function. Idempotence means that regardless of how many times the function is called, the result remains the same. By passing a unique idempotency_token, it ensures that the function does not produce duplicate side effects or results when called repeatedly. Note: To avoid generating the same idempotency_token as other players, it is recommended to concatenate it with the player_id.
pay_platform_dataPayPlatformDataThe necessary information required by the payment platform, which must be filled out when granting items contents premium currency.

GrantItemResult

/// namespace: Pgos.Server
struct GrantItemResult
fieldtypedescription
player_idstringThe player id who has been successfully granted.
item_instsItemInstPackThe item instances that have been granted.
currenciesList<Currency>The currencies that have been granted. (such as granting bundle that contains currencies)
conflict_unique_itemsList<ConflictUniqueItem>Unique items that already in inventory cause failed to be granted.
failed_currenciesDictionary<string, string>Currencies that failed to grant. Mapping from currency code to failure reason.
replayedboolWhether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idempotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call.

GrantCurrencyToPlayerParams

Request struct for grant currency to player.

/// namespace: Pgos.Server
struct GrantCurrencyToPlayerParams : BaseBackendEventParams

parent: BaseBackendEventParams

fieldtypedescription
player_idstringThe player id who will be granted currencies to.
currenciesGrantCurrencyThe currencies will be granted.
idempotency_tokenstring[Optional] Used to ensure the idempotence of the function. Idempotence means that regardless of how many times the function is called, the result remains the same. By passing a unique idempotency_token, it ensures that the function does not produce duplicate side effects or results when called repeatedly. Note: To avoid generating the same idempotency_token as other players, it is recommended to concatenate it with the player_id.
pay_platform_dataPayPlatformDataThe necessary information required by the payment platform, which must be filled out when granting premium currency.

GrantCurrencyResult

/// namespace: Pgos.Server
struct GrantCurrencyResult
fieldtypedescription
player_idstringThe player id who have been successfully granted.
replayedboolWhether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idempotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call.

GetPlayerInventoryResult

/// namespace: Pgos.Server
struct GetPlayerInventoryResult
fieldtypedescription
player_idstringThe player id whose inventory will be queried.
item_instsItemInstPackThe item instances of the query instance ids.
failsDictionary<string, string>The instance ids which was failed to query.

GetPlayerInventoryWithFilterResult

/// namespace: Pgos.Server
struct GetPlayerInventoryWithFilterResult
fieldtypedescription
player_idstringThe player id whose inventory will be queried.
item_instsItemInstPackThe item instances of the query instance ids.

SetInstanceCustomDataParams

/// namespace: Pgos.Server
struct SetInstanceCustomDataParams
fieldtypedescription
player_idstringThe player whose item instance mutable_custom_data will be updated.
instance_idstringThe item instance id.
update_dataDictionary<string, KVDataValue>Update the data of the specified keys in the mutable_custom_data. If the key does not exist, it indicates inserting new data.
delete_keysList<string>Delete the data of specified keys in the mutable_custom_data. The key from update_data cannot be included.

SetInstanceCustomDataResult

/// namespace: Pgos.Server
struct SetInstanceCustomDataResult
fieldtypedescription
mutable_custom_dataDictionary<string, KVDataValue>Latest mutable_custom_data of item instance.
versionUInt32Latest mutable_custom_data_version of item instance.

UpdatedInstanceCustomData

/// namespace: Pgos.Server
struct UpdatedInstanceCustomData
fieldtypedescription
update_dataDictionary<string, KVDataValue>Update the data of the specified keys in the mutable_custom_data. If the key does not exist, it indicates inserting new data.
delete_keysList<string>Delete the data of specified keys in the mutable_custom_data. The key from update_data cannot be included.

BatchSetInstanceCustomDataParams

/// namespace: Pgos.Server
struct BatchSetInstanceCustomDataParams
fieldtypedescription
player_idstringThe player whose item instance mutable_custom_data will be updated.
dataDictionary<string, UpdatedInstanceCustomData>The item instances to be updated. key: item instance id, value: custom data to be updated. Maximum map entries: 99.

InstanceCustomData

/// namespace: Pgos.Server
struct InstanceCustomData
fieldtypedescription
mutable_custom_dataDictionary<string, KVDataValue>Latest mutable_custom_data of item instance.
versionUInt32Latest mutable_custom_data_version of item instance.

BatchSetInstanceCustomDataResult

/// namespace: Pgos.Server
struct BatchSetInstanceCustomDataResult
fieldtypedescription
dataDictionary<string, InstanceCustomData>Latest mutable_custom_data of item instance. key: item instance id, value: latest custom data
failsDictionary<string, PgosResult>Item instances that failed to update. key: item instance id, value: failed reason.

SetInstanceCustomDataWithVersionParams

/// namespace: Pgos.Server
struct SetInstanceCustomDataWithVersionParams : SetInstanceCustomDataParams

parent: SetInstanceCustomDataParams

fieldtypedescription
versionUInt32The latest mutable_custom_data_version.

IncrInstanceCustomDataParams

/// namespace: Pgos.Server
struct IncrInstanceCustomDataParams
fieldtypedescription
player_idstringThe player id whose item instance mutable_custom_data will be updated.
instance_idstringThe item instance id.
incrementsDictionary<string, KVDataValue>Increments to update, key: kvdata key, value: increment of the value.
idempotency_tokenstring[Optional] Used to ensure the idempotence of the function. By passing a unique idempotency_token, it ensures that the function does not produce duplicate side effects or results when called repeatedly.

IncrInstanceCustomDataResult

/// namespace: Pgos.Server
struct IncrInstanceCustomDataResult
fieldtypedescription
mutable_custom_dataDictionary<string, KVDataValue>Latest mutable_custom_data of item instance.
versionUInt32Latest mutable_custom_data_version of item instance.
replayedboolWhether the request is replayed. When it is true, it indicates that the previously used idempotency_token was used, and the increment operation did not take effect. The result returns the latest mutable_custom_data and mutable_custom_data_version of the instance.

SetInstanceTagsParams

/// namespace: Pgos.Server
struct SetInstanceTagsParams
fieldtypedescription
player_idstringThe player id whose item instance tags will be updated.
instance_idstringThe item instance id.
update_dataDictionary<string, string>Update the data of the specified keys in the tags. If the key does not exist, it indicates inserting new data.
delete_keysList<string>Delete the data of specified keys in the tags. The key from update_data cannot be included.

SetInstanceTagsResult

/// namespace: Pgos.Server
struct SetInstanceTagsResult
fieldtypedescription
tagsDictionary<string, string>Latest tags of item instance.

UpdatedInstanceTags

/// namespace: Pgos.Server
struct UpdatedInstanceTags
fieldtypedescription
update_dataDictionary<string, string>Update the data of the specified keys in the tags. If the key does not exist, it indicates inserting new data.
delete_keysList<string>Delete the data of specified keys in the tags. The key from update_data cannot be included.

BatchSetInstanceTagsParams

/// namespace: Pgos.Server
struct BatchSetInstanceTagsParams
fieldtypedescription
player_idstringThe player id whose item instance tags will be updated.
dataDictionary<string, UpdatedInstanceTags>The item instances to be updated. key: item instance id, value: tags to be updated. Maximum map entries: 99.

InstanceTags

/// namespace: Pgos.Server
struct InstanceTags
fieldtypedescription
tagsDictionary<string, string>Latest tags of item instance.

BatchSetInstanceTagsResult

/// namespace: Pgos.Server
struct BatchSetInstanceTagsResult
fieldtypedescription
dataDictionary<string, InstanceTags>Latest tags of item instance.
failsDictionary<string, PgosResult>Item instances that failed to update. key: item instance id, value: failed reason.

DelBattleDataRsp

Response that delete battle data.

/// namespace: Pgos.Server
struct DelBattleDataRsp
fieldtypedescription
failsDictionary<string, string>Keys failed to delete, key: battle data keys, value: failed reason.

StartBackfillParams

/// namespace: Pgos.Server
struct StartBackfillParams
fieldtypedescription
battle_session_idstringBattle session to be backfilled.
backfill_strategyBackfillStrategyThe player filling strategy when backfilling.
custom_team_mapDictionary<string, UInt32>The target player count of each team.

CancelBackfillResult

Cancel a backfill matchmaking request

/// namespace: Pgos.Server
struct CancelBackfillResult
fieldtypedescription
canceledboolWhether the player has canceled the backfill matchmaking request

BattlePlayerOfflineEvt

The event will be triggered when the player in the battle-session is offline.

/// namespace: Pgos.Server
struct BattlePlayerOfflineEvt
fieldtypedescription
player_idstringThe player id of the player who is offline.
battle_session_idstringThe battle-session the player is in
offline_typePlayerSessionEvtThe reason why the player is offline.
offline_msgstringThe detail message for the event.

BattlePlayerBannedEvt

The event will be triggered when the player in the battle-session is banned.

/// namespace: Pgos.Server
struct BattlePlayerBannedEvt
fieldtypedescription
player_idstringThe player id of the player who is baned.
battle_session_idstringThe battle-session the player is in
ban_reasonstringReason for ban. The reason string comes from the reason string passed in when creating the ban.
ban_created_timeInt64Ban creation time.
ban_durationInt64Ban duration
ban_expired_timeInt64Ban expiration time, 0 means forever

BattleSessionUpdatedEvt

The event will be triggered when new players are added to the battle session or when the backfill status changes.

/// namespace: Pgos.Server
struct BattleSessionUpdatedEvt
fieldtypedescription
update_reasonstringThis is a string data enumeration: @BACKFILL_STATUS_CHANGED: backfill status changes @BACKFILL_ADDED_PLAYERS: new players backfilled to the battle session @WORLD_ADDED_PLAYERS: New players are added to the session by World service.
battle_session_idstringBattle session id.
backfill_statusBackfillStatusStatus for the backfilling process to the battle session.
total_playersInt32Total number of players in the battle session. Note: players with a player battle session status of COMPLETED will be excluded.
max_playersInt32Max number of players in the battle session.
backedfilled_playersList<PlayerDesc>New players add by backfill matchmaking.
new_player_battle_sessionsList<PlayerBattleSession>New players added to the battle session. For example, by the World service.
lockedboolLocked state of the battle session.

UpdateStatItemParams

/// namespace: Pgos.Server
struct UpdateStatItemParams
fieldtypedescription
itemStatItemThe stat item to update.
ignore_custom_databoolWhether update custom data. It won't overwrite the old one when updated if this is true.
ignore_tagsboolWhether update tags. It won't overwrite the old one when updated if this is true.

BatchUpdateStatItemParams

/// namespace: Pgos.Server
struct BatchUpdateStatItemParams
fieldtypedescription
itemsList<StatItem>The stat items to update.
ignore_custom_databoolWhether update custom data. It won't overwrite the old one when updated if this is true.
ignore_tagsboolWhether update tags. It won't overwrite the old one when updated if this is true.

UpdateStatItemFailInfo

Update stat item fail info.

/// namespace: Pgos.Server
struct UpdateStatItemFailInfo
fieldtypedescription
stat_namestringStat to update.
keystringThe key of the stat item to update.
err_codePgosErrCodeupdate fail error code, view pgos_error.h or PgosErrorCode.h for details.
msgstringUpdate fail error message, view pgos_error.h or PgosErrorCode.h for details.

StatItemAfterUpdate

Update stat item success info.

/// namespace: Pgos.Server
struct StatItemAfterUpdate
fieldtypedescription
latest_itemStatItemLatest stat item.
is_insertedboolIf the stat item is newly created (which means previously the key doesn't exist).
is_modifiedboolIf the stat item is updated (which depends on aggregation type and min/max value range).

BatchUpdateStatItemResult

Response for batch update stat items.

/// namespace: Pgos.Server
struct BatchUpdateStatItemResult
fieldtypedescription
itemsList<StatItemAfterUpdate>Stat items after updated.
failsList<UpdateStatItemFailInfo>Stat items that failed to update.

SetBattlePropertiesParams

/// namespace: Pgos.Server
struct SetBattlePropertiesParams
fieldtypedescription
battle_session_idstringBattle session id.
battle_propertiesList<BattleProperty>The new battle properties.

LockWorldBattleSessionParams

/// namespace: Pgos.Server
struct LockWorldBattleSessionParams
fieldtypedescription
battle_session_idstringBattle session id.

UnlockWorldBattleSessionParams

/// namespace: Pgos.Server
struct UnlockWorldBattleSessionParams
fieldtypedescription
battle_session_idstringBattle session id.

PlayerFriendsLimit

/// namespace: Pgos.Server
struct PlayerFriendsLimit
fieldtypedescription
player_idstringPlayer id.
friends_limitUInt32The maximum limit of friends player can have. (max 500 friends)

BatchSetPlayerFriendsLimitParams

/// namespace: Pgos.Server
struct BatchSetPlayerFriendsLimitParams
fieldtypedescription
player_friends_limitList<PlayerFriendsLimit>Friends limit of player.

BatchGetPlayerFriendsLimitParams

/// namespace: Pgos.Server
struct BatchGetPlayerFriendsLimitParams
fieldtypedescription
player_idsList<string>Player ids.

BatchGetPlayerFriendsLimitResult

/// namespace: Pgos.Server
struct BatchGetPlayerFriendsLimitResult
fieldtypedescription
player_friends_limitList<PlayerFriendsLimit>Friends limit of player.

SetBattleTagsParams

/// namespace: Pgos.Server
struct SetBattleTagsParams
fieldtypedescription
battle_session_idstringThe id of battle session.
tagsList<string>The tags of battle.

KVDataItemsWithReplayed

/// namespace: Pgos.Server
struct KVDataItemsWithReplayed
fieldtypedescription
kvdataDictionary<string, KVDataValue>KVData items, key: item key, value: value of the key.
replayedboolWhether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idepotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call.

KVDataIncrementsIdempotent

A set of kvdata items with a idempotency token.

/// namespace: Pgos.Server
struct KVDataIncrementsIdempotent : PlayerKVDataGroup

parent: PlayerKVDataGroup

fieldtypedescription
idempotency_tokenstring[Optional] Used to ensure the idempotence of the function. An idempotent operation produces the same outcome regardless of how many times it's executed, without causing any side effects or altering the system's state. The scope of the idempotent token is for each player.

BatchIncrPlayerKVDataIdempotentParams

/// namespace: Pgos.Server
struct BatchIncrPlayerKVDataIdempotentParams
fieldtypedescription
dataList<KVDataIncrementsIdempotent>Key: player id, value: kvdata increments of the player.

BatchIncrPlayerKVDataIdempotentResult

/// namespace: Pgos.Server
struct BatchIncrPlayerKVDataIdempotentResult
fieldtypedescription
dataDictionary<string, KVDataItemsWithReplayed>players kvdata result values map: key is player id, value is result for increment operations.
failed_playersDictionary<string, PgosResult>Failed players map: key is player id, value is error code and message.

MachineInfo

/// namespace: Pgos.Server
struct MachineInfo
fieldtypedescription
machine_idstringunique id of the machine
machine_modelstringinstance type of the machine

BuildInfo

/// namespace: Pgos.Server
struct BuildInfo
fieldtypedescription
build_idstringunique id of the build
build_namestringname of the build

DeploymentInfo

/// namespace: Pgos.Server
struct DeploymentInfo
fieldtypedescription
public_ipstringpublic ip of the game server
fleet_idstringunique id of the fleet
data_centerstringname of the data center. the possible values can be viewed in the 'DataCenterName' definition.
machine_infoMachineInfodetail information of the machine
build_infoBuildInfodetail information of the build
title_idstring
title_region_idstring

EctActionInfo

Structure to hold information about an ECT action.

/// namespace: Pgos.Server
struct EctActionInfo
fieldtypedescription
idstringThe ID of ECT action.
namestringThe name of ECT action.
idempotency_tokenstringToken for idempotency operation.
payloadstringThe userdata of operation set by game, such as parameters in JSON.
resultstringThe result of operation set by game.
statusEctActionStatusThe status of ECT action.
updated_timeInt64The last updated time of ECT action.

EctExpirationAndRetryPolicy

/// namespace: Pgos.Server
struct EctExpirationAndRetryPolicy
fieldtypedescription
expiration_durationUInt32The expiration duration for an ECT is the time period in seconds from its creation until it expires. The ECT will be marked as expired if the duration has elapsed and the ECT is uncompleted. Minimum: 60 seconds; maximum: 604800 seconds (7 days).
trigger_auto_retry_eventboolWhether the retry event of ECT is triggered to VS by PGOS if the ECT is uncompleted.
max_auto_retry_countUInt32Maximum number of retry attempts. This is only meaningful when the 'trigger_auto_retry_event' is set to true.
auto_retry_intervalUInt32The time interval in seconds between each retry attempt. The timing of the first try starts counting from the creation of the ECT. This is only meaningful when the 'trigger_auto_retry_event' is set to true. Minimum: 60 seconds; maximum: 86400 seconds (24 hours).

EctInfo

Structure to hold information about an ECT (Eventual Consistent Transaction).

/// namespace: Pgos.Server
struct EctInfo
fieldtypedescription
idstringThe ID of ECT.
namestringThe name of ECT.
payloadstringThe userdata of ECT set by game.
player_idsList<string>All players associated with the operation in this ECT.
statusEctStatusThe status of ECT.
expiration_and_retry_policyEctExpirationAndRetryPolicyWhether the retry event of ECT is triggered to VS by PGOS if the ECT is not done.
created_timeInt64The created time of ECT.
updated_timeInt64The last updated time of ECT.
actionsList<EctActionInfo>The actions of ECT.

EctActionCreateParams

/// namespace: Pgos.Server
struct EctActionCreateParams
fieldtypedescription
namestringThe name of ECT action.
payloadstringThe userdata of operation set by game, such as parameters in JSON.
idempotency_tokenstringToken for idempotency operation.

CreateEctParams

/// namespace: Pgos.Server
struct CreateEctParams
fieldtypedescription
idstringThe ID of ECT.
namestringThe name of ECT.
payloadstringThe userdata of ECT set by game.
player_idsList<string>All players associated with the operation in this ECT.
expiration_and_retry_policyEctExpirationAndRetryPolicyWhether the retry event of ECT will be triggered to VS by PGOS if the ECT is uncompleted.
actionsList<EctActionCreateParams>The actions of ECT.

EctActionUpdateParam

/// namespace: Pgos.Server
struct EctActionUpdateParam
fieldtypedescription
payloadstringUpdate action's payload.
resultstringUpdate action's result.
statusEctActionStatusUpdate action's status.

UpdateEctParams

/// namespace: Pgos.Server
struct UpdateEctParams
fieldtypedescription
idstringECT ID.
payloadstringUpdate action's payload.
action_updatesDictionary<string, EctActionUpdateParam>Update the results and status of actions. key: action ID.

UpdateEctActionsParams

/// namespace: Pgos.Server
struct UpdateEctActionsParams
fieldtypedescription
idstringECT ID.
action_updatesDictionary<string, EctActionUpdateParam>Update the results and status of actions. key: action ID.

CancelEctParams

/// namespace: Pgos.Server
struct CancelEctParams
fieldtypedescription
idstringECT ID.
reasonstringReason for cancellation.

GetEctInfoParams

/// namespace: Pgos.Server
struct GetEctInfoParams
fieldtypedescription
idstringECT ID.

GetPlayerUncompletedEctsParams

/// namespace: Pgos.Server
struct GetPlayerUncompletedEctsParams
fieldtypedescription
player_idstringThe ID of the specified player.
offsetUInt32The start position.
countUInt32The limit of the ECTs request.

GetPlayerUncompletedEctsResult

/// namespace: Pgos.Server
struct GetPlayerUncompletedEctsResult
fieldtypedescription
ect_listList<EctInfo>List of ECTs.
has_moreboolHas more.
next_offsetUInt32The next starting position of the list.
total_numUInt32The total number of uncompleted ECTs that this player has.

PushMsgToGameBackendParams

/// namespace: Pgos.Server
struct PushMsgToGameBackendParams
fieldtypedescription
msg_bus_tagstringOptional, the tag of the message bus instance to which the message is sent. If this value is not set, the messge will be sent to a random message bus instance.
msgbyte[]The message data to be sent.
extrabyte[]Optional, extra data to be delivered. For example: it can be used as a header for routing.

RPCRequestToGameBackendParams

/// namespace: Pgos.Server
struct RPCRequestToGameBackendParams
fieldtypedescription
msg_bus_tagstringOptional, the tag of the message bus instance to which the message is sent. If this value is not set, the messge will be sent to a random message bus instance.
msgbyte[]The message data to be sent.
extrabyte[]Optional, extra data to be delivered. For example: it can be used as a header for routing.
timeout_msUInt32Timeout period, in milliseconds. If this value is set to 0, the maximum value 60000 (60 seconds) will be used.

RPCResponse

/// namespace: Pgos.Server
struct RPCResponse
fieldtypedescription
responsebyte[]The response of an RPC request.

GameBackendMsgEvt

Event info when received msg from the game backend.

/// namespace: Pgos.Server
struct GameBackendMsgEvt
fieldtypedescription
msg_bus_tagstringThe tag of the message bus instance from which the message is received.
msgbyte[]Message data sent by the game via PgosMsgBusSDK.

HTTPAPIMsgEvt

Event info when received msg the PGOS backend HTTP API.

/// namespace: Pgos.Server
struct HTTPAPIMsgEvt
fieldtypedescription
msgbyte[]Message data sent by the game via backend HTTP API.
extrabyte[]Extra data sent by the game via backend HTTP API.

SubtractCurrency

/// namespace: Pgos.Server
struct SubtractCurrency
fieldtypedescription
currency_codestringThe code of the currency will be subtracted.
amountUInt32The amount of the currency will be subtracted.

SubtractPlayerCurrencyParams

/// namespace: Pgos.Server
struct SubtractPlayerCurrencyParams : BaseBackendEventParams

parent: BaseBackendEventParams

fieldtypedescription
player_idstringPlayers whose balance will be subtracted.
subtract_currencySubtractCurrencyInformation about the subtracted currency.
idempotency_tokenstring[Optional] Used to ensure the idempotence of the function. Idempotence means that regardless of how many times the function is called, the result remains the same. By passing a unique idempotency_token, it ensures that the function does not produce duplicate side effects or results when called repeatedly. Note: To avoid generating the same idempotency_token as other players, it is recommended to concatenate it with the player_id.
pay_platform_dataPayPlatformDataThe necessary information required by the payment platform, which must be filled out when deducting premium currency.

SubtractPlayerCurrencyResult

/// namespace: Pgos.Server
struct SubtractPlayerCurrencyResult
fieldtypedescription
player_idstringThe player id who have been successfully granted.
replayedboolWhether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idempotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call.

GetPlayerBalanceParams

/// namespace: Pgos.Server
struct GetPlayerBalanceParams
fieldtypedescription
player_idstring
pay_platform_dataPayPlatformDataThe necessary information required by the payment platform, which must be filled out when deducting premium currency.

GetPlayerBalanceResult

/// namespace: Pgos.Server
struct GetPlayerBalanceResult
fieldtypedescription
currenciesList<Balance>All virtual currency balance of the player.

BatchGrantVirtualCurrenciesToPlayerParams

Request struct for batch grant currency to player.

/// namespace: Pgos.Server
struct BatchGrantVirtualCurrenciesToPlayerParams : BaseBackendEventParams

parent: BaseBackendEventParams

fieldtypedescription
player_idstringThe player id who will be granted currencies to.
granted_currenciesList<GrantCurrency>The virtual currencies will be granted.
idempotency_tokenstring[Optional] Used to ensure the idempotence of the function. Idempotence means that regardless of how many times the function is called, the result remains the same. By passing a unique idempotency_token, it ensures that the function does not produce duplicate side effects or results when called repeatedly. Note: To avoid generating the same idempotency_token as other players, it is recommended to concatenate it with the player_id.

BatchGrantVirtualCurrenciesToPlayerResult

/// namespace: Pgos.Server
struct BatchGrantVirtualCurrenciesToPlayerResult
fieldtypedescription
player_idstringThe player id who have been successfully granted.
replayedboolWhether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idempotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call.

BatchSubtractPlayerVirtualCurrenciesParams

/// namespace: Pgos.Server
struct BatchSubtractPlayerVirtualCurrenciesParams : BaseBackendEventParams

parent: BaseBackendEventParams

fieldtypedescription
player_idstringPlayers whose balance will be subtracted.
subtract_currenciesList<SubtractCurrency>The virtual currencies to be granted.
idempotency_tokenstring[Optional] Used to ensure the idempotence of the function. Idempotence means that regardless of how many times the function is called, the result remains the same. By passing a unique idempotency_token, it ensures that the function does not produce duplicate side effects or results when called repeatedly. Note: To avoid generating the same idempotency_token as other players, it is recommended to concatenate it with the player_id.

BatchSubtractPlayerVirtualCurrenciesResult

/// namespace: Pgos.Server
struct BatchSubtractPlayerVirtualCurrenciesResult
fieldtypedescription
player_idstringThe player id who have been successfully granted.
replayedboolWhether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idempotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call.

PartyCustomData

Custom data for party.

/// namespace: Pgos.Server
struct PartyCustomData
fieldtypedescription
versionintCustom data version, always incremental over the lifetime of the party.
global_custom_datastringGlobal custom data. Only Leader has permission to modify it.
player_custom_dataDictionary<string, string>Player custom data. The map key is party member's player ID, the map value is the party member's custom data. Each party member could modify it's player custom data.

PartyInfo

Detailed information of a party

/// namespace: Pgos.Server
struct PartyInfo
fieldtypedescription
party_idstringThe party id
namestringName of the party
leaderPlayerInfoPlayer who is the leader of the party A leader can: Kick out members: a leader can kick out any member at any time. Dismiss the party. Transfer leadership to another member.
membersList<PlayerInfo>Players of the party
created_timeInt64The Unix timestamp(in seconds) when the party was created.
max_playerUInt32Max number of players in the party, unlimited if it is 0.
custom_dataPartyCustomDataCustom data of the party(including global and player).
join_strategyPartyJoinStrategyThe strategy controls the rules who could join the party.
invite_strategyPartyInviteStrategyThe strategy controls the rules who could invite others to the party.

BatchGetPlayerCurrentPartyIdsParams

/// namespace: Pgos.Server
struct BatchGetPlayerCurrentPartyIdsParams
fieldtypedescription
player_idsList<string>The player ids.

BatchGetPlayerCurrentPartyIdsResult

/// namespace: Pgos.Server
struct BatchGetPlayerCurrentPartyIdsResult
fieldtypedescription
player_party_idsDictionary<string, string>The map of player -> party ids, the empty value implies the player is not in any party.

GetPartyInfoParams

/// namespace: Pgos.Server
struct GetPartyInfoParams
fieldtypedescription
party_idstringThe player id.

GetPartyInfoResult

/// namespace: Pgos.Server
struct GetPartyInfoResult
fieldtypedescription
party_infoPartyInfoThe party info.

GetPlayerInventoryWithFilterParams

Get inventory with filter params.

/// namespace: Pgos.Server
struct GetPlayerInventoryWithFilterParams
fieldtypedescription
player_idstringThe player id.
item_typesList<InGameItemType>Item types to get
item_tagsList<TagDataFilter>Item tags to get
item_instance_tagsList<TagDataFilter>Item instance tags to get
uniqueBooleanFilterFilter by unique item
stackableBooleanFilterFilter by stackable item
consumableBooleanFilterFilter by consumable item