import "steammessages.proto";
import "gcsdk_gcmessages.proto";
import "steammessages_steamlearn.steamworkssdk.proto";

enum EGCBaseMsg {
	k_EMsgGCInviteToParty = 4501;
	k_EMsgGCInvitationCreated = 4502;
	k_EMsgGCPartyInviteResponse = 4503;
	k_EMsgGCKickFromParty = 4504;
	k_EMsgGCLeaveParty = 4505;
	k_EMsgGCServerAvailable = 4506;
	k_EMsgGCClientConnectToServer = 4507;
	k_EMsgGCGameServerInfo = 4508;
	k_EMsgGCLANServerAvailable = 4511;
	k_EMsgGCInviteToLobby = 4512;
	k_EMsgGCLobbyInviteResponse = 4513;
	k_EMsgGCToClientPollFileRequest = 4514;
	k_EMsgGCToClientPollFileResponse = 4515;
	k_EMsgGCToGCPerformManualOp = 4516;
	k_EMsgGCToGCPerformManualOpCompleted = 4517;
	k_EMsgGCToGCReloadServerRegionSettings = 4518;
	k_EMsgGCAdditionalWelcomeMsgList = 4519;
	k_EMsgGCToClientApplyRemoteConVars = 4520;
	k_EMsgGCToServerApplyRemoteConVars = 4521;
	k_EMsgClientToGCIntegrityStatus = 4522;
	k_EMsgClientToGCAggregateMetrics = 4523;
	k_EMsgGCToClientAggregateMetricsBackoff = 4524;
	k_EMsgGCToServerSteamLearnAccessTokensChanged = 4525;
	k_EMsgGCToServerSteamLearnUseHTTP = 4526;
}

enum ECustomGameInstallStatus {
	k_ECustomGameInstallStatus_Unknown = 0;
	k_ECustomGameInstallStatus_Ready = 1;
	k_ECustomGameInstallStatus_Busy = 2;
	k_ECustomGameInstallStatus_FailedGeneric = 101;
	k_ECustomGameInstallStatus_FailedInternalError = 102;
	k_ECustomGameInstallStatus_RequestedTimestampTooOld = 103;
	k_ECustomGameInstallStatus_RequestedTimestampTooNew = 104;
	k_ECustomGameInstallStatus_CRCMismatch = 105;
	k_ECustomGameInstallStatus_FailedSteam = 106;
	k_ECustomGameInstallStatus_FailedCanceled = 107;
}

message CGCStorePurchaseInit_LineItem {
	optional uint32 item_def_id = 1;
	optional uint32 quantity = 2;
	optional uint32 cost_in_local_currency = 3;
	optional uint32 purchase_type = 4;
	optional uint64 source_reference_id = 5;
	optional int32 price_index = 6;
}

message CMsgGCStorePurchaseInit {
	optional string country = 1;
	optional int32 language = 2;
	optional int32 currency = 3;
	repeated .CGCStorePurchaseInit_LineItem line_items = 4;
}

message CMsgGCStorePurchaseInitResponse {
	optional int32 result = 1;
	optional uint64 txn_id = 2;
}

message CMsgClientPingData {
	repeated fixed32 relay_codes = 4 [packed = true];
	repeated uint32 relay_pings = 5 [packed = true];
	repeated uint32 region_codes = 8 [packed = true];
	repeated uint32 region_pings = 9 [packed = true];
	optional uint32 region_ping_failed_bitmask = 10;
}

message CMsgInviteToParty {
	optional fixed64 steam_id = 1;
	optional uint32 client_version = 2;
	optional uint32 team_id = 3;
	optional bool as_coach = 4;
	optional .CMsgClientPingData ping_data = 5;
}

message CMsgInviteToLobby {
	optional fixed64 steam_id = 1;
	optional uint32 client_version = 2;
}

message CMsgInvitationCreated {
	optional uint64 group_id = 1;
	optional fixed64 steam_id = 2;
	optional bool user_offline = 3;
}

message CMsgPartyInviteResponse {
	optional uint64 party_id = 1;
	optional bool accept = 2;
	optional uint32 client_version = 3;
	optional .CMsgClientPingData ping_data = 8;
}

message CMsgLobbyInviteResponse {
	optional fixed64 lobby_id = 1;
	optional bool accept = 2;
	optional uint32 client_version = 3;
	optional fixed64 custom_game_crc = 6;
	optional fixed32 custom_game_timestamp = 7;
}

message CMsgKickFromParty {
	optional fixed64 steam_id = 1;
}

message CMsgLeaveParty {
}

message CMsgCustomGameInstallStatus {
	optional .ECustomGameInstallStatus status = 1 [default = k_ECustomGameInstallStatus_Unknown];
	optional string message = 2;
	optional fixed32 latest_timestamp_from_steam = 3;
}

message CMsgServerAvailable {
	optional .CMsgCustomGameInstallStatus custom_game_install_status = 1;
}

message CMsgLANServerAvailable {
	optional fixed64 lobby_id = 1;
}

message CSOEconGameAccountClient {
	optional uint32 additional_backpack_slots = 1 [default = 0];
	optional bool trial_account = 2 [default = false];
	optional bool eligible_for_online_play = 3 [default = true];
	optional bool need_to_choose_most_helpful_friend = 4;
	optional bool in_coaches_list = 5;
	optional fixed32 trade_ban_expiration = 6;
	optional fixed32 duel_ban_expiration = 7;
	optional bool made_first_purchase = 9 [default = false];
}

message CMsgApplyStrangePart {
	optional uint64 strange_part_item_id = 1;
	optional uint64 item_item_id = 2;
}

message CMsgApplyPennantUpgrade {
	optional uint64 upgrade_item_id = 1;
	optional uint64 pennant_item_id = 2;
}

message CMsgApplyEggEssence {
	optional uint64 essence_item_id = 1;
	optional uint64 egg_item_id = 2;
}

message CSOEconItemAttribute {
	optional uint32 def_index = 1 [default = 65535];
	optional uint32 value = 2;
	optional bytes value_bytes = 3;
}

message CSOEconItemEquipped {
	optional uint32 new_class = 1;
	optional uint32 new_slot = 2;
}

message CSOEconItem {
	optional uint64 id = 1;
	optional uint32 account_id = 2;
	optional uint32 inventory = 3;
	optional uint32 def_index = 4;
	optional uint32 quantity = 5 [default = 1];
	optional uint32 level = 6 [default = 1];
	optional uint32 quality = 7 [default = 4];
	optional uint32 flags = 8 [default = 0];
	optional uint32 origin = 9 [default = 0];
	repeated .CSOEconItemAttribute attribute = 12;
	optional .CSOEconItem interior_item = 13;
	optional uint32 style = 15 [default = 0];
	optional uint64 original_id = 16;
	repeated .CSOEconItemEquipped equipped_state = 18;
}

message CMsgSortItems {
	optional uint32 sort_type = 1;
}

message CMsgItemAcknowledged {
	optional uint32 account_id = 1;
	optional uint32 inventory = 2;
	optional uint32 def_index = 3;
	optional uint32 quality = 4;
	optional uint32 rarity = 5;
	optional uint32 origin = 6;
}

message CMsgSetItemPositions {
	message ItemPosition {
		optional uint64 item_id = 1;
		optional uint32 position = 2;
	}

	repeated .CMsgSetItemPositions.ItemPosition item_positions = 1;
}

message CMsgGCStorePurchaseCancel {
	optional uint64 txn_id = 1;
}

message CMsgGCStorePurchaseCancelResponse {
	optional uint32 result = 1;
}

message CMsgGCStorePurchaseFinalize {
	optional uint64 txn_id = 1;
}

message CMsgGCStorePurchaseFinalizeResponse {
	optional uint32 result = 1;
	repeated uint64 item_ids = 2;
}

message CMsgGCToGCBannedWordListUpdated {
	optional uint32 group_id = 1;
}

message CMsgGCToGCDirtySDOCache {
	optional uint32 sdo_type = 1;
	optional uint64 key_uint64 = 2;
}

message CMsgSDONoMemcached {
}

message CMsgGCToGCUpdateSQLKeyValue {
	optional string key_name = 1;
}

message CMsgGCServerVersionUpdated {
	optional uint32 server_version = 1;
}

message CMsgGCClientVersionUpdated {
	optional uint32 client_version = 1;
}

message CMsgGCToGCWebAPIAccountChanged {
}

message CMsgExtractGems {
	optional uint64 tool_item_id = 1;
	optional uint64 item_item_id = 2;
	optional uint32 item_socket_id = 3 [default = 65535];
}

message CMsgExtractGemsResponse {
	enum EExtractGems {
		k_ExtractGems_Succeeded = 0;
		k_ExtractGems_Failed_ToolIsInvalid = 1;
		k_ExtractGems_Failed_ItemIsInvalid = 2;
		k_ExtractGems_Failed_ToolCannotRemoveGem = 3;
		k_ExtractGems_Failed_FailedToRemoveGem = 4;
	}

	optional uint64 item_id = 1;
	optional .CMsgExtractGemsResponse.EExtractGems response = 2 [default = k_ExtractGems_Succeeded];
}

message CMsgAddSocket {
	optional uint64 tool_item_id = 1;
	optional uint64 item_item_id = 2;
	optional bool unusual = 3;
}

message CMsgAddSocketResponse {
	enum EAddSocket {
		k_AddSocket_Succeeded = 0;
		k_AddSocket_Failed_ToolIsInvalid = 1;
		k_AddSocket_Failed_ItemCannotBeSocketed = 2;
		k_AddSocket_Failed_FailedToAddSocket = 3;
	}

	optional uint64 item_id = 1;
	repeated uint32 updated_socket_index = 2;
	optional .CMsgAddSocketResponse.EAddSocket response = 3 [default = k_AddSocket_Succeeded];
}

message CMsgAddItemToSocketData {
	optional uint64 gem_item_id = 1;
	optional uint32 socket_index = 2 [default = 65535];
}

message CMsgAddItemToSocket {
	optional uint64 item_item_id = 1;
	repeated .CMsgAddItemToSocketData gems_to_socket = 2;
}

message CMsgAddItemToSocketResponse {
	enum EAddGem {
		k_AddGem_Succeeded = 0;
		k_AddGem_Failed_GemIsInvalid = 1;
		k_AddGem_Failed_ItemIsInvalid = 2;
		k_AddGem_Failed_FailedToAddGem = 3;
		k_AddGem_Failed_InvalidGemTypeForSocket = 4;
		k_AddGem_Failed_InvalidGemTypeForHero = 5;
		k_AddGem_Failed_InvalidGemTypeForSlot = 6;
		k_AddGem_Failed_SocketContainsUnremovableGem = 7;
	}

	optional uint64 item_item_id = 1;
	repeated uint32 updated_socket_index = 2;
	optional .CMsgAddItemToSocketResponse.EAddGem response = 3 [default = k_AddGem_Succeeded];
}

message CMsgResetStrangeGemCount {
	optional uint64 item_item_id = 1;
	optional uint32 socket_index = 2 [default = 65535];
}

message CMsgResetStrangeGemCountResponse {
	enum EResetGem {
		k_ResetGem_Succeeded = 0;
		k_ResetGem_Failed_FailedToResetGem = 1;
		k_ResetGem_Failed_ItemIsInvalid = 2;
		k_ResetGem_Failed_InvalidSocketId = 3;
		k_ResetGem_Failed_SocketCannotBeReset = 4;
	}

	optional .CMsgResetStrangeGemCountResponse.EResetGem response = 1 [default = k_ResetGem_Succeeded];
}

message CMsgGCToClientPollFileRequest {
	optional string file_name = 1;
	optional uint32 client_version = 2;
	optional uint32 poll_id = 3;
}

message CMsgGCToClientPollFileResponse {
	optional uint32 poll_id = 1;
	optional uint32 file_size = 2;
	optional uint32 file_crc = 3;
}

message CMsgGCToGCPerformManualOp {
	optional uint64 op_id = 1;
	optional uint32 group_code = 2;
}

message CMsgGCToGCPerformManualOpCompleted {
	optional bool success = 1;
	optional int32 source_gc = 2 [default = -1];
}

message CMsgGCToGCReloadServerRegionSettings {
}

message CMsgGCAdditionalWelcomeMsgList {
	repeated .CExtraMsgBlock welcome_messages = 1;
}

message CMsgApplyRemoteConVars {
	message ConVar {
		optional string name = 1;
		optional string value = 2;
		optional uint32 version_min = 3;
		optional uint32 version_max = 4;
		optional .EGCPlatform platform = 5 [default = k_eGCPlatform_None];
	}

	repeated .CMsgApplyRemoteConVars.ConVar con_vars = 1;
}

message CMsgGCToClientApplyRemoteConVars {
	optional .CMsgApplyRemoteConVars msg = 1;
}

message CMsgGCToServerApplyRemoteConVars {
	optional .CMsgApplyRemoteConVars msg = 1;
}

message CMsgClientToGCIntegrityStatus {
	message keyvalue {
		optional uint32 id = 1;
		optional uint32 extended = 2;
		optional uint64 value = 3;
		optional string string_value = 4;
	}

	optional string report = 1;
	optional bool secure_allowed = 2;
	repeated .CMsgClientToGCIntegrityStatus.keyvalue diagnostics = 3;
}

message CMsgClientToGCAggregateMetrics {
	message SingleMetric {
		optional string metric_name = 1;
		optional uint32 metric_count = 2;
	}

	repeated .CMsgClientToGCAggregateMetrics.SingleMetric metrics = 1;
}

message CMsgGCToClientAggregateMetricsBackoff {
	optional float upload_rate_modifier = 1;
}

message CMsgGCToServerSteamLearnAccessTokensChanged {
	optional .CMsgSteamLearnAccessTokens access_tokens = 1;
}

message CMsgGCToServerSteamLearnUseHTTP {
	optional bool use_http = 1;
}
