Server Data Models
Enums
BackfillStrategy
The player filling strategy when backfilling.
/// namespace: Pgos.Server
public enum BackfillStrategy
| member | value | description |
|---|
| Dummy | 0 | |
| Custom | 1 | In 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. |
| MaxPossible | 2 | Backfill 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
| member | value | description |
|---|
| Dummy | 0 | No ongoing or ended backfill request. |
| Searching | 1 | Searching player to backfill with. |
| Paused | 2 | Means 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. |
| Canceled | 3 | The backfill request is canceled. |
| Completed | 4 | Means that the backfill reaches target and stopped, which only happens when using Custom strategy. |
| Error | 5 | Means 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
| member | value | description |
|---|
| ALLOW_ALL | 0 | |
| DENY_ALL | 1 | |
EctStatus
The status of ECT.
/// namespace: Pgos.Server
public enum EctStatus
| member | value | description |
|---|
| Uncompleted | 0 | The 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. |
| Done | 1 | The status of all the actions were updated to 'SUCCESS'; consequently, the ECT's status will become 'Done' |
| Canceled | 2 | The ECT is canceled. |
| Expired | 3 | The ECT is Expired. |
EctActionStatus
The status of ECT action.
/// namespace: Pgos.Server
public enum EctActionStatus
| member | value | description |
|---|
| Init | 0 | The default action status when an ECT is created. |
| Success | 1 | The action is succeeded. |
| Failed | 2 | The action is failed. |
PartyJoinStrategy
The strategy controls the rules who could join the party
/// namespace: Pgos.Server
public enum PartyJoinStrategy
| member | value | description |
|---|
| Public | 0 | Open to anyone, it's the default strategy |
| OnlyFriendsOfLeader | 1 | Only friends of the leader could join the party |
| OnlyFriendsOfMembers | 2 | Only friends of any member could join the party |
| OnlyInvited | 3 | Only invited players could join the party |
| NotAllowed | 4 | No one can join |
PartyInviteStrategy
The strategy controls the rules who could invite others to the party
/// namespace: Pgos.Server
public enum PartyInviteStrategy
| member | value | description |
|---|
| AllMembersCanInvite | 0 | All members of the party can invite others, it's the default strategy |
| OnlyLeaderCanInvite | 1 | Only the party leader can invite others |
Structs
WorldTeamInfo
Information of a team in a world battle session.
/// namespace: Pgos.Server
struct WorldTeamInfo
| field | type | description |
|---|
| team_name | string | The world team name |
| player_ids | List<string> | Players of the world team |
| team_capacity | UInt32 | Max number of players in the world team |
Balance
The currency in the player's wallet.
/// namespace: Pgos.Server
struct Balance
| field | type | description |
|---|
| currency_code | string | The code of the currency. |
| currency_name | string | The name of the currency. |
| currency_icon | string | The uri of the currency. |
| currency_type | CurrencyType | Currency type. |
| amount | Int64 | The balance of the currency. |
| max_deposit | Int64 | The 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
| field | type | description |
|---|
| data | Dictionary<string, PlayerDetail> | Player infos, key: player_id, value: player detail. |
| fail_players | Dictionary<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
| field | type | description |
|---|
| data | Dictionary<string, OnePlayerKVData> | data after the increment, key: player_id, value: the player's new kvdata value after the updated. |
| failed_players | Dictionary<string, PgosResult> | Players who totally failed, key: player_id, value: failed reason. |
KVDataGroupWithResult
A set of kvdata items.
/// namespace: Pgos.Server
struct KVDataGroupWithResult
| field | type | description |
|---|
| result | PgosResult | The 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. |
| version | UInt32 | The player-wide version of the versioned kvdata |
| kvdata | Dictionary<string, KVDataValue> | KVData items, key: item key, value: item value. |
BatchSetPlayerVersionedKVDataRsp
Response that updates versioned kvdata for multiple players.
/// namespace: Pgos.Server
struct BatchSetPlayerVersionedKVDataRsp
| field | type | description |
|---|
| data | Dictionary<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
| field | type | description |
|---|
| data | Dictionary<string, string> | Result of successful conversion, key: account openID, value: player id. |
| fails | Dictionary<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
| field | type | description |
|---|
| battle_session_id | string | The battle session id to query |
| fleet_id | string | The DS fleet that battle sessions located in |
| battle_source_data | BattleSourceData | Creation 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_properties | List<BattleProperty> | Custom K-V pairs of a battle session. Preset in matchmaking or world configuration of filled with lobby data |
| battle_session_data | string | Custom string data of a battle session. Preset in matchmaking or world configuration |
| port | Int32 | The port of the DS holding the battle session. |
| ip_address | string | The IP address of the DS holding the battle session. |
| backfill_status | BackfillStatus | Backfill request status. |
| bucket_path | Dictionary<string, string> | Mapping from bucket filter attribute name to attribute value. [for WORLD battle session only] |
| source_type | BattleSourceType | What service that the battle session generated from |
| configuration_name | string | Configuration name of matchmaking, lobby or world service |
| max_players | Int32 | Maximum 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_teams | Int32 | Maximum number of teams in the battle session Only filled when the battle session source type is BattleSourceType::World |
| total_players | Int32 | Total number of players in the battle session. Only players with a player battle session status of COMPLETED will be excluded |
| ruleset_name | string | Ruleset name hit. Filled when battle session source type is BattleSourceType::Matchmaking |
| locked | bool | True if the battle session is locked by game server A battle session generated from world service could be locked/unlocked by calling Lock/UnlockWorldBattleSession. |
| zone | string | Zone where the battle session placed. |
| teams | Dictionary<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
| field | type | description |
|---|
| player_battle_session_id | string | The id of player session in the battle, !!! NOT BATTLE SESSION ID !!! |
| player_id | string | The player id |
| battle_session_id | string | The battle session id |
| status | string | PENDING 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. |
| payload | string | Payload data set be game client when calling interface JoinWorldBattleSession. |
| created_time | Int64 | The Unix timestamp(in seconds) when the battle session was created. |
| team_name | string | Team name in a world battle session. |
PlayerBattleSessionParams
/// namespace: Pgos.Server
struct PlayerBattleSessionParams
| field | type | description |
|---|
| battle_session_id | string | The battle session in which the player is participating. |
| player_battle_session_id | string | The 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_id | string | Player ID. |
DescribePlayerBattleSessionsParams
Request info to describe player battle sessions
/// namespace: Pgos.Server
struct DescribePlayerBattleSessionsParams
| field | type | description |
|---|
| battle_session_id | string | The battle session id to query |
| player_battle_session_id | string | The id of player session in the battle, !!! NOT BATTLE SESSION ID !!! |
| offset | UInt32 | The next token |
| count | UInt32 | The limit of the player battle sessions request |
DescribePlayerBattleSessionsResult
Information about the players in the battle session.
/// namespace: Pgos.Server
struct DescribePlayerBattleSessionsResult
| field | type | description |
|---|
| next_offset | UInt32 | The next offset. |
| has_more | bool | If has more players. |
| total_num | UInt32 | None-completed players count in the battle session. |
| player_battle_sessions | List<PlayerBattleSession> | A list of player battle sessions. Empty if there's no more sessions. |
GrantItem
/// namespace: Pgos.Server
struct GrantItem
| field | type | description |
|---|
| item_id | string | The id of the item will be granted. |
| amount | UInt32 | The number of the item will be granted. |
| mutable_custom_data | Dictionary<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
| field | type | description |
|---|
| player_id | string | The player whose item instance will be revoked from inventory. |
| instance_ids | List<string> | The item instance ids. Maximum array size: 99. |
BatchRevokeInstancesResult
Request struct for batch revoke instances.
/// namespace: Pgos.Server
struct BatchRevokeInstancesResult
| field | type | description |
|---|
| left_amounts | Dictionary<string, UInt32> | The number of instance remaining after this operation. key: item instance id, value: left amount. |
| fails | Dictionary<string, PgosResult> | Item instances that failed to revoke. key: item instance id, value: failed reason. |
GrantCurrency
/// namespace: Pgos.Server
struct GrantCurrency
| field | type | description |
|---|
| currency_code | string | The code of the currency will be granted. |
| amount | UInt32 | The amount of the currency will be granted. |
GrantItemToPlayerParams
Request struct for grant item to player.
/// namespace: Pgos.Server
struct GrantItemToPlayerParams : BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| player_id | string | The player id who will be granted items to. |
| items | List<GrantItem> | The items will be granted. |
| idempotency_token | string | [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_data | PayPlatformData | The necessary information required by the payment platform, which must be filled out when granting items contents premium currency. |
GrantItemResult
/// namespace: Pgos.Server
struct GrantItemResult
| field | type | description |
|---|
| player_id | string | The player id who has been successfully granted. |
| item_insts | ItemInstPack | The item instances that have been granted. |
| currencies | List<Currency> | The currencies that have been granted. (such as granting bundle that contains currencies) |
| conflict_unique_items | List<ConflictUniqueItem> | Unique items that already in inventory cause failed to be granted. |
| failed_currencies | Dictionary<string, string> | Currencies that failed to grant. Mapping from currency code to failure reason. |
| replayed | bool | Whether 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
| field | type | description |
|---|
| player_id | string | The player id who will be granted currencies to. |
| currencies | GrantCurrency | The currencies will be granted. |
| idempotency_token | string | [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_data | PayPlatformData | The necessary information required by the payment platform, which must be filled out when granting premium currency. |
GrantCurrencyResult
/// namespace: Pgos.Server
struct GrantCurrencyResult
| field | type | description |
|---|
| player_id | string | The player id who have been successfully granted. |
| replayed | bool | Whether 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
| field | type | description |
|---|
| player_id | string | The player id whose inventory will be queried. |
| item_insts | ItemInstPack | The item instances of the query instance ids. |
| fails | Dictionary<string, string> | The instance ids which was failed to query. |
GetPlayerInventoryWithFilterResult
/// namespace: Pgos.Server
struct GetPlayerInventoryWithFilterResult
| field | type | description |
|---|
| player_id | string | The player id whose inventory will be queried. |
| item_insts | ItemInstPack | The item instances of the query instance ids. |
SetInstanceCustomDataParams
/// namespace: Pgos.Server
struct SetInstanceCustomDataParams
| field | type | description |
|---|
| player_id | string | The player whose item instance mutable_custom_data will be updated. |
| instance_id | string | The item instance id. |
| update_data | Dictionary<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_keys | List<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
| field | type | description |
|---|
| mutable_custom_data | Dictionary<string, KVDataValue> | Latest mutable_custom_data of item instance. |
| version | UInt32 | Latest mutable_custom_data_version of item instance. |
UpdatedInstanceCustomData
/// namespace: Pgos.Server
struct UpdatedInstanceCustomData
| field | type | description |
|---|
| update_data | Dictionary<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_keys | List<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
| field | type | description |
|---|
| player_id | string | The player whose item instance mutable_custom_data will be updated. |
| data | Dictionary<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
| field | type | description |
|---|
| mutable_custom_data | Dictionary<string, KVDataValue> | Latest mutable_custom_data of item instance. |
| version | UInt32 | Latest mutable_custom_data_version of item instance. |
BatchSetInstanceCustomDataResult
/// namespace: Pgos.Server
struct BatchSetInstanceCustomDataResult
| field | type | description |
|---|
| data | Dictionary<string, InstanceCustomData> | Latest mutable_custom_data of item instance. key: item instance id, value: latest custom data |
| fails | Dictionary<string, PgosResult> | Item instances that failed to update. key: item instance id, value: failed reason. |
SetInstanceCustomDataWithVersionParams
/// namespace: Pgos.Server
struct SetInstanceCustomDataWithVersionParams : SetInstanceCustomDataParams
parent: SetInstanceCustomDataParams
| field | type | description |
|---|
| version | UInt32 | The latest mutable_custom_data_version. |
IncrInstanceCustomDataParams
/// namespace: Pgos.Server
struct IncrInstanceCustomDataParams
| field | type | description |
|---|
| player_id | string | The player id whose item instance mutable_custom_data will be updated. |
| instance_id | string | The item instance id. |
| increments | Dictionary<string, KVDataValue> | Increments to update, key: kvdata key, value: increment of the value. |
| idempotency_token | string | [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
| field | type | description |
|---|
| mutable_custom_data | Dictionary<string, KVDataValue> | Latest mutable_custom_data of item instance. |
| version | UInt32 | Latest mutable_custom_data_version of item instance. |
| replayed | bool | Whether 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. |
/// namespace: Pgos.Server
struct SetInstanceTagsParams
| field | type | description |
|---|
| player_id | string | The player id whose item instance tags will be updated. |
| instance_id | string | The item instance id. |
| update_data | Dictionary<string, string> | Update the data of the specified keys in the tags. If the key does not exist, it indicates inserting new data. |
| delete_keys | List<string> | Delete the data of specified keys in the tags. The key from update_data cannot be included. |
/// namespace: Pgos.Server
struct SetInstanceTagsResult
| field | type | description |
|---|
| tags | Dictionary<string, string> | Latest tags of item instance. |
/// namespace: Pgos.Server
struct UpdatedInstanceTags
| field | type | description |
|---|
| update_data | Dictionary<string, string> | Update the data of the specified keys in the tags. If the key does not exist, it indicates inserting new data. |
| delete_keys | List<string> | Delete the data of specified keys in the tags. The key from update_data cannot be included. |
/// namespace: Pgos.Server
struct BatchSetInstanceTagsParams
| field | type | description |
|---|
| player_id | string | The player id whose item instance tags will be updated. |
| data | Dictionary<string, UpdatedInstanceTags> | The item instances to be updated. key: item instance id, value: tags to be updated. Maximum map entries: 99. |
/// namespace: Pgos.Server
struct InstanceTags
| field | type | description |
|---|
| tags | Dictionary<string, string> | Latest tags of item instance. |
/// namespace: Pgos.Server
struct BatchSetInstanceTagsResult
| field | type | description |
|---|
| data | Dictionary<string, InstanceTags> | Latest tags of item instance. |
| fails | Dictionary<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
| field | type | description |
|---|
| fails | Dictionary<string, string> | Keys failed to delete, key: battle data keys, value: failed reason. |
StartBackfillParams
/// namespace: Pgos.Server
struct StartBackfillParams
| field | type | description |
|---|
| battle_session_id | string | Battle session to be backfilled. |
| backfill_strategy | BackfillStrategy | The player filling strategy when backfilling. |
| custom_team_map | Dictionary<string, UInt32> | The target player count of each team. |
CancelBackfillResult
Cancel a backfill matchmaking request
/// namespace: Pgos.Server
struct CancelBackfillResult
| field | type | description |
|---|
| canceled | bool | Whether 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
| field | type | description |
|---|
| player_id | string | The player id of the player who is offline. |
| battle_session_id | string | The battle-session the player is in |
| offline_type | PlayerSessionEvt | The reason why the player is offline. |
| offline_msg | string | The 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
| field | type | description |
|---|
| player_id | string | The player id of the player who is baned. |
| battle_session_id | string | The battle-session the player is in |
| ban_reason | string | Reason for ban. The reason string comes from the reason string passed in when creating the ban. |
| ban_created_time | Int64 | Ban creation time. |
| ban_duration | Int64 | Ban duration |
| ban_expired_time | Int64 | Ban 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
| field | type | description |
|---|
| update_reason | string | This 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_id | string | Battle session id. |
| backfill_status | BackfillStatus | Status for the backfilling process to the battle session. |
| total_players | Int32 | Total number of players in the battle session. Note: players with a player battle session status of COMPLETED will be excluded. |
| max_players | Int32 | Max number of players in the battle session. |
| backedfilled_players | List<PlayerDesc> | New players add by backfill matchmaking. |
| new_player_battle_sessions | List<PlayerBattleSession> | New players added to the battle session. For example, by the World service. |
| locked | bool | Locked state of the battle session. |
UpdateStatItemParams
/// namespace: Pgos.Server
struct UpdateStatItemParams
| field | type | description |
|---|
| item | StatItem | The stat item to update. |
| ignore_custom_data | bool | Whether update custom data. It won't overwrite the old one when updated if this is true. |
| ignore_tags | bool | Whether update tags. It won't overwrite the old one when updated if this is true. |
BatchUpdateStatItemParams
/// namespace: Pgos.Server
struct BatchUpdateStatItemParams
| field | type | description |
|---|
| items | List<StatItem> | The stat items to update. |
| ignore_custom_data | bool | Whether update custom data. It won't overwrite the old one when updated if this is true. |
| ignore_tags | bool | Whether 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
| field | type | description |
|---|
| stat_name | string | Stat to update. |
| key | string | The key of the stat item to update. |
| err_code | PgosErrCode | update fail error code, view pgos_error.h or PgosErrorCode.h for details. |
| msg | string | Update fail error message, view pgos_error.h or PgosErrorCode.h for details. |
StatItemAfterUpdate
Update stat item success info.
/// namespace: Pgos.Server
struct StatItemAfterUpdate
| field | type | description |
|---|
| latest_item | StatItem | Latest stat item. |
| is_inserted | bool | If the stat item is newly created (which means previously the key doesn't exist). |
| is_modified | bool | If 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
SetBattlePropertiesParams
/// namespace: Pgos.Server
struct SetBattlePropertiesParams
| field | type | description |
|---|
| battle_session_id | string | Battle session id. |
| battle_properties | List<BattleProperty> | The new battle properties. |
LockWorldBattleSessionParams
/// namespace: Pgos.Server
struct LockWorldBattleSessionParams
| field | type | description |
|---|
| battle_session_id | string | Battle session id. |
UnlockWorldBattleSessionParams
/// namespace: Pgos.Server
struct UnlockWorldBattleSessionParams
| field | type | description |
|---|
| battle_session_id | string | Battle session id. |
PlayerFriendsLimit
/// namespace: Pgos.Server
struct PlayerFriendsLimit
| field | type | description |
|---|
| player_id | string | Player id. |
| friends_limit | UInt32 | The maximum limit of friends player can have. (max 500 friends) |
BatchSetPlayerFriendsLimitParams
/// namespace: Pgos.Server
struct BatchSetPlayerFriendsLimitParams
BatchGetPlayerFriendsLimitParams
/// namespace: Pgos.Server
struct BatchGetPlayerFriendsLimitParams
| field | type | description |
|---|
| player_ids | List<string> | Player ids. |
BatchGetPlayerFriendsLimitResult
/// namespace: Pgos.Server
struct BatchGetPlayerFriendsLimitResult
/// namespace: Pgos.Server
struct SetBattleTagsParams
| field | type | description |
|---|
| battle_session_id | string | The id of battle session. |
| tags | List<string> | The tags of battle. |
KVDataItemsWithReplayed
/// namespace: Pgos.Server
struct KVDataItemsWithReplayed
| field | type | description |
|---|
| kvdata | Dictionary<string, KVDataValue> | KVData items, key: item key, value: value of the key. |
| replayed | bool | Whether 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
| field | type | description |
|---|
| idempotency_token | string | [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
BatchIncrPlayerKVDataIdempotentResult
/// namespace: Pgos.Server
struct BatchIncrPlayerKVDataIdempotentResult
| field | type | description |
|---|
| data | Dictionary<string, KVDataItemsWithReplayed> | players kvdata result values map: key is player id, value is result for increment operations. |
| failed_players | Dictionary<string, PgosResult> | Failed players map: key is player id, value is error code and message. |
MachineInfo
/// namespace: Pgos.Server
struct MachineInfo
| field | type | description |
|---|
| machine_id | string | unique id of the machine |
| machine_model | string | instance type of the machine |
BuildInfo
/// namespace: Pgos.Server
struct BuildInfo
| field | type | description |
|---|
| build_id | string | unique id of the build |
| build_name | string | name of the build |
DeploymentInfo
/// namespace: Pgos.Server
struct DeploymentInfo
| field | type | description |
|---|
| public_ip | string | public ip of the game server |
| fleet_id | string | unique id of the fleet |
| data_center | string | name of the data center. the possible values can be viewed in the 'DataCenterName' definition. |
| machine_info | MachineInfo | detail information of the machine |
| build_info | BuildInfo | detail information of the build |
| title_id | string | |
| title_region_id | string | |
EctActionInfo
Structure to hold information about an ECT action.
/// namespace: Pgos.Server
struct EctActionInfo
| field | type | description |
|---|
| id | string | The ID of ECT action. |
| name | string | The name of ECT action. |
| idempotency_token | string | Token for idempotency operation. |
| payload | string | The userdata of operation set by game, such as parameters in JSON. |
| result | string | The result of operation set by game. |
| status | EctActionStatus | The status of ECT action. |
| updated_time | Int64 | The last updated time of ECT action. |
EctExpirationAndRetryPolicy
/// namespace: Pgos.Server
struct EctExpirationAndRetryPolicy
| field | type | description |
|---|
| expiration_duration | UInt32 | The 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_event | bool | Whether the retry event of ECT is triggered to VS by PGOS if the ECT is uncompleted. |
| max_auto_retry_count | UInt32 | Maximum number of retry attempts. This is only meaningful when the 'trigger_auto_retry_event' is set to true. |
| auto_retry_interval | UInt32 | The 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
| field | type | description |
|---|
| id | string | The ID of ECT. |
| name | string | The name of ECT. |
| payload | string | The userdata of ECT set by game. |
| player_ids | List<string> | All players associated with the operation in this ECT. |
| status | EctStatus | The status of ECT. |
| expiration_and_retry_policy | EctExpirationAndRetryPolicy | Whether the retry event of ECT is triggered to VS by PGOS if the ECT is not done. |
| created_time | Int64 | The created time of ECT. |
| updated_time | Int64 | The last updated time of ECT. |
| actions | List<EctActionInfo> | The actions of ECT. |
EctActionCreateParams
/// namespace: Pgos.Server
struct EctActionCreateParams
| field | type | description |
|---|
| name | string | The name of ECT action. |
| payload | string | The userdata of operation set by game, such as parameters in JSON. |
| idempotency_token | string | Token for idempotency operation. |
CreateEctParams
/// namespace: Pgos.Server
struct CreateEctParams
| field | type | description |
|---|
| id | string | The ID of ECT. |
| name | string | The name of ECT. |
| payload | string | The userdata of ECT set by game. |
| player_ids | List<string> | All players associated with the operation in this ECT. |
| expiration_and_retry_policy | EctExpirationAndRetryPolicy | Whether the retry event of ECT will be triggered to VS by PGOS if the ECT is uncompleted. |
| actions | List<EctActionCreateParams> | The actions of ECT. |
EctActionUpdateParam
/// namespace: Pgos.Server
struct EctActionUpdateParam
| field | type | description |
|---|
| payload | string | Update action's payload. |
| result | string | Update action's result. |
| status | EctActionStatus | Update action's status. |
UpdateEctParams
/// namespace: Pgos.Server
struct UpdateEctParams
| field | type | description |
|---|
| id | string | ECT ID. |
| payload | string | Update action's payload. |
| action_updates | Dictionary<string, EctActionUpdateParam> | Update the results and status of actions. key: action ID. |
UpdateEctActionsParams
/// namespace: Pgos.Server
struct UpdateEctActionsParams
| field | type | description |
|---|
| id | string | ECT ID. |
| action_updates | Dictionary<string, EctActionUpdateParam> | Update the results and status of actions. key: action ID. |
CancelEctParams
/// namespace: Pgos.Server
struct CancelEctParams
| field | type | description |
|---|
| id | string | ECT ID. |
| reason | string | Reason for cancellation. |
GetEctInfoParams
/// namespace: Pgos.Server
struct GetEctInfoParams
| field | type | description |
|---|
| id | string | ECT ID. |
GetPlayerUncompletedEctsParams
/// namespace: Pgos.Server
struct GetPlayerUncompletedEctsParams
| field | type | description |
|---|
| player_id | string | The ID of the specified player. |
| offset | UInt32 | The start position. |
| count | UInt32 | The limit of the ECTs request. |
GetPlayerUncompletedEctsResult
/// namespace: Pgos.Server
struct GetPlayerUncompletedEctsResult
| field | type | description |
|---|
| ect_list | List<EctInfo> | List of ECTs. |
| has_more | bool | Has more. |
| next_offset | UInt32 | The next starting position of the list. |
| total_num | UInt32 | The total number of uncompleted ECTs that this player has. |
PushMsgToGameBackendParams
/// namespace: Pgos.Server
struct PushMsgToGameBackendParams
| field | type | description |
|---|
| msg_bus_tag | string | Optional, 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. |
| msg | byte[] | The message data to be sent. |
| extra | byte[] | Optional, extra data to be delivered. For example: it can be used as a header for routing. |
RPCRequestToGameBackendParams
/// namespace: Pgos.Server
struct RPCRequestToGameBackendParams
| field | type | description |
|---|
| msg_bus_tag | string | Optional, 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. |
| msg | byte[] | The message data to be sent. |
| extra | byte[] | Optional, extra data to be delivered. For example: it can be used as a header for routing. |
| timeout_ms | UInt32 | Timeout 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
| field | type | description |
|---|
| response | byte[] | The response of an RPC request. |
GameBackendMsgEvt
Event info when received msg from the game backend.
/// namespace: Pgos.Server
struct GameBackendMsgEvt
| field | type | description |
|---|
| msg_bus_tag | string | The tag of the message bus instance from which the message is received. |
| msg | byte[] | Message data sent by the game via PgosMsgBusSDK. |
HTTPAPIMsgEvt
Event info when received msg the PGOS backend HTTP API.
/// namespace: Pgos.Server
struct HTTPAPIMsgEvt
| field | type | description |
|---|
| msg | byte[] | Message data sent by the game via backend HTTP API. |
| extra | byte[] | Extra data sent by the game via backend HTTP API. |
SubtractCurrency
/// namespace: Pgos.Server
struct SubtractCurrency
| field | type | description |
|---|
| currency_code | string | The code of the currency will be subtracted. |
| amount | UInt32 | The amount of the currency will be subtracted. |
SubtractPlayerCurrencyParams
/// namespace: Pgos.Server
struct SubtractPlayerCurrencyParams : BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| player_id | string | Players whose balance will be subtracted. |
| subtract_currency | SubtractCurrency | Information about the subtracted currency. |
| idempotency_token | string | [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_data | PayPlatformData | The necessary information required by the payment platform, which must be filled out when deducting premium currency. |
SubtractPlayerCurrencyResult
/// namespace: Pgos.Server
struct SubtractPlayerCurrencyResult
| field | type | description |
|---|
| player_id | string | The player id who have been successfully granted. |
| replayed | bool | Whether 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
| field | type | description |
|---|
| player_id | string | |
| pay_platform_data | PayPlatformData | The necessary information required by the payment platform, which must be filled out when deducting premium currency. |
GetPlayerBalanceResult
/// namespace: Pgos.Server
struct GetPlayerBalanceResult
| field | type | description |
|---|
| currencies | List<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
| field | type | description |
|---|
| player_id | string | The player id who will be granted currencies to. |
| granted_currencies | List<GrantCurrency> | The virtual currencies will be granted. |
| idempotency_token | string | [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
| field | type | description |
|---|
| player_id | string | The player id who have been successfully granted. |
| replayed | bool | Whether 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
| field | type | description |
|---|
| player_id | string | Players whose balance will be subtracted. |
| subtract_currencies | List<SubtractCurrency> | The virtual currencies to be granted. |
| idempotency_token | string | [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
| field | type | description |
|---|
| player_id | string | The player id who have been successfully granted. |
| replayed | bool | Whether 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
| field | type | description |
|---|
| version | int | Custom data version, always incremental over the lifetime of the party. |
| global_custom_data | string | Global custom data. Only Leader has permission to modify it. |
| player_custom_data | Dictionary<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
| field | type | description |
|---|
| party_id | string | The party id |
| name | string | Name of the party |
| leader | PlayerInfo | Player 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. |
| members | List<PlayerInfo> | Players of the party |
| created_time | Int64 | The Unix timestamp(in seconds) when the party was created. |
| max_player | UInt32 | Max number of players in the party, unlimited if it is 0. |
| custom_data | PartyCustomData | Custom data of the party(including global and player). |
| join_strategy | PartyJoinStrategy | The strategy controls the rules who could join the party. |
| invite_strategy | PartyInviteStrategy | The strategy controls the rules who could invite others to the party. |
BatchGetPlayerCurrentPartyIdsParams
/// namespace: Pgos.Server
struct BatchGetPlayerCurrentPartyIdsParams
| field | type | description |
|---|
| player_ids | List<string> | The player ids. |
BatchGetPlayerCurrentPartyIdsResult
/// namespace: Pgos.Server
struct BatchGetPlayerCurrentPartyIdsResult
| field | type | description |
|---|
| player_party_ids | Dictionary<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
| field | type | description |
|---|
| party_id | string | The player id. |
GetPartyInfoResult
/// namespace: Pgos.Server
struct GetPartyInfoResult
| field | type | description |
|---|
| party_info | PartyInfo | The party info. |
GetPlayerInventoryWithFilterParams
Get inventory with filter params.
/// namespace: Pgos.Server
struct GetPlayerInventoryWithFilterParams