diff --git a/Assets/PipeOut/Scenes/HomeScene.unity b/Assets/PipeOut/Scenes/HomeScene.unity index 39936132..3ce59de6 100644 --- a/Assets/PipeOut/Scenes/HomeScene.unity +++ b/Assets/PipeOut/Scenes/HomeScene.unity @@ -359,6 +359,45 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 53284074} m_PrefabAsset: {fileID: 0} +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &70567080 GameObject: m_ObjectHideFlags: 0 @@ -746,46 +785,6 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 81886312} m_PrefabAsset: {fileID: 0} ---- !u!21 &84905175 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &139740151 GameObject: m_ObjectHideFlags: 0 @@ -1863,6 +1862,46 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1790415148045805001} m_CullTransparentMesh: 1 +--- !u!21 &264845688 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!224 &280846274 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 4603273322937165292, guid: 3fe1e610ab27a064392b55794734a610, @@ -2048,7 +2087,7 @@ PrefabInstance: type: 3} propertyPath: m_Material value: - objectReference: {fileID: 365488288} + objectReference: {fileID: 1098090705} - target: {fileID: 7549667834109842542, guid: 3fe1e610ab27a064392b55794734a610, type: 3} propertyPath: m_text @@ -2708,6 +2747,46 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 321544146} m_CullTransparentMesh: 1 +--- !u!21 &326256327 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!222 &331461620 CanvasRenderer: m_ObjectHideFlags: 0 @@ -3155,46 +3234,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1790415148045804893} m_CullTransparentMesh: 1 ---- !u!21 &365488288 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!114 &366666265 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3679,6 +3718,46 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 +--- !u!21 &409912090 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!21 &412830166 Material: serializedVersion: 8 @@ -4093,7 +4172,7 @@ PrefabInstance: type: 3} propertyPath: m_Material value: - objectReference: {fileID: 1629770708} + objectReference: {fileID: 55407731} - target: {fileID: 7549667834109842542, guid: 3fe1e610ab27a064392b55794734a610, type: 3} propertyPath: m_text @@ -4526,48 +4605,8 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 479148006} m_CullTransparentMesh: 1 ---- !u!21 &516809758 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] ---- !u!1001 &529707224 -PrefabInstance: +--- !u!1001 &529707224 +PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: @@ -4944,6 +4983,46 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 +--- !u!21 &570710048 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!114 &574386839 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5164,6 +5243,86 @@ RectTransform: m_AnchoredPosition: {x: 56.99, y: -1.6601} m_SizeDelta: {x: 463.43, y: 102} m_Pivot: {x: 0.5, y: 0.5} +--- !u!21 &646859327 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] +--- !u!21 &650888094 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!114 &653271491 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5200,6 +5359,46 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 1114734998} m_PrefabAsset: {fileID: 0} +--- !u!21 &665618453 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!114 &672873772 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5601,6 +5800,51 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 743962384} m_PrefabAsset: {fileID: 0} +--- !u!1 &748898819 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 748898821} + - component: {fileID: 748898820} + m_Layer: 0 + m_Name: PlayFabInitializer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &748898820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 748898819} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90da569ce88767e4b924f823046b79de, type: 3} + m_Name: + m_EditorClassIdentifier: + playFabTitleId: 7D3B9 +--- !u!4 &748898821 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 748898819} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.5809231, y: 0.624971, z: 90.01171} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &755857787 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5699,46 +5943,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1790415148045805053} m_CullTransparentMesh: 1 ---- !u!21 &761150878 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &783392352 GameObject: m_ObjectHideFlags: 0 @@ -6395,86 +6599,6 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 ---- !u!21 &898613064 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] ---- !u!21 &899287648 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &902008754 GameObject: m_ObjectHideFlags: 0 @@ -6731,7 +6855,13 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 928408434} m_CullTransparentMesh: 1 ---- !u!21 &929644321 +--- !u!224 &933398288 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4603273322937165292, guid: 3fe1e610ab27a064392b55794734a610, + type: 3} + m_PrefabInstance: {fileID: 415970651} + m_PrefabAsset: {fileID: 0} +--- !u!21 &971285931 Material: serializedVersion: 8 m_ObjectHideFlags: 0 @@ -6771,12 +6901,6 @@ Material: m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] ---- !u!224 &933398288 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 4603273322937165292, guid: 3fe1e610ab27a064392b55794734a610, - type: 3} - m_PrefabInstance: {fileID: 415970651} - m_PrefabAsset: {fileID: 0} --- !u!114 &984614132 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6942,46 +7066,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1014461977} m_CullTransparentMesh: 1 ---- !u!21 &1028268195 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &1031903492 GameObject: m_ObjectHideFlags: 0 @@ -7163,6 +7247,46 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 +--- !u!21 &1045523388 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1045843563 GameObject: m_ObjectHideFlags: 0 @@ -7450,6 +7574,46 @@ MonoBehaviour: optionalRotationMode: 0 optionalScrambleMode: 0 optionalString: +--- !u!21 &1046856823 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1047192091 GameObject: m_ObjectHideFlags: 0 @@ -7555,46 +7719,6 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 ---- !u!21 &1051901365 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1001 &1056064967 PrefabInstance: m_ObjectHideFlags: 0 @@ -8294,6 +8418,46 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 5639290088343042499} m_PrefabAsset: {fileID: 0} +--- !u!21 &1098090705 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1001 &1114734998 PrefabInstance: m_ObjectHideFlags: 0 @@ -8473,7 +8637,7 @@ PrefabInstance: type: 3} propertyPath: m_Material value: - objectReference: {fileID: 1397610833} + objectReference: {fileID: 409912090} - target: {fileID: 7549667834109842542, guid: 3fe1e610ab27a064392b55794734a610, type: 3} propertyPath: m_text @@ -8865,6 +9029,46 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 1166161366} m_PrefabAsset: {fileID: 0} +--- !u!21 &1181212729 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!222 &1184352328 CanvasRenderer: m_ObjectHideFlags: 0 @@ -9755,8 +9959,8 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1876461341} m_HandleRect: {fileID: 1876461340} m_Direction: 2 - m_Value: 0.5000009 - m_Size: 0.91990083 + m_Value: 0.5000002 + m_Size: 0.8253856 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -9978,7 +10182,7 @@ PrefabInstance: type: 3} propertyPath: m_Material value: - objectReference: {fileID: 761150878} + objectReference: {fileID: 665618453} - target: {fileID: 7549667834109842542, guid: 3fe1e610ab27a064392b55794734a610, type: 3} propertyPath: m_text @@ -10126,46 +10330,6 @@ CanvasRenderer: m_GameObject: {fileID: 1250287897} m_CullTransparentMesh: 1 --- !u!21 &1255128875 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] ---- !u!21 &1277160232 Material: serializedVersion: 8 m_ObjectHideFlags: 0 @@ -10366,68 +10530,28 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: b61530cc9caf46142b660f364221819e, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1300430266 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1300430263} - m_CullTransparentMesh: 1 ---- !u!21 &1310954595 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b61530cc9caf46142b660f364221819e, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1300430266 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1300430263} + m_CullTransparentMesh: 1 --- !u!1 &1326188068 GameObject: m_ObjectHideFlags: 0 @@ -10506,46 +10630,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1326188068} m_CullTransparentMesh: 1 ---- !u!21 &1328434522 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!114 &1330143291 MonoBehaviour: m_ObjectHideFlags: 0 @@ -11113,46 +11197,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: -20, y: -20} m_Pivot: {x: 0.5, y: 0.5} ---- !u!21 &1397610833 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!21 &1423836287 Material: serializedVersion: 8 @@ -11493,6 +11537,46 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 +--- !u!21 &1438033904 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1443102696 GameObject: m_ObjectHideFlags: 0 @@ -12313,86 +12397,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1790415148045804948} m_CullTransparentMesh: 1 ---- !u!21 &1621319452 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] ---- !u!21 &1629770708 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!21 &1656805847 Material: serializedVersion: 8 @@ -13494,6 +13498,46 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: -20, y: -20} m_Pivot: {x: 0.5, y: 0.5} +--- !u!21 &1899028158 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1900893649 GameObject: m_ObjectHideFlags: 0 @@ -27196,7 +27240,7 @@ PrefabInstance: type: 3} propertyPath: m_Material value: - objectReference: {fileID: 1028268195} + objectReference: {fileID: 1046856823} - target: {fileID: 7293706673478605280, guid: 3fe1e610ab27a064392b55794734a610, type: 3} propertyPath: m_Enabled @@ -27227,3 +27271,4 @@ SceneRoots: - {fileID: 1790415148045805084} - {fileID: 2116257506} - {fileID: 1341897758} + - {fileID: 748898821} diff --git a/Assets/PlayFabSDK.meta b/Assets/PlayFabSDK.meta new file mode 100644 index 00000000..0f7c1908 --- /dev/null +++ b/Assets/PlayFabSDK.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e53d5e839d5caa945b9b859abe15689b +folderAsset: yes +timeCreated: 1558474635 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Addon.meta b/Assets/PlayFabSDK/Addon.meta new file mode 100644 index 00000000..11d3b967 --- /dev/null +++ b/Assets/PlayFabSDK/Addon.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4592bb1110a6b1e4dacb06b424cd2759 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Addon/PlayFabAddonAPI.cs b/Assets/PlayFabSDK/Addon/PlayFabAddonAPI.cs new file mode 100644 index 00000000..a1cf333d --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabAddonAPI.cs @@ -0,0 +1,390 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.AddonModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// APIs for managing addons. + /// + public static class PlayFabAddonAPI + { + static PlayFabAddonAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Creates the Apple addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateApple(CreateOrUpdateAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the Facebook addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateFacebook(CreateOrUpdateFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateFacebookInstantGames(CreateOrUpdateFacebookInstantGamesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the Google addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateGoogle(CreateOrUpdateGoogleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the Kongregate addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateKongregate(CreateOrUpdateKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the Nintendo addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateNintendo(CreateOrUpdateNintendoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the PSN addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdatePSN(CreateOrUpdatePSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdatePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the Steam addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateSteam(CreateOrUpdateSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates the Twitch addon on a title, or updates it if it already exists. + /// + public static void CreateOrUpdateTwitch(CreateOrUpdateTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Apple addon on a title. + /// + public static void DeleteApple(DeleteAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Facebook addon on a title. + /// + public static void DeleteFacebook(DeleteFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Facebook addon on a title. + /// + public static void DeleteFacebookInstantGames(DeleteFacebookInstantGamesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Google addon on a title. + /// + public static void DeleteGoogle(DeleteGoogleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Kongregate addon on a title. + /// + public static void DeleteKongregate(DeleteKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Nintendo addon on a title. + /// + public static void DeleteNintendo(DeleteNintendoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the PSN addon on a title. + /// + public static void DeletePSN(DeletePSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeletePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Steam addon on a title. + /// + public static void DeleteSteam(DeleteSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the Twitch addon on a title. + /// + public static void DeleteTwitch(DeleteTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/DeleteTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Apple addon on a title, omits secrets. + /// + public static void GetApple(GetAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Facebook addon on a title, omits secrets. + /// + public static void GetFacebook(GetFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Facebook Instant Games addon on a title, omits secrets. + /// + public static void GetFacebookInstantGames(GetFacebookInstantGamesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Google addon on a title, omits secrets. + /// + public static void GetGoogle(GetGoogleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Kongregate addon on a title, omits secrets. + /// + public static void GetKongregate(GetKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Nintendo addon on a title, omits secrets. + /// + public static void GetNintendo(GetNintendoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the PSN addon on a title, omits secrets. + /// + public static void GetPSN(GetPSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetPSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Steam addon on a title, omits secrets. + /// + public static void GetSteam(GetSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information of the Twitch addon on a title, omits secrets. + /// + public static void GetTwitch(GetTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Addon/GetTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Addon/PlayFabAddonAPI.cs.meta b/Assets/PlayFabSDK/Addon/PlayFabAddonAPI.cs.meta new file mode 100644 index 00000000..39ef2ec7 --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabAddonAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 16e6981cbc311934bab9111885dbfc1a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Addon/PlayFabAddonInstanceAPI.cs b/Assets/PlayFabSDK/Addon/PlayFabAddonInstanceAPI.cs new file mode 100644 index 00000000..acba30cf --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabAddonInstanceAPI.cs @@ -0,0 +1,354 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.AddonModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// APIs for managing addons. + /// + public class PlayFabAddonInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabAddonInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabAddonInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Creates the Apple addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateApple(CreateOrUpdateAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the Facebook addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateFacebook(CreateOrUpdateFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the Facebook Instant Games addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateFacebookInstantGames(CreateOrUpdateFacebookInstantGamesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the Google addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateGoogle(CreateOrUpdateGoogleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the Kongregate addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateKongregate(CreateOrUpdateKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the Nintendo addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateNintendo(CreateOrUpdateNintendoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the PSN addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdatePSN(CreateOrUpdatePSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdatePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the Steam addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateSteam(CreateOrUpdateSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates the Twitch addon on a title, or updates it if it already exists. + /// + public void CreateOrUpdateTwitch(CreateOrUpdateTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/CreateOrUpdateTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Apple addon on a title. + /// + public void DeleteApple(DeleteAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Facebook addon on a title. + /// + public void DeleteFacebook(DeleteFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Facebook addon on a title. + /// + public void DeleteFacebookInstantGames(DeleteFacebookInstantGamesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Google addon on a title. + /// + public void DeleteGoogle(DeleteGoogleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Kongregate addon on a title. + /// + public void DeleteKongregate(DeleteKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Nintendo addon on a title. + /// + public void DeleteNintendo(DeleteNintendoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the PSN addon on a title. + /// + public void DeletePSN(DeletePSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeletePSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Steam addon on a title. + /// + public void DeleteSteam(DeleteSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the Twitch addon on a title. + /// + public void DeleteTwitch(DeleteTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/DeleteTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Apple addon on a title, omits secrets. + /// + public void GetApple(GetAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetApple", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Facebook addon on a title, omits secrets. + /// + public void GetFacebook(GetFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetFacebook", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Facebook Instant Games addon on a title, omits secrets. + /// + public void GetFacebookInstantGames(GetFacebookInstantGamesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetFacebookInstantGames", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Google addon on a title, omits secrets. + /// + public void GetGoogle(GetGoogleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetGoogle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Kongregate addon on a title, omits secrets. + /// + public void GetKongregate(GetKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetKongregate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Nintendo addon on a title, omits secrets. + /// + public void GetNintendo(GetNintendoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetNintendo", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the PSN addon on a title, omits secrets. + /// + public void GetPSN(GetPSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetPSN", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Steam addon on a title, omits secrets. + /// + public void GetSteam(GetSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetSteam", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information of the Twitch addon on a title, omits secrets. + /// + public void GetTwitch(GetTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Addon/GetTwitch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Addon/PlayFabAddonInstanceAPI.cs.meta b/Assets/PlayFabSDK/Addon/PlayFabAddonInstanceAPI.cs.meta new file mode 100644 index 00000000..4d4074e8 --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabAddonInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cb16ee30d77a0bd4095b94a53a375676 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Addon/PlayFabAddonModels.cs b/Assets/PlayFabSDK/Addon/PlayFabAddonModels.cs new file mode 100644 index 00000000..24946cf7 --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabAddonModels.cs @@ -0,0 +1,793 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.AddonModels +{ + [Serializable] + public class CreateOrUpdateAppleRequest : PlayFabRequestCommon + { + /// + /// iOS App Bundle ID obtained after setting up your app in the App Store. + /// + public string AppBundleId; + /// + /// iOS App Shared Secret obtained after setting up your app in the App Store. + /// + public string AppSharedSecret; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + /// + /// Ignore expiration date for identity tokens. Be aware that when set to true this can invalidate expired tokens in the + /// case where Apple rotates their signing keys. + /// + public bool? IgnoreExpirationDate; + /// + /// Require secure authentication only for this app. + /// + public bool? RequireSecureAuthentication; + } + + [Serializable] + public class CreateOrUpdateAppleResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdateFacebookInstantGamesRequest : PlayFabRequestCommon + { + /// + /// Facebook App ID obtained after setting up your app in Facebook Instant Games. + /// + public string AppID; + /// + /// Facebook App Secret obtained after setting up your app in Facebook Instant Games. + /// + public string AppSecret; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + } + + [Serializable] + public class CreateOrUpdateFacebookInstantGamesResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdateFacebookRequest : PlayFabRequestCommon + { + /// + /// Facebook App ID obtained after setting up your app in Facebook. + /// + public string AppID; + /// + /// Facebook App Secret obtained after setting up your app in Facebook. + /// + public string AppSecret; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + /// + /// Email address for purchase dispute notifications. + /// + public string NotificationEmail; + } + + [Serializable] + public class CreateOrUpdateFacebookResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdateGoogleRequest : PlayFabRequestCommon + { + /// + /// Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google + /// receipt validation. + /// + public string AppLicenseKey; + /// + /// Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + /// receipt validation. + /// + public string AppPackageID; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + /// + /// Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + /// Required if using Google Authentication. + /// + public string OAuthClientID; + /// + /// Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + /// Required if using Google Authentication. + /// + public string OAuthClientSecret; + /// + /// Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to + /// https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own + /// domain. + /// + public string OAuthCustomRedirectUri; + /// + /// Needed to enable pending purchase handling and subscription processing. + /// + public string ServiceAccountKey; + } + + [Serializable] + public class CreateOrUpdateGoogleResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdateKongregateRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + /// + /// Kongregate Secret API Key obtained after setting up your game in your Kongregate developer account. + /// + public string SecretAPIKey; + } + + [Serializable] + public class CreateOrUpdateKongregateResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdateNintendoRequest : PlayFabRequestCommon + { + /// + /// Nintendo Switch Application ID, without the "0x" prefix. + /// + public string ApplicationID; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// List of Nintendo Environments, currently supporting up to 4. Needs Catalog enabled. + /// + public List Environments; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + } + + [Serializable] + public class CreateOrUpdateNintendoResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdatePSNRequest : PlayFabRequestCommon + { + /// + /// Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. + /// + public string ClientID; + /// + /// Client secret obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. + /// + public string ClientSecret; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + /// + /// Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + /// includes PS5, cross-generation for PS4, and unified entitlements. + /// + public string NextGenClientID; + /// + /// Client secret obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + /// includes PS5, cross-generation for PS4, and unified entitlements. + /// + public string NextGenClientSecret; + } + + [Serializable] + public class CreateOrUpdatePSNResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdateSteamRequest : PlayFabRequestCommon + { + /// + /// Application ID obtained after setting up your app in Valve's developer portal. + /// + public string ApplicationId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Enforce usage of AzurePlayFab identity in user authentication tickets. + /// + public bool? EnforceServiceSpecificTickets; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + /// + /// Sercet Key obtained after setting up your app in Valve's developer portal. + /// + public string SecretKey; + /// + /// Use Steam Payments sandbox endpoint for test transactions. + /// + public bool? UseSandbox; + } + + [Serializable] + public class CreateOrUpdateSteamResponse : PlayFabResultCommon + { + } + + [Serializable] + public class CreateOrUpdateTwitchRequest : PlayFabRequestCommon + { + /// + /// Client ID obtained after creating your Twitch developer account. + /// + public string ClientID; + /// + /// Client Secret obtained after creating your Twitch developer account. + /// + public string ClientSecret; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// If an error should be returned if the addon already exists. + /// + public bool? ErrorIfExists; + } + + [Serializable] + public class CreateOrUpdateTwitchResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteAppleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteAppleResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteFacebookInstantGamesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteFacebookInstantGamesResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteFacebookRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteFacebookResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteGoogleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteGoogleResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteKongregateRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteKongregateResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteNintendoRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteNintendoResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeletePSNRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeletePSNResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteSteamRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteSteamResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteTwitchRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteTwitchResponse : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class GetAppleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetAppleResponse : PlayFabResultCommon + { + /// + /// iOS App Bundle ID obtained after setting up your app in the App Store. + /// + public string AppBundleId; + /// + /// Addon status. + /// + public bool Created; + /// + /// Ignore expiration date for identity tokens. + /// + public bool? IgnoreExpirationDate; + /// + /// Require secure authentication only for this app. + /// + public bool? RequireSecureAuthentication; + } + + [Serializable] + public class GetFacebookInstantGamesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetFacebookInstantGamesResponse : PlayFabResultCommon + { + /// + /// Facebook App ID obtained after setting up your app in Facebook Instant Games. + /// + public string AppID; + /// + /// Addon status. + /// + public bool Created; + } + + [Serializable] + public class GetFacebookRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetFacebookResponse : PlayFabResultCommon + { + /// + /// Facebook App ID obtained after setting up your app in Facebook. + /// + public string AppID; + /// + /// Addon status. + /// + public bool Created; + /// + /// Email address for purchase dispute notifications. + /// + public string NotificationEmail; + } + + [Serializable] + public class GetGoogleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetGoogleResponse : PlayFabResultCommon + { + /// + /// Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google + /// receipt validation. + /// + public string AppPackageID; + /// + /// Addon status. + /// + public bool Created; + /// + /// Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". + /// Required if using Google Authentication. + /// + public string OAuthClientID; + /// + /// Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to + /// https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own + /// domain. + /// + public string OauthCustomRedirectUri; + } + + [Serializable] + public class GetKongregateRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetKongregateResponse : PlayFabResultCommon + { + /// + /// Addon status. + /// + public bool Created; + } + + [Serializable] + public class GetNintendoRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetNintendoResponse : PlayFabResultCommon + { + /// + /// Nintendo Switch Application ID, without the "0x" prefix. + /// + public string ApplicationID; + /// + /// Addon status. + /// + public bool Created; + /// + /// List of Nintendo Environments, currently supporting up to 4. + /// + public List Environments; + } + + [Serializable] + public class GetPSNRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetPSNResponse : PlayFabResultCommon + { + /// + /// Client ID obtained after setting up your game with Sony. This one is associated with the existing PS4 marketplace. + /// + public string ClientID; + /// + /// Addon status. + /// + public bool Created; + /// + /// Client ID obtained after setting up your game with Sony. This one is associated with the modern marketplace, which + /// includes PS5, cross-generation for PS4, and unified entitlements. + /// + public string NextGenClientID; + } + + [Serializable] + public class GetSteamRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetSteamResponse : PlayFabResultCommon + { + /// + /// Application ID obtained after setting up your game in Valve's developer portal. + /// + public string ApplicationId; + /// + /// Addon status. + /// + public bool Created; + /// + /// Enforce usage of AzurePlayFab identity in user authentication tickets. + /// + public bool? EnforceServiceSpecificTickets; + /// + /// Use Steam Payments sandbox endpoint for test transactions. + /// + public bool? UseSandbox; + } + + [Serializable] + public class GetTwitchRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetTwitchResponse : PlayFabResultCommon + { + /// + /// Client ID obtained after creating your Twitch developer account. + /// + public string ClientID; + /// + /// Addon status. + /// + public bool Created; + } + + [Serializable] + public class NintendoEnvironment : PlayFabBaseModel + { + /// + /// Client ID for the Nintendo Environment. + /// + public string ClientID; + /// + /// Client Secret for the Nintendo Environment. + /// + public string ClientSecret; + /// + /// ID for the Nintendo Environment. + /// + public string ID; + } +} +#endif diff --git a/Assets/PlayFabSDK/Addon/PlayFabAddonModels.cs.meta b/Assets/PlayFabSDK/Addon/PlayFabAddonModels.cs.meta new file mode 100644 index 00000000..573052f2 --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabAddonModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 87ffcc7751ee8d54a9effc1467d73c87 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Addon/PlayFabEvents.cs b/Assets/PlayFabSDK/Addon/PlayFabEvents.cs new file mode 100644 index 00000000..544f4f35 --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabEvents.cs @@ -0,0 +1,64 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.AddonModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnAddonCreateOrUpdateAppleRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateAppleResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdateFacebookRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateFacebookResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdateFacebookInstantGamesRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateFacebookInstantGamesResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdateGoogleRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateGoogleResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdateKongregateRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateKongregateResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdateNintendoRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateNintendoResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdatePSNRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdatePSNResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdateSteamRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateSteamResultEvent; + public event PlayFabRequestEvent OnAddonCreateOrUpdateTwitchRequestEvent; + public event PlayFabResultEvent OnAddonCreateOrUpdateTwitchResultEvent; + public event PlayFabRequestEvent OnAddonDeleteAppleRequestEvent; + public event PlayFabResultEvent OnAddonDeleteAppleResultEvent; + public event PlayFabRequestEvent OnAddonDeleteFacebookRequestEvent; + public event PlayFabResultEvent OnAddonDeleteFacebookResultEvent; + public event PlayFabRequestEvent OnAddonDeleteFacebookInstantGamesRequestEvent; + public event PlayFabResultEvent OnAddonDeleteFacebookInstantGamesResultEvent; + public event PlayFabRequestEvent OnAddonDeleteGoogleRequestEvent; + public event PlayFabResultEvent OnAddonDeleteGoogleResultEvent; + public event PlayFabRequestEvent OnAddonDeleteKongregateRequestEvent; + public event PlayFabResultEvent OnAddonDeleteKongregateResultEvent; + public event PlayFabRequestEvent OnAddonDeleteNintendoRequestEvent; + public event PlayFabResultEvent OnAddonDeleteNintendoResultEvent; + public event PlayFabRequestEvent OnAddonDeletePSNRequestEvent; + public event PlayFabResultEvent OnAddonDeletePSNResultEvent; + public event PlayFabRequestEvent OnAddonDeleteSteamRequestEvent; + public event PlayFabResultEvent OnAddonDeleteSteamResultEvent; + public event PlayFabRequestEvent OnAddonDeleteTwitchRequestEvent; + public event PlayFabResultEvent OnAddonDeleteTwitchResultEvent; + public event PlayFabRequestEvent OnAddonGetAppleRequestEvent; + public event PlayFabResultEvent OnAddonGetAppleResultEvent; + public event PlayFabRequestEvent OnAddonGetFacebookRequestEvent; + public event PlayFabResultEvent OnAddonGetFacebookResultEvent; + public event PlayFabRequestEvent OnAddonGetFacebookInstantGamesRequestEvent; + public event PlayFabResultEvent OnAddonGetFacebookInstantGamesResultEvent; + public event PlayFabRequestEvent OnAddonGetGoogleRequestEvent; + public event PlayFabResultEvent OnAddonGetGoogleResultEvent; + public event PlayFabRequestEvent OnAddonGetKongregateRequestEvent; + public event PlayFabResultEvent OnAddonGetKongregateResultEvent; + public event PlayFabRequestEvent OnAddonGetNintendoRequestEvent; + public event PlayFabResultEvent OnAddonGetNintendoResultEvent; + public event PlayFabRequestEvent OnAddonGetPSNRequestEvent; + public event PlayFabResultEvent OnAddonGetPSNResultEvent; + public event PlayFabRequestEvent OnAddonGetSteamRequestEvent; + public event PlayFabResultEvent OnAddonGetSteamResultEvent; + public event PlayFabRequestEvent OnAddonGetTwitchRequestEvent; + public event PlayFabResultEvent OnAddonGetTwitchResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Addon/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Addon/PlayFabEvents.cs.meta new file mode 100644 index 00000000..9673c4a7 --- /dev/null +++ b/Assets/PlayFabSDK/Addon/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d196246361876214999b16fe616a0f32 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin.meta b/Assets/PlayFabSDK/Admin.meta new file mode 100644 index 00000000..a865e687 --- /dev/null +++ b/Assets/PlayFabSDK/Admin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f80b73ed5fc053a409c5e9347d9c609a +folderAsset: yes +timeCreated: 1468524875 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs new file mode 100644 index 00000000..3d2d5a3d --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs @@ -0,0 +1,1551 @@ +#if ENABLE_PLAYFABADMIN_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.AdminModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// APIs for managing title configurations, uploaded Game Server code executables, and user data + /// + public static class PlayFabAdminAPI + { + static PlayFabAdminAPI() {} + + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Abort an ongoing task instance. + /// + public static void AbortTaskInstance(AbortTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AbortTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update news item to include localized version + /// + public static void AddLocalizedNews(AddLocalizedNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddLocalizedNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds a new news item to the title's news feed + /// + public static void AddNews(AddNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public static void AddPlayerTag(AddPlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddPlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the specified virtual currency by the stated amount + /// + public static void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum + /// value of 2,147,483,647 when granted to a player. Any value over that will be discarded. + /// + public static void AddVirtualCurrencyTypes(AddVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/AddVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. + /// + public static void BanUsers(BanUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/BanUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Checks the global count for the limited edition item. + /// + public static void CheckLimitedEditionItemAvailability(CheckLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CheckLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action. + /// + public static void CreateActionsOnPlayersInSegmentTask(CreateActionsOnPlayerSegmentTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateActionsOnPlayersInSegmentTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a CloudScript task, which can run a CloudScript on a schedule. + /// + public static void CreateCloudScriptTask(CreateCloudScriptTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateCloudScriptTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule + /// + public static void CreateInsightsScheduledScalingTask(CreateInsightsScheduledScalingTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateInsightsScheduledScalingTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers a relationship between a title and an Open ID Connect provider. + /// + public static void CreateOpenIdConnection(CreateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after + /// this API returns. + /// + public static void CreatePlayerSharedSecret(CreatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval + /// and an aggregation method. + /// + public static void CreatePlayerStatisticDefinition(CreatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new player segment by defining the conditions on player properties. Also, create actions to target the player + /// segments for a title. + /// + public static void CreateSegment(CreateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/CreateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete a content file from the title. When deleting a file that does not exist, it returns success. + /// + public static void DeleteContent(DeleteContentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteContent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a master player account entirely from all titles and deletes all associated data + /// + public static void DeleteMasterPlayerAccount(DeleteMasterPlayerAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteMasterPlayerAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes PlayStream and telemetry event data associated with the master player account from PlayFab storage + /// + public static void DeleteMasterPlayerEventData(DeleteMasterPlayerEventDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteMasterPlayerEventData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a player's subscription + /// + public static void DeleteMembershipSubscription(DeleteMembershipSubscriptionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteMembershipSubscription", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a relationship between a title and an OpenID Connect provider. + /// + public static void DeleteOpenIdConnection(DeleteOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a user's player account from a title and deletes all associated data + /// + public static void DeletePlayer(DeletePlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeletePlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API + /// returns. + /// + public static void DeletePlayerSharedSecret(DeletePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeletePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing player segment and its associated action(s) for a title. + /// + public static void DeleteSegment(DeleteSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Deletes an existing virtual item store + /// + public static void DeleteStore(DeleteStoreRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteStore", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete a task. + /// + public static void DeleteTask(DeleteTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Permanently deletes a title and all associated configuration + /// + public static void DeleteTitle(DeleteTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteTitle", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a specified set of title data overrides. + /// + public static void DeleteTitleDataOverride(DeleteTitleDataOverrideRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/DeleteTitleDataOverride", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Exports all associated data of a master player account + /// + public static void ExportMasterPlayerData(ExportMasterPlayerDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ExportMasterPlayerData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Starts an export for the player profiles in a segment. This API creates a snapshot of all the player profiles which + /// match the segment definition at the time of the API call. Profiles which change while an export is in progress will not + /// be reflected in the results. + /// + public static void ExportPlayersInSegment(ExportPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ExportPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get information about a ActionsOnPlayersInSegment task instance. + /// + public static void GetActionsOnPlayersInSegmentTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetActionsOnPlayersInSegmentTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as + /// GetPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not change. + /// + public static void GetAllSegments(GetAllSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetAllSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public static void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the contents and information of a specific Cloud Script revision. + /// + public static void GetCloudScriptRevision(GetCloudScriptRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get detail information about a CloudScript task instance. + /// + public static void GetCloudScriptTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all the current cloud script versions. For each version, information about the current published and latest + /// revisions is also listed. + /// + public static void GetCloudScriptVersions(GetCloudScriptVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all contents of the title and get statistics such as size + /// + public static void GetContentList(GetContentListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetContentList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the pre-signed URL for uploading a content file. A subsequent HTTP PUT to the returned URL uploads the + /// content. Also, please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN + /// rates apply. + /// + public static void GetContentUploadUrl(GetContentUploadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetContentUploadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a download URL for the requested report + /// + public static void GetDataReport(GetDataReportRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetDataReport", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the list of titles that the player has played + /// + public static void GetPlayedTitleList(GetPlayedTitleListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayedTitleList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a player's ID from an auth token. + /// + public static void GetPlayerIdFromAuthToken(GetPlayerIdFromAuthTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerIdFromAuthToken", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the player's profile + /// + public static void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerProfile", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public static void GetPlayerSegments(GetPlayersSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Returns all Player Shared Secret Keys including disabled and expired. + /// + public static void GetPlayerSharedSecrets(GetPlayerSharedSecretsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSharedSecrets", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Allows for paging through all players in a given segment. This API creates a snapshot of all player profiles that match + /// the segment definition at the time of its creation and lives through the Total Seconds to Live, refreshing its life span + /// on each subsequent use of the Continuation Token. Profiles that change during the course of paging will not be reflected + /// in the results. AB Test segments are currently not supported by this operation. NOTE: This API is limited to being + /// called 30 times in one minute. You will be returned an error if you exceed this threshold. + /// + public static void GetPlayersInSegment(GetPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have + /// a reset interval. + /// + public static void GetPlayerStatisticDefinitions(GetPlayerStatisticDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticDefinitions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public static void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public static void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPlayerTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the requested policy. + /// + public static void GetPolicy(GetPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public static void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the random drop table configuration for the title + /// + public static void GetRandomResultTables(GetRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the result of an export started by ExportPlayersInSegment API. If the ExportPlayersInSegment is successful and + /// complete, this API returns the IndexUrl from which the index file can be downloaded. The index file has a list of urls + /// from which the files containing the player profile data can be downloaded. Otherwise, it returns the current 'State' of + /// the export + /// + public static void GetSegmentExport(GetPlayersInSegmentExportRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetSegmentExport", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get detail information of a segment and its associated definition(s) and action(s) for a title. + /// + public static void GetSegments(GetSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the set of items defined for the specified store, including all prices defined + /// + public static void GetStoreItems(GetStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Query for task instances by task, status, or time range. + /// + public static void GetTaskInstances(GetTaskInstancesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTaskInstances", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get definition information on a specified task or all tasks within a title. + /// + public static void GetTasks(GetTasksRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTasks", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom title settings which can be read by the client + /// + public static void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom title settings which cannot be read by the client + /// + public static void GetTitleInternalData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the relevant details for a specified user, based upon a match against a supplied unique identifier + /// + public static void GetUserAccountInfo(LookupUserAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserAccountInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets all bans for a user. + /// + public static void GetUserBans(GetUserBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which cannot be accessed by the client + /// + public static void GetUserInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified user's current inventory of virtual goods + /// + public static void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which cannot be accessed by the client + /// + public static void GetUserPublisherInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public static void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public static void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GetUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified user inventories + /// + public static void GrantItemsToUsers(GrantItemsToUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/GrantItemsToUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increases the global count for the given scarce resource. + /// + public static void IncrementLimitedEditionItemAvailability(IncrementLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/IncrementLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Resets the indicated statistic, removing all player entries for it and backing up the old values. + /// + public static void IncrementPlayerStatisticVersion(IncrementPlayerStatisticVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/IncrementPlayerStatisticVersion", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of all Open ID Connect providers registered to a title. + /// + public static void ListOpenIdConnection(ListOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ListOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retuns the list of all defined virtual currencies for the title + /// + public static void ListVirtualCurrencyTypes(ListVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ListVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Attempts to process an order refund through the original real money payment provider. + /// + public static void RefundPurchase(RefundPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RefundPurchase", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public static void RemovePlayerTag(RemovePlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RemovePlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Removes one or more virtual currencies from the set defined for the title. + /// + public static void RemoveVirtualCurrencyTypes(RemoveVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RemoveVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Completely removes all statistics for the specified character, for the current game + /// + public static void ResetCharacterStatistics(ResetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResetCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Reset a player's password for a given title. + /// + public static void ResetPassword(ResetPasswordRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResetPassword", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Completely removes all statistics for the specified user, for the current game + /// + public static void ResetUserStatistics(ResetUserStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResetUserStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Attempts to resolve a dispute with the original order's payment provider. + /// + public static void ResolvePurchaseDispute(ResolvePurchaseDisputeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/ResolvePurchaseDispute", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revoke all active bans for a user. + /// + public static void RevokeAllBansForUser(RevokeAllBansForUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeAllBansForUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revoke all active bans specified with BanId. + /// + public static void RevokeBans(RevokeBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access to an item in a user's inventory + /// + public static void RevokeInventoryItem(RevokeInventoryItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access for up to 25 items across multiple users and characters. + /// + public static void RevokeInventoryItems(RevokeInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Run a task immediately regardless of its schedule. + /// + public static void RunTask(RunTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/RunTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to + /// change the password.If an account recovery email template ID is provided, an email using the custom email template will + /// be used. + /// + public static void SendAccountRecoveryEmail(SendAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SendAccountRecoveryEmail", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Creates the catalog configuration of all virtual goods for the specified catalog version + /// + public static void SetCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the override expiration for a membership subscription + /// + public static void SetMembershipOverride(SetMembershipOverrideRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetMembershipOverride", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets or resets the player's secret. Player secrets are used to sign API requests. + /// + public static void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetPlayerSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the currently published revision of a title Cloud Script + /// + public static void SetPublishedRevision(SetPublishedRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetPublishedRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the key-value store of custom publisher settings + /// + public static void SetPublisherData(SetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Sets all the items in one virtual store + /// + public static void SetStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates and updates the key-value store of custom title settings which can be read by the client. For example, a + /// developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, + /// movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new + /// build. + /// + public static void SetTitleData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Set and delete key-value pairs in a title data override instance. + /// + public static void SetTitleDataAndOverrides(SetTitleDataAndOverridesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetTitleDataAndOverrides", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the key-value store of custom title settings which cannot be read by the client. These values can be used to + /// tweak settings used by game servers and Cloud Scripts without the need to update and re-deploy. + /// + public static void SetTitleInternalData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the Amazon Resource Name (ARN) for iOS and Android push notifications. Documentation on the exact restrictions can + /// be found at: http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html. Currently, Amazon device + /// Messaging is not supported. + /// + public static void SetupPushNotification(SetupPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SetupPushNotification", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the specified virtual currency by the stated amount + /// + public static void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/SubtractUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates information of a list of existing bans specified with Ban Ids. + /// + public static void UpdateBans(UpdateBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates the catalog configuration for virtual goods in the specified catalog version + /// + public static void UpdateCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new Cloud Script revision and uploads source code to it. Note that at this time, only one file should be + /// submitted in the revision. + /// + public static void UpdateCloudScript(UpdateCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateCloudScript", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Modifies data and credentials for an existing relationship between a title and an Open ID Connect provider + /// + public static void UpdateOpenIdConnection(UpdateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates a existing Player Shared Secret Key. It may take up to 5 minutes for this update to become generally available + /// after this API returns. + /// + public static void UpdatePlayerSharedSecret(UpdatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + /// + public static void UpdatePlayerStatisticDefinition(UpdatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Changes a policy for a title + /// + public static void UpdatePolicy(UpdatePolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdatePolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates the random drop table configuration for the title + /// + public static void UpdateRandomResultTables(UpdateRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates an existing player segment and its associated definition(s) and action(s) for a title. + /// + public static void UpdateSegment(UpdateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates an existing virtual item store with new or modified items + /// + public static void UpdateStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update an existing task. + /// + public static void UpdateTask(UpdateTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which cannot be accessed by the client + /// + public static void UpdateUserInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which cannot be accessed by the client + /// + public static void UpdateUserPublisherInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which can only be read by the client + /// + public static void UpdateUserPublisherReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which can only be read by the client + /// + public static void UpdateUserReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title specific display name for a user + /// + public static void UpdateUserTitleDisplayName(UpdateUserTitleDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Admin/UpdateUserTitleDisplayName", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs.meta new file mode 100644 index 00000000..ec37b6e1 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminAPI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 98aa7d0b4d53fe24392fc8cc52120845 +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs new file mode 100644 index 00000000..c793da38 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs @@ -0,0 +1,1346 @@ +#if ENABLE_PLAYFABADMIN_API + +using System; +using System.Collections.Generic; +using PlayFab.AdminModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// APIs for managing title configurations, uploaded Game Server code executables, and user data + /// + public class PlayFabAdminInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabAdminInstanceAPI() { } + + public PlayFabAdminInstanceAPI(PlayFabApiSettings settings) + { + apiSettings = settings; + } + + public PlayFabAdminInstanceAPI(PlayFabAuthenticationContext context) + { + authenticationContext = context; + } + + public PlayFabAdminInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Abort an ongoing task instance. + /// + public void AbortTaskInstance(AbortTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AbortTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update news item to include localized version + /// + public void AddLocalizedNews(AddLocalizedNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddLocalizedNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds a new news item to the title's news feed + /// + public void AddNews(AddNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public void AddPlayerTag(AddPlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddPlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the specified virtual currency by the stated amount + /// + public void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum + /// value of 2,147,483,647 when granted to a player. Any value over that will be discarded. + /// + public void AddVirtualCurrencyTypes(AddVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/AddVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. + /// + public void BanUsers(BanUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/BanUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Checks the global count for the limited edition item. + /// + public void CheckLimitedEditionItemAvailability(CheckLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CheckLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action. + /// + public void CreateActionsOnPlayersInSegmentTask(CreateActionsOnPlayerSegmentTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateActionsOnPlayersInSegmentTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a CloudScript task, which can run a CloudScript on a schedule. + /// + public void CreateCloudScriptTask(CreateCloudScriptTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateCloudScriptTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule + /// + public void CreateInsightsScheduledScalingTask(CreateInsightsScheduledScalingTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateInsightsScheduledScalingTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers a relationship between a title and an Open ID Connect provider. + /// + public void CreateOpenIdConnection(CreateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after + /// this API returns. + /// + public void CreatePlayerSharedSecret(CreatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval + /// and an aggregation method. + /// + public void CreatePlayerStatisticDefinition(CreatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new player segment by defining the conditions on player properties. Also, create actions to target the player + /// segments for a title. + /// + public void CreateSegment(CreateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/CreateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete a content file from the title. When deleting a file that does not exist, it returns success. + /// + public void DeleteContent(DeleteContentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteContent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a master player account entirely from all titles and deletes all associated data + /// + public void DeleteMasterPlayerAccount(DeleteMasterPlayerAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteMasterPlayerAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes PlayStream and telemetry event data associated with the master player account from PlayFab storage + /// + public void DeleteMasterPlayerEventData(DeleteMasterPlayerEventDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteMasterPlayerEventData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a player's subscription + /// + public void DeleteMembershipSubscription(DeleteMembershipSubscriptionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteMembershipSubscription", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a relationship between a title and an OpenID Connect provider. + /// + public void DeleteOpenIdConnection(DeleteOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a user's player account from a title and deletes all associated data + /// + public void DeletePlayer(DeletePlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeletePlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API + /// returns. + /// + public void DeletePlayerSharedSecret(DeletePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeletePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing player segment and its associated action(s) for a title. + /// + public void DeleteSegment(DeleteSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Deletes an existing virtual item store + /// + public void DeleteStore(DeleteStoreRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteStore", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete a task. + /// + public void DeleteTask(DeleteTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Permanently deletes a title and all associated configuration + /// + public void DeleteTitle(DeleteTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteTitle", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a specified set of title data overrides. + /// + public void DeleteTitleDataOverride(DeleteTitleDataOverrideRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/DeleteTitleDataOverride", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Exports all associated data of a master player account + /// + public void ExportMasterPlayerData(ExportMasterPlayerDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ExportMasterPlayerData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Starts an export for the player profiles in a segment. This API creates a snapshot of all the player profiles which + /// match the segment definition at the time of the API call. Profiles which change while an export is in progress will not + /// be reflected in the results. + /// + public void ExportPlayersInSegment(ExportPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ExportPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get information about a ActionsOnPlayersInSegment task instance. + /// + public void GetActionsOnPlayersInSegmentTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetActionsOnPlayersInSegmentTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as + /// GetPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not change. + /// + public void GetAllSegments(GetAllSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetAllSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the contents and information of a specific Cloud Script revision. + /// + public void GetCloudScriptRevision(GetCloudScriptRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get detail information about a CloudScript task instance. + /// + public void GetCloudScriptTaskInstance(GetTaskInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptTaskInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all the current cloud script versions. For each version, information about the current published and latest + /// revisions is also listed. + /// + public void GetCloudScriptVersions(GetCloudScriptVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetCloudScriptVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all contents of the title and get statistics such as size + /// + public void GetContentList(GetContentListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetContentList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the pre-signed URL for uploading a content file. A subsequent HTTP PUT to the returned URL uploads the + /// content. Also, please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN + /// rates apply. + /// + public void GetContentUploadUrl(GetContentUploadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetContentUploadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a download URL for the requested report + /// + public void GetDataReport(GetDataReportRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetDataReport", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the list of titles that the player has played + /// + public void GetPlayedTitleList(GetPlayedTitleListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayedTitleList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a player's ID from an auth token. + /// + public void GetPlayerIdFromAuthToken(GetPlayerIdFromAuthTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerIdFromAuthToken", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the player's profile + /// + public void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerProfile", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public void GetPlayerSegments(GetPlayersSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Returns all Player Shared Secret Keys including disabled and expired. + /// + public void GetPlayerSharedSecrets(GetPlayerSharedSecretsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerSharedSecrets", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Allows for paging through all players in a given segment. This API creates a snapshot of all player profiles that match + /// the segment definition at the time of its creation and lives through the Total Seconds to Live, refreshing its life span + /// on each subsequent use of the Continuation Token. Profiles that change during the course of paging will not be reflected + /// in the results. AB Test segments are currently not supported by this operation. NOTE: This API is limited to being + /// called 30 times in one minute. You will be returned an error if you exceed this threshold. + /// + public void GetPlayersInSegment(GetPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have + /// a reset interval. + /// + public void GetPlayerStatisticDefinitions(GetPlayerStatisticDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticDefinitions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerStatisticVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPlayerTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the requested policy. + /// + public void GetPolicy(GetPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the random drop table configuration for the title + /// + public void GetRandomResultTables(GetRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the result of an export started by ExportPlayersInSegment API. If the ExportPlayersInSegment is successful and + /// complete, this API returns the IndexUrl from which the index file can be downloaded. The index file has a list of urls + /// from which the files containing the player profile data can be downloaded. Otherwise, it returns the current 'State' of + /// the export + /// + public void GetSegmentExport(GetPlayersInSegmentExportRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetSegmentExport", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get detail information of a segment and its associated definition(s) and action(s) for a title. + /// + public void GetSegments(GetSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the set of items defined for the specified store, including all prices defined + /// + public void GetStoreItems(GetStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Query for task instances by task, status, or time range. + /// + public void GetTaskInstances(GetTaskInstancesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTaskInstances", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get definition information on a specified task or all tasks within a title. + /// + public void GetTasks(GetTasksRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTasks", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom title settings which can be read by the client + /// + public void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom title settings which cannot be read by the client + /// + public void GetTitleInternalData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the relevant details for a specified user, based upon a match against a supplied unique identifier + /// + public void GetUserAccountInfo(LookupUserAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserAccountInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets all bans for a user. + /// + public void GetUserBans(GetUserBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which cannot be accessed by the client + /// + public void GetUserInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified user's current inventory of virtual goods + /// + public void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which cannot be accessed by the client + /// + public void GetUserPublisherInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GetUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified user inventories + /// + public void GrantItemsToUsers(GrantItemsToUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/GrantItemsToUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increases the global count for the given scarce resource. + /// + public void IncrementLimitedEditionItemAvailability(IncrementLimitedEditionItemAvailabilityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/IncrementLimitedEditionItemAvailability", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Resets the indicated statistic, removing all player entries for it and backing up the old values. + /// + public void IncrementPlayerStatisticVersion(IncrementPlayerStatisticVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/IncrementPlayerStatisticVersion", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of all Open ID Connect providers registered to a title. + /// + public void ListOpenIdConnection(ListOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ListOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retuns the list of all defined virtual currencies for the title + /// + public void ListVirtualCurrencyTypes(ListVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ListVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Attempts to process an order refund through the original real money payment provider. + /// + public void RefundPurchase(RefundPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RefundPurchase", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public void RemovePlayerTag(RemovePlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RemovePlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Removes one or more virtual currencies from the set defined for the title. + /// + public void RemoveVirtualCurrencyTypes(RemoveVirtualCurrencyTypesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RemoveVirtualCurrencyTypes", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Completely removes all statistics for the specified character, for the current game + /// + public void ResetCharacterStatistics(ResetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResetCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Reset a player's password for a given title. + /// + public void ResetPassword(ResetPasswordRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResetPassword", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Completely removes all statistics for the specified user, for the current game + /// + public void ResetUserStatistics(ResetUserStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResetUserStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Attempts to resolve a dispute with the original order's payment provider. + /// + public void ResolvePurchaseDispute(ResolvePurchaseDisputeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/ResolvePurchaseDispute", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revoke all active bans for a user. + /// + public void RevokeAllBansForUser(RevokeAllBansForUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeAllBansForUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revoke all active bans specified with BanId. + /// + public void RevokeBans(RevokeBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access to an item in a user's inventory + /// + public void RevokeInventoryItem(RevokeInventoryItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access for up to 25 items across multiple users and characters. + /// + public void RevokeInventoryItems(RevokeInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Run a task immediately regardless of its schedule. + /// + public void RunTask(RunTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/RunTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to + /// change the password.If an account recovery email template ID is provided, an email using the custom email template will + /// be used. + /// + public void SendAccountRecoveryEmail(SendAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SendAccountRecoveryEmail", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Creates the catalog configuration of all virtual goods for the specified catalog version + /// + public void SetCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the override expiration for a membership subscription + /// + public void SetMembershipOverride(SetMembershipOverrideRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetMembershipOverride", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets or resets the player's secret. Player secrets are used to sign API requests. + /// + public void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetPlayerSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the currently published revision of a title Cloud Script + /// + public void SetPublishedRevision(SetPublishedRevisionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetPublishedRevision", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the key-value store of custom publisher settings + /// + public void SetPublisherData(SetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Sets all the items in one virtual store + /// + public void SetStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates and updates the key-value store of custom title settings which can be read by the client. For example, a + /// developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, + /// movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new + /// build. + /// + public void SetTitleData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Set and delete key-value pairs in a title data override instance. + /// + public void SetTitleDataAndOverrides(SetTitleDataAndOverridesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetTitleDataAndOverrides", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the key-value store of custom title settings which cannot be read by the client. These values can be used to + /// tweak settings used by game servers and Cloud Scripts without the need to update and re-deploy. + /// + public void SetTitleInternalData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the Amazon Resource Name (ARN) for iOS and Android push notifications. Documentation on the exact restrictions can + /// be found at: http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html. Currently, Amazon device + /// Messaging is not supported. + /// + public void SetupPushNotification(SetupPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SetupPushNotification", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the specified virtual currency by the stated amount + /// + public void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/SubtractUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates information of a list of existing bans specified with Ban Ids. + /// + public void UpdateBans(UpdateBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates the catalog configuration for virtual goods in the specified catalog version + /// + public void UpdateCatalogItems(UpdateCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new Cloud Script revision and uploads source code to it. Note that at this time, only one file should be + /// submitted in the revision. + /// + public void UpdateCloudScript(UpdateCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateCloudScript", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Modifies data and credentials for an existing relationship between a title and an Open ID Connect provider + /// + public void UpdateOpenIdConnection(UpdateOpenIdConnectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateOpenIdConnection", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates a existing Player Shared Secret Key. It may take up to 5 minutes for this update to become generally available + /// after this API returns. + /// + public void UpdatePlayerSharedSecret(UpdatePlayerSharedSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerSharedSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates a player statistic configuration for the title, optionally allowing the developer to specify a reset interval. + /// + public void UpdatePlayerStatisticDefinition(UpdatePlayerStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdatePlayerStatisticDefinition", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Changes a policy for a title + /// + public void UpdatePolicy(UpdatePolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdatePolicy", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates the random drop table configuration for the title + /// + public void UpdateRandomResultTables(UpdateRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates an existing player segment and its associated definition(s) and action(s) for a title. + /// + public void UpdateSegment(UpdateSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates an existing virtual item store with new or modified items + /// + public void UpdateStoreItems(UpdateStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update an existing task. + /// + public void UpdateTask(UpdateTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateTask", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which cannot be accessed by the client + /// + public void UpdateUserInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which cannot be accessed by the client + /// + public void UpdateUserPublisherInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which can only be read by the client + /// + public void UpdateUserPublisherReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which can only be read by the client + /// + public void UpdateUserReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title specific display name for a user + /// + public void UpdateUserTitleDisplayName(UpdateUserTitleDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Admin/UpdateUserTitleDisplayName", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs.meta new file mode 100644 index 00000000..dfaa93b4 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 942c3c5d808dfed49b4c4369cc282d49 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs new file mode 100644 index 00000000..5befa540 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs @@ -0,0 +1,7799 @@ +#if ENABLE_PLAYFABADMIN_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.AdminModels +{ + /// + /// If the task instance has already completed, there will be no-op. + /// + [Serializable] + public class AbortTaskInstanceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// ID of a task instance that is being aborted. + /// + public string TaskInstanceId; + } + + /// + /// The work to be performed on each entity which can only be of one type. + /// + [Serializable] + public class Action : PlayFabBaseModel + { + /// + /// Action content to add inventory item v2 + /// + public AddInventoryItemV2Content AddInventoryItemV2Content; + /// + /// Action content to ban player + /// + public BanPlayerContent BanPlayerContent; + /// + /// Action content to delete inventory item v2 + /// + public DeleteInventoryItemV2Content DeleteInventoryItemV2Content; + /// + /// Action content to delete player + /// + public DeletePlayerContent DeletePlayerContent; + /// + /// Action content to execute cloud script + /// + public ExecuteCloudScriptContent ExecuteCloudScriptContent; + /// + /// Action content to execute azure function + /// + public ExecuteFunctionContent ExecuteFunctionContent; + /// + /// Action content to grant item + /// + public GrantItemContent GrantItemContent; + /// + /// Action content to grant virtual currency + /// + public GrantVirtualCurrencyContent GrantVirtualCurrencyContent; + /// + /// Action content to increment player statistic + /// + public IncrementPlayerStatisticContent IncrementPlayerStatisticContent; + /// + /// Action content to send push notification + /// + public PushNotificationContent PushNotificationContent; + /// + /// Action content to send email + /// + public SendEmailContent SendEmailContent; + /// + /// Action content to subtract inventory item v2 + /// + public SubtractInventoryItemV2Content SubtractInventoryItemV2Content; + } + + [Serializable] + public class ActionsOnPlayersInSegmentTaskParameter : PlayFabBaseModel + { + /// + /// List of actions to perform on each player in a segment. Each action object can contain only one action type. + /// + public List Actions; + /// + /// ID of the segment to perform actions on. + /// + public string SegmentId; + } + + [Serializable] + public class ActionsOnPlayersInSegmentTaskSummary : PlayFabBaseModel + { + /// + /// UTC timestamp when the task completed. + /// + public DateTime? CompletedAt; + /// + /// Error message for last processing attempt, if an error occured. + /// + public string ErrorMessage; + /// + /// Flag indicating if the error was fatal, if false job will be retried. + /// + public bool? ErrorWasFatal; + /// + /// Estimated time remaining in seconds. + /// + public double? EstimatedSecondsRemaining; + /// + /// Progress represented as percentage. + /// + public double? PercentComplete; + /// + /// If manually scheduled, ID of user who scheduled the task. + /// + public string ScheduledByUserId; + /// + /// UTC timestamp when the task started. + /// + public DateTime StartedAt; + /// + /// Current status of the task instance. + /// + public TaskInstanceStatus? Status; + /// + /// Identifier of the task this instance belongs to. + /// + public NameIdentifier TaskIdentifier; + /// + /// ID of the task instance. + /// + public string TaskInstanceId; + /// + /// Total players in segment when task was started. + /// + public int? TotalPlayersInSegment; + /// + /// Total number of players that have had the actions applied to. + /// + public int? TotalPlayersProcessed; + } + + [Serializable] + public class AdCampaignAttribution : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + [Serializable] + public class AdCampaignAttributionModel : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + [Serializable] + public class AdCampaignSegmentFilter : PlayFabBaseModel + { + /// + /// Campaign id. + /// + public string CampaignId; + /// + /// Campaign source. + /// + public string CampaignSource; + /// + /// Campaign comparison. + /// + public SegmentFilterComparison? Comparison; + } + + [Serializable] + public class AddInventoryItemsV2SegmentAction : PlayFabBaseModel + { + /// + /// Amount of the item to be granted to a player + /// + public int? Amount; + /// + /// The collection id for where the item will be granted in the player inventory + /// + public string CollectionId; + /// + /// The duration in seconds of the subscription to be granted to a player + /// + public int? DurationInSeconds; + /// + /// The id of item to be granted to the player + /// + public string ItemId; + /// + /// The stack id for where the item will be granted in the player inventory + /// + public string StackId; + } + + [Serializable] + public class AddInventoryItemV2Content : PlayFabBaseModel + { + /// + /// Amount of the item to be granted to a player + /// + public int? Amount; + /// + /// The collection id for where the item will be granted in the player inventory + /// + public string CollectionId; + /// + /// The duration in seconds of the subscription to be granted to a player + /// + public int? DurationInSeconds; + /// + /// The id of item to be granted to the player + /// + public string ItemId; + /// + /// The stack id for where the item will be granted in the player inventory + /// + public string StackId; + } + + [Serializable] + public class AddLocalizedNewsRequest : PlayFabRequestCommon + { + /// + /// Localized body text of the news. + /// + public string Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Language of the news item. + /// + public string Language; + /// + /// Unique id of the updated news item. + /// + public string NewsId; + /// + /// Localized title (headline) of the news item. + /// + public string Title; + } + + [Serializable] + public class AddLocalizedNewsResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddNewsRequest : PlayFabRequestCommon + { + /// + /// Default body text of the news. + /// + public string Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Time this news was published. If not set, defaults to now. + /// + public DateTime? Timestamp; + /// + /// Default title (headline) of the news item. + /// + public string Title; + } + + [Serializable] + public class AddNewsResult : PlayFabResultCommon + { + /// + /// Unique id of the new news item + /// + public string NewsId; + } + + /// + /// This API will trigger a player_tag_added event and add a tag with the given TagName and PlayFabID to the corresponding + /// player profile. TagName can be used for segmentation and it is limited to 256 characters. Also there is a limit on the + /// number of tags a title can have. + /// + [Serializable] + public class AddPlayerTagRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique tag for player profile. + /// + public string TagName; + } + + [Serializable] + public class AddPlayerTagResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be added to the user balance of the specified virtual currency. Maximum VC balance is Int32 (2,147,483,647). + /// Any increase over this value will be discarded. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab unique identifier of the user whose virtual currency balance is to be increased. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be incremented. + /// + public string VirtualCurrency; + } + + /// + /// This operation is additive. Any new currencies defined in the array will be added to the set of those available for the + /// title, while any CurrencyCode identifiers matching existing ones in the game will be overwritten with the new values. + /// + [Serializable] + public class AddVirtualCurrencyTypesRequest : PlayFabRequestCommon + { + /// + /// List of virtual currencies and their initial deposits (the amount a user is granted when signing in for the first time) + /// to the title + /// + public List VirtualCurrencies; + } + + [Serializable] + public class AllPlayersSegmentFilter : PlayFabBaseModel + { + } + + [Serializable] + public class ApiCondition : PlayFabBaseModel + { + /// + /// Require that API calls contain an RSA encrypted payload or signed headers. + /// + public Conditionals? HasSignatureOrEncryption; + } + + public enum AuthTokenType + { + Email + } + + /// + /// Contains information for a ban. + /// + [Serializable] + public class BanInfo : PlayFabBaseModel + { + /// + /// The active state of this ban. Expired bans may still have this value set to true but they will have no effect. + /// + public bool Active; + /// + /// The unique Ban Id associated with this ban. + /// + public string BanId; + /// + /// The time when this ban was applied. + /// + public DateTime? Created; + /// + /// The time when this ban expires. Permanent bans do not have expiration date. + /// + public DateTime? Expires; + /// + /// The IP address on which the ban was applied. May affect multiple players. + /// + public string IPAddress; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The reason why this ban was applied. + /// + public string Reason; + /// + /// The family type of the suer that is included in the ban. + /// + public string UserFamilyType; + } + + [Serializable] + public class BanPlayerContent : PlayFabBaseModel + { + /// + /// Duration(in hours) to ban a player. If not provided, the player will be banned permanently. + /// + public int? BanDurationHours; + /// + /// Reason to ban a player + /// + public string BanReason; + } + + [Serializable] + public class BanPlayerSegmentAction : PlayFabBaseModel + { + /// + /// Ban hours duration. + /// + public uint? BanHours; + /// + /// Reason for ban. + /// + public string ReasonForBan; + } + + /// + /// Represents a single ban request. + /// + [Serializable] + public class BanRequest : PlayFabBaseModel + { + /// + /// The duration in hours for the ban. Leave this blank for a permanent ban. + /// + public uint? DurationInHours; + /// + /// IP address to be banned. May affect multiple players. + /// + public string IPAddress; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The reason for this ban. Maximum 140 characters. + /// + public string Reason; + /// + /// The family type of the user that should be included in the ban if applicable. May affect multiple players. + /// + public UserFamilyType? UserFamilyType; + } + + /// + /// The existence of each user will not be verified. When banning by IP or MAC address, multiple players may be affected, so + /// use this feature with caution. Returns information about the new bans. + /// + [Serializable] + public class BanUsersRequest : PlayFabRequestCommon + { + /// + /// List of ban requests to be applied. Maximum 100. + /// + public List Bans; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class BanUsersResult : PlayFabResultCommon + { + /// + /// Information on the bans that were applied + /// + public List BanData; + } + + [Serializable] + public class BlankResult : PlayFabResultCommon + { + } + + /// + /// A purchasable item from the item catalog + /// + [Serializable] + public class CatalogItem : PlayFabBaseModel + { + /// + /// defines the bundle properties for the item - bundles are items which contain other items, including random drop tables + /// and virtual currencies + /// + public CatalogItemBundleInfo Bundle; + /// + /// if true, then an item instance of this type can be used to grant a character to a user. + /// + public bool CanBecomeCharacter; + /// + /// catalog version for this item + /// + public string CatalogVersion; + /// + /// defines the consumable properties (number of uses, timeout) for the item + /// + public CatalogItemConsumableInfo Consumable; + /// + /// defines the container properties for the item - what items it contains, including random drop tables and virtual + /// currencies, and what item (if any) is required to open it via the UnlockContainerItem API + /// + public CatalogItemContainerInfo Container; + /// + /// game specific custom data + /// + public string CustomData; + /// + /// text description of item, to show in-game + /// + public string Description; + /// + /// text name for the item, to show in-game + /// + public string DisplayName; + /// + /// If the item has IsLImitedEdition set to true, and this is the first time this ItemId has been defined as a limited + /// edition item, this value determines the total number of instances to allocate for the title. Once this limit has been + /// reached, no more instances of this ItemId can be created, and attempts to purchase or grant it will return a Result of + /// false for that ItemId. If the item has already been defined to have a limited edition count, or if this value is less + /// than zero, it will be ignored. + /// + public int InitialLimitedEditionCount; + /// + /// BETA: If true, then only a fixed number can ever be granted. + /// + public bool IsLimitedEdition; + /// + /// if true, then only one item instance of this type will exist and its remaininguses will be incremented instead. + /// RemainingUses will cap out at Int32.Max (2,147,483,647). All subsequent increases will be discarded + /// + public bool IsStackable; + /// + /// if true, then an item instance of this type can be traded between players using the trading APIs + /// + public bool IsTradable; + /// + /// class to which the item belongs + /// + public string ItemClass; + /// + /// unique identifier for this item + /// + public string ItemId; + /// + /// URL to the item image. For Facebook purchase to display the image on the item purchase page, this must be set to an HTTP + /// URL. + /// + public string ItemImageUrl; + /// + /// override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// list of item tags + /// + public List Tags; + /// + /// price of this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + [Serializable] + public class CatalogItemBundleInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory when the bundle is added + /// + public List BundledItems; + /// + /// unique TableId values for all RandomResultTable objects which are part of the bundle (random tables will be resolved and + /// add the relevant items to the player inventory when the bundle is added) + /// + public List BundledResultTables; + /// + /// virtual currency types and balances which will be added to the player inventory when the bundle is added + /// + public Dictionary BundledVirtualCurrencies; + } + + [Serializable] + public class CatalogItemConsumableInfo : PlayFabBaseModel + { + /// + /// number of times this object can be used, after which it will be removed from the player inventory + /// + public uint? UsageCount; + /// + /// duration in seconds for how long the item will remain in the player inventory - once elapsed, the item will be removed + /// (recommended minimum value is 5 seconds, as lower values can cause the item to expire before operations depending on + /// this item's details have completed) + /// + public uint? UsagePeriod; + /// + /// all inventory item instances in the player inventory sharing a non-null UsagePeriodGroup have their UsagePeriod values + /// added together, and share the result - when that period has elapsed, all the items in the group will be removed + /// + public string UsagePeriodGroup; + } + + /// + /// Containers are inventory items that can hold other items defined in the catalog, as well as virtual currency, which is + /// added to the player inventory when the container is unlocked, using the UnlockContainerItem API. The items can be + /// anything defined in the catalog, as well as RandomResultTable objects which will be resolved when the container is + /// unlocked. Containers and their keys should be defined as Consumable (having a limited number of uses) in their catalog + /// defintiions, unless the intent is for the player to be able to re-use them infinitely. + /// + [Serializable] + public class CatalogItemContainerInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory, once the container has been unlocked + /// + public List ItemContents; + /// + /// ItemId for the catalog item used to unlock the container, if any (if not specified, a call to UnlockContainerItem will + /// open the container, adding the contents to the player inventory and currency balances) + /// + public string KeyItemId; + /// + /// unique TableId values for all RandomResultTable objects which are part of the container (once unlocked, random tables + /// will be resolved and add the relevant items to the player inventory) + /// + public List ResultTableContents; + /// + /// virtual currency types and balances which will be added to the player inventory when the container is unlocked + /// + public Dictionary VirtualCurrencyContents; + } + + /// + /// This returns the total number of these items available. + /// + [Serializable] + public class CheckLimitedEditionItemAvailabilityRequest : PlayFabRequestCommon + { + /// + /// Which catalog is being updated. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The item to check for. + /// + public string ItemId; + } + + [Serializable] + public class CheckLimitedEditionItemAvailabilityResult : PlayFabResultCommon + { + /// + /// The amount of the specified resource remaining. + /// + public int Amount; + } + + [Serializable] + public class ChurnPredictionSegmentFilter : PlayFabBaseModel + { + /// + /// Comparison + /// + public SegmentFilterComparison? Comparison; + /// + /// RiskLevel + /// + public ChurnRiskLevel? RiskLevel; + } + + public enum ChurnRiskLevel + { + NoData, + LowRisk, + MediumRisk, + HighRisk + } + + [Serializable] + public class CloudScriptFile : PlayFabBaseModel + { + /// + /// Contents of the Cloud Script javascript. Must be string-escaped javascript. + /// + public string FileContents; + /// + /// Name of the javascript file. These names are not used internally by the server, they are only for developer + /// organizational purposes. + /// + public string Filename; + } + + [Serializable] + public class CloudScriptTaskParameter : PlayFabBaseModel + { + /// + /// Argument to pass to the CloudScript function. + /// + public object Argument; + /// + /// Name of the CloudScript function to execute. + /// + public string FunctionName; + } + + [Serializable] + public class CloudScriptTaskSummary : PlayFabBaseModel + { + /// + /// UTC timestamp when the task completed. + /// + public DateTime? CompletedAt; + /// + /// Estimated time remaining in seconds. + /// + public double? EstimatedSecondsRemaining; + /// + /// Progress represented as percentage. + /// + public double? PercentComplete; + /// + /// Result of CloudScript execution + /// + public ExecuteCloudScriptResult Result; + /// + /// If manually scheduled, ID of user who scheduled the task. + /// + public string ScheduledByUserId; + /// + /// UTC timestamp when the task started. + /// + public DateTime StartedAt; + /// + /// Current status of the task instance. + /// + public TaskInstanceStatus? Status; + /// + /// Identifier of the task this instance belongs to. + /// + public NameIdentifier TaskIdentifier; + /// + /// ID of the task instance. + /// + public string TaskInstanceId; + } + + [Serializable] + public class CloudScriptVersionStatus : PlayFabBaseModel + { + /// + /// Most recent revision for this Cloud Script version + /// + public int LatestRevision; + /// + /// Published code revision for this Cloud Script version + /// + public int PublishedRevision; + /// + /// Version number + /// + public int Version; + } + + public enum Conditionals + { + Any, + True, + False + } + + [Serializable] + public class ContactEmailInfo : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + [Serializable] + public class ContactEmailInfoModel : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + [Serializable] + public class ContentInfo : PlayFabBaseModel + { + /// + /// Key of the content + /// + public string Key; + /// + /// Last modified time + /// + public DateTime LastModified; + /// + /// Size of the content in bytes + /// + public double Size; + } + + public enum ContinentCode + { + AF, + AN, + AS, + EU, + NA, + OC, + SA, + Unknown + } + + public enum CountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW, + Unknown + } + + /// + /// Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many + /// create-task requests within a short time will cause a create conflict error. + /// + [Serializable] + public class CreateActionsOnPlayerSegmentTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Task details related to segment and action + /// + public ActionsOnPlayersInSegmentTaskParameter Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + } + + /// + /// Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many + /// create-task requests within a short time will cause a create conflict error. + /// + [Serializable] + public class CreateCloudScriptTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Task details related to CloudScript + /// + public CloudScriptTaskParameter Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + } + + /// + /// Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many + /// create-task requests within a short time will cause a create conflict error. + /// + [Serializable] + public class CreateInsightsScheduledScalingTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Task details related to Insights Scaling + /// + public InsightsScalingTaskParameter Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + } + + [Serializable] + public class CreateOpenIdConnectionRequest : PlayFabRequestCommon + { + /// + /// The client ID given by the ID provider. + /// + public string ClientId; + /// + /// The client secret given by the ID provider. + /// + public string ClientSecret; + /// + /// A name for the connection that identifies it within the title. + /// + public string ConnectionId; + /// + /// Ignore 'nonce' claim in identity tokens. + /// + public bool? IgnoreNonce; + /// + /// The discovery document URL to read issuer information from. This must be the absolute URL to the JSON OpenId + /// Configuration document and must be accessible from the internet. If you don't know it, try your issuer URL followed by + /// "/.well-known/openid-configuration". For example, if the issuer is https://example.com, try + /// https://example.com/.well-known/openid-configuration + /// + public string IssuerDiscoveryUrl; + /// + /// Manually specified information for an OpenID Connect issuer. + /// + public OpenIdIssuerInformation IssuerInformation; + /// + /// Override the issuer name for user indexing and lookup. + /// + public string IssuerOverride; + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class CreatePlayerSharedSecretRequest : PlayFabRequestCommon + { + /// + /// Friendly name for this key + /// + public string FriendlyName; + } + + [Serializable] + public class CreatePlayerSharedSecretResult : PlayFabResultCommon + { + /// + /// The player shared secret to use when calling Client/GetTitlePublicKey + /// + public string SecretKey; + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The ResetInterval enables + /// automatically resetting leaderboards on a specified interval. Upon reset, the statistic updates to a new version with no + /// values (effectively removing all players from the leaderboard). The previous version's statistic values are also + /// archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via a call to + /// CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on a + /// schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the now-previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). The AggregationMethod determines what action is taken when a new statistic + /// value is submitted - always update with the new value (Last), use the highest of the old and new values (Max), use the + /// smallest (Min), or add them together (Sum). + /// + [Serializable] + public class CreatePlayerStatisticDefinitionRequest : PlayFabRequestCommon + { + /// + /// the aggregation method to use in updating the statistic (defaults to last) + /// + public StatisticAggregationMethod? AggregationMethod; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// interval at which the values of the statistic for all players are reset (resets begin at the next interval boundary) + /// + public StatisticResetIntervalOption? VersionChangeInterval; + } + + [Serializable] + public class CreatePlayerStatisticDefinitionResult : PlayFabResultCommon + { + /// + /// created statistic definition + /// + public PlayerStatisticDefinition Statistic; + } + + /// + /// Send all the segment details part of CreateSegmentRequest + /// + [Serializable] + public class CreateSegmentRequest : PlayFabRequestCommon + { + /// + /// Segment model with all of the segment properties data. + /// + public SegmentModel SegmentModel; + } + + [Serializable] + public class CreateSegmentResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + /// + /// Segment id. + /// + public string SegmentId; + } + + [Serializable] + public class CreateTaskResult : PlayFabResultCommon + { + /// + /// ID of the task + /// + public string TaskId; + } + + public enum Currency + { + AED, + AFN, + ALL, + AMD, + ANG, + AOA, + ARS, + AUD, + AWG, + AZN, + BAM, + BBD, + BDT, + BGN, + BHD, + BIF, + BMD, + BND, + BOB, + BRL, + BSD, + BTN, + BWP, + BYR, + BZD, + CAD, + CDF, + CHF, + CLP, + CNY, + COP, + CRC, + CUC, + CUP, + CVE, + CZK, + DJF, + DKK, + DOP, + DZD, + EGP, + ERN, + ETB, + EUR, + FJD, + FKP, + GBP, + GEL, + GGP, + GHS, + GIP, + GMD, + GNF, + GTQ, + GYD, + HKD, + HNL, + HRK, + HTG, + HUF, + IDR, + ILS, + IMP, + INR, + IQD, + IRR, + ISK, + JEP, + JMD, + JOD, + JPY, + KES, + KGS, + KHR, + KMF, + KPW, + KRW, + KWD, + KYD, + KZT, + LAK, + LBP, + LKR, + LRD, + LSL, + LYD, + MAD, + MDL, + MGA, + MKD, + MMK, + MNT, + MOP, + MRO, + MUR, + MVR, + MWK, + MXN, + MYR, + MZN, + NAD, + NGN, + NIO, + NOK, + NPR, + NZD, + OMR, + PAB, + PEN, + PGK, + PHP, + PKR, + PLN, + PYG, + QAR, + RON, + RSD, + RUB, + RWF, + SAR, + SBD, + SCR, + SDG, + SEK, + SGD, + SHP, + SLL, + SOS, + SPL, + SRD, + STD, + SVC, + SYP, + SZL, + THB, + TJS, + TMT, + TND, + TOP, + TRY, + TTD, + TVD, + TWD, + TZS, + UAH, + UGX, + USD, + UYU, + UZS, + VEF, + VND, + VUV, + WST, + XAF, + XCD, + XDR, + XOF, + XPF, + YER, + ZAR, + ZMW, + ZWD + } + + [Serializable] + public class DeleteContentRequest : PlayFabRequestCommon + { + /// + /// Key of the content item to be deleted + /// + public string Key; + } + + [Serializable] + public class DeleteInventoryItemsV2SegmentAction : PlayFabBaseModel + { + /// + /// The collection id for where the item will be removed from the player inventory + /// + public string CollectionId; + /// + /// The id of item to be removed from the player + /// + public string ItemId; + /// + /// The stack id for where the item will be removed from the player inventory + /// + public string StackId; + } + + [Serializable] + public class DeleteInventoryItemV2Content : PlayFabBaseModel + { + /// + /// The collection id for where the item will be removed from the player inventory + /// + public string CollectionId; + /// + /// The id of item to be removed from the player + /// + public string ItemId; + /// + /// The stack id for where the item will be removed from the player inventory + /// + public string StackId; + } + + /// + /// Deletes all data associated with the master player account, including data from all titles the player has played, such + /// as statistics, custom data, inventory, purchases, virtual currency balances, characters, group memberships, publisher + /// data, credential data, account linkages, friends list, PlayStream event data, and telemetry event data. Removes the + /// player from all leaderboards and player search indexes. Note, this API queues the player for deletion and returns a + /// receipt immediately. Record the receipt ID for future reference. It may take some time before all player data is fully + /// deleted. Upon completion of the deletion, an email will be sent to the notification email address configured for the + /// title confirming the deletion. Until the player data is fully deleted, attempts to recreate the player with the same + /// user account in the same title will fail with the 'AccountDeleted' error. It is highly recommended to know the impact of + /// the deletion by calling GetPlayedTitleList, before calling this API. + /// + [Serializable] + public class DeleteMasterPlayerAccountRequest : PlayFabRequestCommon + { + /// + /// Developer created string to identify a user without PlayFab ID + /// + public string MetaData; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class DeleteMasterPlayerAccountResult : PlayFabResultCommon + { + /// + /// A notification email with this job receipt Id will be sent to the title notification email address when deletion is + /// complete. + /// + public string JobReceiptId; + /// + /// List of titles from which the player's data will be deleted. + /// + public List TitleIds; + } + + /// + /// Deletes any PlayStream or telemetry event associated with the player from PlayFab. Note, this API queues the data for + /// asynchronous deletion. It may take some time before the data is deleted. + /// + [Serializable] + public class DeleteMasterPlayerEventDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class DeleteMasterPlayerEventDataResult : PlayFabResultCommon + { + } + + /// + /// This API lets developers delete a membership subscription. + /// + [Serializable] + public class DeleteMembershipSubscriptionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Id of the membership to apply the override expiration date to. + /// + public string MembershipId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Id of the subscription that should be deleted from the membership. + /// + public string SubscriptionId; + } + + [Serializable] + public class DeleteMembershipSubscriptionResult : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteOpenIdConnectionRequest : PlayFabRequestCommon + { + /// + /// unique name of the connection + /// + public string ConnectionId; + } + + [Serializable] + public class DeletePlayerContent : PlayFabBaseModel + { + } + + /// + /// Deletes all data associated with the player, including statistics, custom data, inventory, purchases, virtual currency + /// balances, characters and shared group memberships. Removes the player from all leaderboards and player search indexes. + /// Does not delete PlayStream event history associated with the player. Does not delete the publisher user account that + /// created the player in the title nor associated data such as username, password, email address, account linkages, or + /// friends list. Note, this API queues the player for deletion and returns immediately. It may take several minutes or more + /// before all player data is fully deleted. Until the player data is fully deleted, attempts to recreate the player with + /// the same user account in the same title will fail with the 'AccountDeleted' error. + /// + [Serializable] + public class DeletePlayerRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class DeletePlayerResult : PlayFabResultCommon + { + } + + [Serializable] + public class DeletePlayerSegmentAction : PlayFabBaseModel + { + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class DeletePlayerSharedSecretRequest : PlayFabRequestCommon + { + /// + /// The shared secret key to delete + /// + public string SecretKey; + } + + [Serializable] + public class DeletePlayerSharedSecretResult : PlayFabResultCommon + { + } + + [Serializable] + public class DeletePlayerStatisticSegmentAction : PlayFabBaseModel + { + /// + /// Statistic name. + /// + public string StatisticName; + } + + /// + /// Send segment id planning to delete part of DeleteSegmentRequest object + /// + [Serializable] + public class DeleteSegmentRequest : PlayFabRequestCommon + { + /// + /// Segment id. + /// + public string SegmentId; + } + + [Serializable] + public class DeleteSegmentsResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + } + + /// + /// This non-reversible operation will permanently delete the requested store. + /// + [Serializable] + public class DeleteStoreRequest : PlayFabRequestCommon + { + /// + /// catalog version of the store to delete. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unqiue identifier for the store which is to be deleted + /// + public string StoreId; + } + + [Serializable] + public class DeleteStoreResult : PlayFabResultCommon + { + } + + /// + /// After a task is deleted, for tracking purposes, the task instances belonging to this task will still remain. They will + /// become orphaned and does not belongs to any task. Executions of any in-progress task instances will continue. If the + /// task specified does not exist, the deletion is considered a success. + /// + [Serializable] + public class DeleteTaskRequest : PlayFabRequestCommon + { + /// + /// Specify either the task ID or the name of task to be deleted. + /// + public NameIdentifier Identifier; + } + + /// + /// Will delete all the title data associated with the given override label. + /// + [Serializable] + public class DeleteTitleDataOverrideRequest : PlayFabRequestCommon + { + /// + /// Name of the override. + /// + public string OverrideLabel; + } + + [Serializable] + public class DeleteTitleDataOverrideResult : PlayFabResultCommon + { + } + + /// + /// Deletes all data associated with the title, including catalog, virtual currencies, leaderboard statistics, Cloud Script + /// revisions, segment definitions, event rules, tasks, add-ons, secret keys, data encryption keys, and permission policies. + /// Removes the title from its studio and removes all associated developer roles and permissions. Does not delete PlayStream + /// event history associated with the title. Note, this API queues the title for deletion and returns immediately. It may + /// take several hours or more before all title data is fully deleted. All player accounts in the title must be deleted + /// before deleting the title. If any player accounts exist, the API will return a 'TitleContainsUserAccounts' error. Until + /// the title data is fully deleted, attempts to call APIs with the title will fail with the 'TitleDeleted' error. + /// + [Serializable] + public class DeleteTitleRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class DeleteTitleResult : PlayFabResultCommon + { + } + + public enum EffectType + { + Allow, + Deny + } + + [Serializable] + public class EmailNotificationSegmentAction : PlayFabBaseModel + { + /// + /// Email template id. + /// + public string EmailTemplateId; + /// + /// Email template name. + /// + public string EmailTemplateName; + } + + public enum EmailVerificationStatus + { + Unverified, + Pending, + Confirmed + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class ExecuteAzureFunctionSegmentAction : PlayFabBaseModel + { + /// + /// Azure function. + /// + public string AzureFunction; + /// + /// Azure function parameter. + /// + public object FunctionParameter; + /// + /// Generate play stream event. + /// + public bool GenerateFunctionExecutedEvents; + } + + [Serializable] + public class ExecuteCloudScriptContent : PlayFabBaseModel + { + /// + /// Arguments(JSON) to be passed into the cloudscript method + /// + public string CloudScriptMethodArguments; + /// + /// Cloudscript method name + /// + public string CloudScriptMethodName; + /// + /// Publish cloudscript results as playstream event + /// + public bool PublishResultsToPlayStream; + } + + [Serializable] + public class ExecuteCloudScriptResult : PlayFabBaseModel + { + /// + /// Number of PlayFab API requests issued by the CloudScript function + /// + public int APIRequestsIssued; + /// + /// Information about the error, if any, that occurred during execution + /// + public ScriptExecutionError Error; + public double ExecutionTimeSeconds; + /// + /// The name of the function that executed + /// + public string FunctionName; + /// + /// The object returned from the CloudScript function, if any + /// + public object FunctionResult; + /// + /// Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if + /// the total event size is larger than 350KB. + /// + public bool? FunctionResultTooLarge; + /// + /// Number of external HTTP requests issued by the CloudScript function + /// + public int HttpRequestsIssued; + /// + /// Entries logged during the function execution. These include both entries logged in the function code using log.info() + /// and log.error() and error entries for API and HTTP request failures. + /// + public List Logs; + /// + /// Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total + /// event size is larger than 350KB after the FunctionResult was removed. + /// + public bool? LogsTooLarge; + public uint MemoryConsumedBytes; + /// + /// Processor time consumed while executing the function. This does not include time spent waiting on API calls or HTTP + /// requests. + /// + public double ProcessorTimeSeconds; + /// + /// The revision of the CloudScript that executed + /// + public int Revision; + } + + [Serializable] + public class ExecuteCloudScriptSegmentAction : PlayFabBaseModel + { + /// + /// Cloud script function. + /// + public string CloudScriptFunction; + /// + /// Generate play stream event. + /// + public bool CloudScriptPublishResultsToPlayStream; + /// + /// Cloud script function parameter. + /// + public object FunctionParameter; + /// + /// Cloud script function parameter json text. + /// + public string FunctionParameterJson; + } + + [Serializable] + public class ExecuteFunctionContent : PlayFabBaseModel + { + /// + /// Arguments(JSON) to be passed into the cloudscript azure function + /// + public string CloudScriptFunctionArguments; + /// + /// Cloudscript azure function name + /// + public string CloudScriptFunctionName; + /// + /// Publish results from executing the azure function as playstream event + /// + public bool PublishResultsToPlayStream; + } + + /// + /// Exports all data associated with the master player account, including data from all titles the player has played, such + /// as statistics, custom data, inventory, purchases, virtual currency balances, characters, group memberships, publisher + /// data, credential data, account linkages, friends list, PlayStream event data, and telemetry event data. Note, this API + /// queues the player for export and returns a receipt immediately. Record the receipt ID for future reference. It may take + /// some time before the export is available for download. Upon completion of the export, an email containing the URL to + /// download the export dump will be sent to the notification email address configured for the title. + /// + [Serializable] + public class ExportMasterPlayerDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ExportMasterPlayerDataResult : PlayFabResultCommon + { + /// + /// An email with this job receipt Id containing the export download link will be sent to the title notification email + /// address when the export is complete. + /// + public string JobReceiptId; + } + + /// + /// Request must contain the Segment ID + /// + [Serializable] + public class ExportPlayersInSegmentRequest : PlayFabRequestCommon + { + /// + /// Unique identifier of the requested segment. + /// + public string SegmentId; + } + + [Serializable] + public class ExportPlayersInSegmentResult : PlayFabResultCommon + { + /// + /// Unique identifier of the export for the requested Segment. + /// + public string ExportId; + /// + /// Unique identifier of the requested Segment. + /// + public string SegmentId; + } + + [Serializable] + public class FirstLoginDateSegmentFilter : PlayFabBaseModel + { + /// + /// First player login date comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// First player login date. + /// + public DateTime LogInDate; + } + + [Serializable] + public class FirstLoginTimespanSegmentFilter : PlayFabBaseModel + { + /// + /// First player login duration comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// First player login duration. + /// + public double DurationInMinutes; + } + + public enum GenericErrorCodes + { + Success, + UnkownError, + InvalidParams, + AccountNotFound, + AccountBanned, + InvalidUsernameOrPassword, + InvalidTitleId, + InvalidEmailAddress, + EmailAddressNotAvailable, + InvalidUsername, + InvalidPassword, + UsernameNotAvailable, + InvalidSteamTicket, + AccountAlreadyLinked, + LinkedAccountAlreadyClaimed, + InvalidFacebookToken, + AccountNotLinked, + FailedByPaymentProvider, + CouponCodeNotFound, + InvalidContainerItem, + ContainerNotOwned, + KeyNotOwned, + InvalidItemIdInTable, + InvalidReceipt, + ReceiptAlreadyUsed, + ReceiptCancelled, + GameNotFound, + GameModeNotFound, + InvalidGoogleToken, + UserIsNotPartOfDeveloper, + InvalidTitleForDeveloper, + TitleNameConflicts, + UserisNotValid, + ValueAlreadyExists, + BuildNotFound, + PlayerNotInGame, + InvalidTicket, + InvalidDeveloper, + InvalidOrderInfo, + RegistrationIncomplete, + InvalidPlatform, + UnknownError, + SteamApplicationNotOwned, + WrongSteamAccount, + TitleNotActivated, + RegistrationSessionNotFound, + NoSuchMod, + FileNotFound, + DuplicateEmail, + ItemNotFound, + ItemNotOwned, + ItemNotRecycleable, + ItemNotAffordable, + InvalidVirtualCurrency, + WrongVirtualCurrency, + WrongPrice, + NonPositiveValue, + InvalidRegion, + RegionAtCapacity, + ServerFailedToStart, + NameNotAvailable, + InsufficientFunds, + InvalidDeviceID, + InvalidPushNotificationToken, + NoRemainingUses, + InvalidPaymentProvider, + PurchaseInitializationFailure, + DuplicateUsername, + InvalidBuyerInfo, + NoGameModeParamsSet, + BodyTooLarge, + ReservedWordInBody, + InvalidTypeInBody, + InvalidRequest, + ReservedEventName, + InvalidUserStatistics, + NotAuthenticated, + StreamAlreadyExists, + ErrorCreatingStream, + StreamNotFound, + InvalidAccount, + PurchaseDoesNotExist, + InvalidPurchaseTransactionStatus, + APINotEnabledForGameClientAccess, + NoPushNotificationARNForTitle, + BuildAlreadyExists, + BuildPackageDoesNotExist, + CustomAnalyticsEventsNotEnabledForTitle, + InvalidSharedGroupId, + NotAuthorized, + MissingTitleGoogleProperties, + InvalidItemProperties, + InvalidPSNAuthCode, + InvalidItemId, + PushNotEnabledForAccount, + PushServiceError, + ReceiptDoesNotContainInAppItems, + ReceiptContainsMultipleInAppItems, + InvalidBundleID, + JavascriptException, + InvalidSessionTicket, + UnableToConnectToDatabase, + InternalServerError, + InvalidReportDate, + ReportNotAvailable, + DatabaseThroughputExceeded, + InvalidGameTicket, + ExpiredGameTicket, + GameTicketDoesNotMatchLobby, + LinkedDeviceAlreadyClaimed, + DeviceAlreadyLinked, + DeviceNotLinked, + PartialFailure, + PublisherNotSet, + ServiceUnavailable, + VersionNotFound, + RevisionNotFound, + InvalidPublisherId, + DownstreamServiceUnavailable, + APINotIncludedInTitleUsageTier, + DAULimitExceeded, + APIRequestLimitExceeded, + InvalidAPIEndpoint, + BuildNotAvailable, + ConcurrentEditError, + ContentNotFound, + CharacterNotFound, + CloudScriptNotFound, + ContentQuotaExceeded, + InvalidCharacterStatistics, + PhotonNotEnabledForTitle, + PhotonApplicationNotFound, + PhotonApplicationNotAssociatedWithTitle, + InvalidEmailOrPassword, + FacebookAPIError, + InvalidContentType, + KeyLengthExceeded, + DataLengthExceeded, + TooManyKeys, + FreeTierCannotHaveVirtualCurrency, + MissingAmazonSharedKey, + AmazonValidationError, + InvalidPSNIssuerId, + PSNInaccessible, + ExpiredAuthToken, + FailedToGetEntitlements, + FailedToConsumeEntitlement, + TradeAcceptingUserNotAllowed, + TradeInventoryItemIsAssignedToCharacter, + TradeInventoryItemIsBundle, + TradeStatusNotValidForCancelling, + TradeStatusNotValidForAccepting, + TradeDoesNotExist, + TradeCancelled, + TradeAlreadyFilled, + TradeWaitForStatusTimeout, + TradeInventoryItemExpired, + TradeMissingOfferedAndAcceptedItems, + TradeAcceptedItemIsBundle, + TradeAcceptedItemIsStackable, + TradeInventoryItemInvalidStatus, + TradeAcceptedCatalogItemInvalid, + TradeAllowedUsersInvalid, + TradeInventoryItemDoesNotExist, + TradeInventoryItemIsConsumed, + TradeInventoryItemIsStackable, + TradeAcceptedItemsMismatch, + InvalidKongregateToken, + FeatureNotConfiguredForTitle, + NoMatchingCatalogItemForReceipt, + InvalidCurrencyCode, + NoRealMoneyPriceForCatalogItem, + TradeInventoryItemIsNotTradable, + TradeAcceptedCatalogItemIsNotTradable, + UsersAlreadyFriends, + LinkedIdentifierAlreadyClaimed, + CustomIdNotLinked, + TotalDataSizeExceeded, + DeleteKeyConflict, + InvalidXboxLiveToken, + ExpiredXboxLiveToken, + ResettableStatisticVersionRequired, + NotAuthorizedByTitle, + NoPartnerEnabled, + InvalidPartnerResponse, + APINotEnabledForGameServerAccess, + StatisticNotFound, + StatisticNameConflict, + StatisticVersionClosedForWrites, + StatisticVersionInvalid, + APIClientRequestRateLimitExceeded, + InvalidJSONContent, + InvalidDropTable, + StatisticVersionAlreadyIncrementedForScheduledInterval, + StatisticCountLimitExceeded, + StatisticVersionIncrementRateExceeded, + ContainerKeyInvalid, + CloudScriptExecutionTimeLimitExceeded, + NoWritePermissionsForEvent, + CloudScriptFunctionArgumentSizeExceeded, + CloudScriptAPIRequestCountExceeded, + CloudScriptAPIRequestError, + CloudScriptHTTPRequestError, + InsufficientGuildRole, + GuildNotFound, + OverLimit, + EventNotFound, + InvalidEventField, + InvalidEventName, + CatalogNotConfigured, + OperationNotSupportedForPlatform, + SegmentNotFound, + StoreNotFound, + InvalidStatisticName, + TitleNotQualifiedForLimit, + InvalidServiceLimitLevel, + ServiceLimitLevelInTransition, + CouponAlreadyRedeemed, + GameServerBuildSizeLimitExceeded, + GameServerBuildCountLimitExceeded, + VirtualCurrencyCountLimitExceeded, + VirtualCurrencyCodeExists, + TitleNewsItemCountLimitExceeded, + InvalidTwitchToken, + TwitchResponseError, + ProfaneDisplayName, + UserAlreadyAdded, + InvalidVirtualCurrencyCode, + VirtualCurrencyCannotBeDeleted, + IdentifierAlreadyClaimed, + IdentifierNotLinked, + InvalidContinuationToken, + ExpiredContinuationToken, + InvalidSegment, + InvalidSessionId, + SessionLogNotFound, + InvalidSearchTerm, + TwoFactorAuthenticationTokenRequired, + GameServerHostCountLimitExceeded, + PlayerTagCountLimitExceeded, + RequestAlreadyRunning, + ActionGroupNotFound, + MaximumSegmentBulkActionJobsRunning, + NoActionsOnPlayersInSegmentJob, + DuplicateStatisticName, + ScheduledTaskNameConflict, + ScheduledTaskCreateConflict, + InvalidScheduledTaskName, + InvalidTaskSchedule, + SteamNotEnabledForTitle, + LimitNotAnUpgradeOption, + NoSecretKeyEnabledForCloudScript, + TaskNotFound, + TaskInstanceNotFound, + InvalidIdentityProviderId, + MisconfiguredIdentityProvider, + InvalidScheduledTaskType, + BillingInformationRequired, + LimitedEditionItemUnavailable, + InvalidAdPlacementAndReward, + AllAdPlacementViewsAlreadyConsumed, + GoogleOAuthNotConfiguredForTitle, + GoogleOAuthError, + UserNotFriend, + InvalidSignature, + InvalidPublicKey, + GoogleOAuthNoIdTokenIncludedInResponse, + StatisticUpdateInProgress, + LeaderboardVersionNotAvailable, + StatisticAlreadyHasPrizeTable, + PrizeTableHasOverlappingRanks, + PrizeTableHasMissingRanks, + PrizeTableRankStartsAtZero, + InvalidStatistic, + ExpressionParseFailure, + ExpressionInvokeFailure, + ExpressionTooLong, + DataUpdateRateExceeded, + RestrictedEmailDomain, + EncryptionKeyDisabled, + EncryptionKeyMissing, + EncryptionKeyBroken, + NoSharedSecretKeyConfigured, + SecretKeyNotFound, + PlayerSecretAlreadyConfigured, + APIRequestsDisabledForTitle, + InvalidSharedSecretKey, + PrizeTableHasNoRanks, + ProfileDoesNotExist, + ContentS3OriginBucketNotConfigured, + InvalidEnvironmentForReceipt, + EncryptedRequestNotAllowed, + SignedRequestNotAllowed, + RequestViewConstraintParamsNotAllowed, + BadPartnerConfiguration, + XboxBPCertificateFailure, + XboxXASSExchangeFailure, + InvalidEntityId, + StatisticValueAggregationOverflow, + EmailMessageFromAddressIsMissing, + EmailMessageToAddressIsMissing, + SmtpServerAuthenticationError, + SmtpServerLimitExceeded, + SmtpServerInsufficientStorage, + SmtpServerCommunicationError, + SmtpServerGeneralFailure, + EmailClientTimeout, + EmailClientCanceledTask, + EmailTemplateMissing, + InvalidHostForTitleId, + EmailConfirmationTokenDoesNotExist, + EmailConfirmationTokenExpired, + AccountDeleted, + PlayerSecretNotConfigured, + InvalidSignatureTime, + NoContactEmailAddressFound, + InvalidAuthToken, + AuthTokenDoesNotExist, + AuthTokenExpired, + AuthTokenAlreadyUsedToResetPassword, + MembershipNameTooLong, + MembershipNotFound, + GoogleServiceAccountInvalid, + GoogleServiceAccountParseFailure, + EntityTokenMissing, + EntityTokenInvalid, + EntityTokenExpired, + EntityTokenRevoked, + InvalidProductForSubscription, + XboxInaccessible, + SubscriptionAlreadyTaken, + SmtpAddonNotEnabled, + APIConcurrentRequestLimitExceeded, + XboxRejectedXSTSExchangeRequest, + VariableNotDefined, + TemplateVersionNotDefined, + FileTooLarge, + TitleDeleted, + TitleContainsUserAccounts, + TitleDeletionPlayerCleanupFailure, + EntityFileOperationPending, + NoEntityFileOperationPending, + EntityProfileVersionMismatch, + TemplateVersionTooOld, + MembershipDefinitionInUse, + PaymentPageNotConfigured, + FailedLoginAttemptRateLimitExceeded, + EntityBlockedByGroup, + RoleDoesNotExist, + EntityIsAlreadyMember, + DuplicateRoleId, + GroupInvitationNotFound, + GroupApplicationNotFound, + OutstandingInvitationAcceptedInstead, + OutstandingApplicationAcceptedInstead, + RoleIsGroupDefaultMember, + RoleIsGroupAdmin, + RoleNameNotAvailable, + GroupNameNotAvailable, + EmailReportAlreadySent, + EmailReportRecipientBlacklisted, + EventNamespaceNotAllowed, + EventEntityNotAllowed, + InvalidEntityType, + NullTokenResultFromAad, + InvalidTokenResultFromAad, + NoValidCertificateForAad, + InvalidCertificateForAad, + DuplicateDropTableId, + MultiplayerServerError, + MultiplayerServerTooManyRequests, + MultiplayerServerNoContent, + MultiplayerServerBadRequest, + MultiplayerServerUnauthorized, + MultiplayerServerForbidden, + MultiplayerServerNotFound, + MultiplayerServerConflict, + MultiplayerServerInternalServerError, + MultiplayerServerUnavailable, + ExplicitContentDetected, + PIIContentDetected, + InvalidScheduledTaskParameter, + PerEntityEventRateLimitExceeded, + TitleDefaultLanguageNotSet, + EmailTemplateMissingDefaultVersion, + FacebookInstantGamesIdNotLinked, + InvalidFacebookInstantGamesSignature, + FacebookInstantGamesAuthNotConfiguredForTitle, + EntityProfileConstraintValidationFailed, + TelemetryIngestionKeyPending, + TelemetryIngestionKeyNotFound, + StatisticChildNameInvalid, + DataIntegrityError, + VirtualCurrencyCannotBeSetToOlderVersion, + VirtualCurrencyMustBeWithinIntegerRange, + EmailTemplateInvalidSyntax, + EmailTemplateMissingCallback, + PushNotificationTemplateInvalidPayload, + InvalidLocalizedPushNotificationLanguage, + MissingLocalizedPushNotificationMessage, + PushNotificationTemplateMissingPlatformPayload, + PushNotificationTemplatePayloadContainsInvalidJson, + PushNotificationTemplateContainsInvalidIosPayload, + PushNotificationTemplateContainsInvalidAndroidPayload, + PushNotificationTemplateIosPayloadMissingNotificationBody, + PushNotificationTemplateAndroidPayloadMissingNotificationBody, + PushNotificationTemplateNotFound, + PushNotificationTemplateMissingDefaultVersion, + PushNotificationTemplateInvalidSyntax, + PushNotificationTemplateNoCustomPayloadForV1, + NoLeaderboardForStatistic, + TitleNewsMissingDefaultLanguage, + TitleNewsNotFound, + TitleNewsDuplicateLanguage, + TitleNewsMissingTitleOrBody, + TitleNewsInvalidLanguage, + EmailRecipientBlacklisted, + InvalidGameCenterAuthRequest, + GameCenterAuthenticationFailed, + CannotEnablePartiesForTitle, + PartyError, + PartyRequests, + PartyNoContent, + PartyBadRequest, + PartyUnauthorized, + PartyForbidden, + PartyNotFound, + PartyConflict, + PartyInternalServerError, + PartyUnavailable, + PartyTooManyRequests, + PushNotificationTemplateMissingName, + CannotEnableMultiplayerServersForTitle, + WriteAttemptedDuringExport, + MultiplayerServerTitleQuotaCoresExceeded, + AutomationRuleNotFound, + EntityAPIKeyLimitExceeded, + EntityAPIKeyNotFound, + EntityAPIKeyOrSecretInvalid, + EconomyServiceUnavailable, + EconomyServiceInternalError, + QueryRateLimitExceeded, + EntityAPIKeyCreationDisabledForEntity, + ForbiddenByEntityPolicy, + UpdateInventoryRateLimitExceeded, + StudioCreationRateLimited, + StudioCreationInProgress, + DuplicateStudioName, + StudioNotFound, + StudioDeleted, + StudioDeactivated, + StudioActivated, + TitleCreationRateLimited, + TitleCreationInProgress, + DuplicateTitleName, + TitleActivationRateLimited, + TitleActivationInProgress, + TitleDeactivated, + TitleActivated, + CloudScriptAzureFunctionsExecutionTimeLimitExceeded, + CloudScriptAzureFunctionsArgumentSizeExceeded, + CloudScriptAzureFunctionsReturnSizeExceeded, + CloudScriptAzureFunctionsHTTPRequestError, + VirtualCurrencyBetaGetError, + VirtualCurrencyBetaCreateError, + VirtualCurrencyBetaInitialDepositSaveError, + VirtualCurrencyBetaSaveError, + VirtualCurrencyBetaDeleteError, + VirtualCurrencyBetaRestoreError, + VirtualCurrencyBetaSaveConflict, + VirtualCurrencyBetaUpdateError, + InsightsManagementDatabaseNotFound, + InsightsManagementOperationNotFound, + InsightsManagementErrorPendingOperationExists, + InsightsManagementSetPerformanceLevelInvalidParameter, + InsightsManagementSetStorageRetentionInvalidParameter, + InsightsManagementGetStorageUsageInvalidParameter, + InsightsManagementGetOperationStatusInvalidParameter, + DuplicatePurchaseTransactionId, + EvaluationModePlayerCountExceeded, + GetPlayersInSegmentRateLimitExceeded, + CloudScriptFunctionNameSizeExceeded, + PaidInsightsFeaturesNotEnabled, + CloudScriptAzureFunctionsQueueRequestError, + EvaluationModeTitleCountExceeded, + InsightsManagementTitleNotInFlight, + LimitNotFound, + LimitNotAvailableViaAPI, + InsightsManagementSetStorageRetentionBelowMinimum, + InsightsManagementSetStorageRetentionAboveMaximum, + AppleNotEnabledForTitle, + InsightsManagementNewActiveEventExportLimitInvalid, + InsightsManagementSetPerformanceRateLimited, + PartyRequestsThrottledFromRateLimiter, + XboxServiceTooManyRequests, + NintendoSwitchNotEnabledForTitle, + RequestMultiplayerServersThrottledFromRateLimiter, + TitleDataOverrideNotFound, + DuplicateKeys, + WasNotCreatedWithCloudRoot, + LegacyMultiplayerServersDeprecated, + VirtualCurrencyCurrentlyUnavailable, + SteamUserNotFound, + ElasticSearchOperationFailed, + NotImplemented, + PublisherNotFound, + PublisherDeleted, + ApiDisabledForMigration, + ResourceNameUpdateNotAllowed, + ApiNotEnabledForTitle, + DuplicateTitleNameForPublisher, + AzureTitleCreationInProgress, + TitleConstraintsPublisherDeletion, + InvalidPlayerAccountPoolId, + PlayerAccountPoolNotFound, + PlayerAccountPoolDeleted, + TitleCleanupInProgress, + AzureResourceConcurrentOperationInProgress, + TitlePublisherUpdateNotAllowed, + AzureResourceManagerNotSupportedInStamp, + ApiNotIncludedInAzurePlayFabFeatureSet, + GoogleServiceAccountFailedAuth, + GoogleAPIServiceUnavailable, + GoogleAPIServiceUnknownError, + NoValidIdentityForAad, + PlayerIdentityLinkNotFound, + PhotonApplicationIdAlreadyInUse, + CloudScriptUnableToDeleteProductionRevision, + CustomIdNotFound, + AutomationInvalidInput, + AutomationInvalidRuleName, + AutomationRuleAlreadyExists, + AutomationRuleLimitExceeded, + InvalidGooglePlayGamesServerAuthCode, + PlayStreamConnectionFailed, + InvalidEventContents, + InsightsV1Deprecated, + AnalysisSubscriptionNotFound, + AnalysisSubscriptionFailed, + AnalysisSubscriptionFoundAlready, + AnalysisSubscriptionManagementInvalidInput, + InvalidGameCenterId, + InvalidNintendoSwitchAccountId, + EntityAPIKeysNotSupported, + IpAddressBanned, + EntityLineageBanned, + NamespaceMismatch, + InvalidServiceConfiguration, + InvalidNamespaceMismatch, + LeaderboardColumnLengthMismatch, + InvalidStatisticScore, + LeaderboardColumnsNotSpecified, + LeaderboardMaxSizeTooLarge, + InvalidAttributeStatisticsSpecified, + LeaderboardNotFound, + TokenSigningKeyNotFound, + LeaderboardNameConflict, + LinkedStatisticColumnMismatch, + NoLinkedStatisticToLeaderboard, + StatDefinitionAlreadyLinkedToLeaderboard, + LinkingStatsNotAllowedForEntityType, + LeaderboardCountLimitExceeded, + LeaderboardSizeLimitExceeded, + LeaderboardDefinitionModificationNotAllowedWhileLinked, + StatisticDefinitionModificationNotAllowedWhileLinked, + LeaderboardUpdateNotAllowedWhileLinked, + CloudScriptAzureFunctionsEventHubRequestError, + ExternalEntityNotAllowedForTier, + InvalidBaseTimeForInterval, + EntityTypeMismatchWithStatDefinition, + SpecifiedVersionLeaderboardNotFound, + LeaderboardColumnLengthMismatchWithStatDefinition, + DuplicateColumnNameFound, + LinkedStatisticColumnNotFound, + LinkedStatisticColumnRequired, + MultipleLinkedStatisticsNotAllowed, + DuplicateLinkedStatisticColumnNameFound, + AggregationTypeNotAllowedForMultiColumnStatistic, + MaxQueryableVersionsValueNotAllowedForTier, + StatisticDefinitionHasNullOrEmptyVersionConfiguration, + StatisticColumnLengthMismatch, + MatchmakingEntityInvalid, + MatchmakingPlayerAttributesInvalid, + MatchmakingQueueNotFound, + MatchmakingMatchNotFound, + MatchmakingTicketNotFound, + MatchmakingAlreadyJoinedTicket, + MatchmakingTicketAlreadyCompleted, + MatchmakingQueueConfigInvalid, + MatchmakingMemberProfileInvalid, + NintendoSwitchDeviceIdNotLinked, + MatchmakingNotEnabled, + MatchmakingPlayerAttributesTooLarge, + MatchmakingNumberOfPlayersInTicketTooLarge, + MatchmakingAttributeInvalid, + MatchmakingPlayerHasNotJoinedTicket, + MatchmakingRateLimitExceeded, + MatchmakingTicketMembershipLimitExceeded, + MatchmakingUnauthorized, + MatchmakingQueueLimitExceeded, + MatchmakingRequestTypeMismatch, + MatchmakingBadRequest, + PubSubFeatureNotEnabledForTitle, + PubSubTooManyRequests, + PubSubConnectionNotFoundForEntity, + PubSubConnectionHandleInvalid, + PubSubSubscriptionLimitExceeded, + TitleConfigNotFound, + TitleConfigUpdateConflict, + TitleConfigSerializationError, + CatalogApiNotImplemented, + CatalogEntityInvalid, + CatalogTitleIdMissing, + CatalogPlayerIdMissing, + CatalogClientIdentityInvalid, + CatalogOneOrMoreFilesInvalid, + CatalogItemMetadataInvalid, + CatalogItemIdInvalid, + CatalogSearchParameterInvalid, + CatalogFeatureDisabled, + CatalogConfigInvalid, + CatalogItemTypeInvalid, + CatalogBadRequest, + CatalogTooManyRequests, + InvalidCatalogItemConfiguration, + ExportInvalidStatusUpdate, + ExportInvalidPrefix, + ExportBlobContainerDoesNotExist, + ExportNotFound, + ExportCouldNotUpdate, + ExportInvalidStorageType, + ExportAmazonBucketDoesNotExist, + ExportInvalidBlobStorage, + ExportKustoException, + ExportKustoConnectionFailed, + ExportUnknownError, + ExportCantEditPendingExport, + ExportLimitExports, + ExportLimitEvents, + ExportInvalidPartitionStatusModification, + ExportCouldNotCreate, + ExportNoBackingDatabaseFound, + ExportCouldNotDelete, + ExportCannotDetermineEventQuery, + ExportInvalidQuerySchemaModification, + ExportQuerySchemaMissingRequiredColumns, + ExportCannotParseQuery, + ExportControlCommandsNotAllowed, + ExportQueryMissingTableReference, + ExportInsightsV1Deprecated, + ExplorerBasicInvalidQueryName, + ExplorerBasicInvalidQueryDescription, + ExplorerBasicInvalidQueryConditions, + ExplorerBasicInvalidQueryStartDate, + ExplorerBasicInvalidQueryEndDate, + ExplorerBasicInvalidQueryGroupBy, + ExplorerBasicInvalidQueryAggregateType, + ExplorerBasicInvalidQueryAggregateProperty, + ExplorerBasicLoadQueriesError, + ExplorerBasicLoadQueryError, + ExplorerBasicCreateQueryError, + ExplorerBasicDeleteQueryError, + ExplorerBasicUpdateQueryError, + ExplorerBasicSavedQueriesLimit, + ExplorerBasicSavedQueryNotFound, + TenantShardMapperShardNotFound, + TitleNotEnabledForParty, + PartyVersionNotFound, + MultiplayerServerBuildReferencedByMatchmakingQueue, + MultiplayerServerBuildReferencedByBuildAlias, + MultiplayerServerBuildAliasReferencedByMatchmakingQueue, + PartySerializationError, + ExperimentationExperimentStopped, + ExperimentationExperimentRunning, + ExperimentationExperimentNotFound, + ExperimentationExperimentNeverStarted, + ExperimentationExperimentDeleted, + ExperimentationClientTimeout, + ExperimentationInvalidVariantConfiguration, + ExperimentationInvalidVariableConfiguration, + ExperimentInvalidId, + ExperimentationNoScorecard, + ExperimentationTreatmentAssignmentFailed, + ExperimentationTreatmentAssignmentDisabled, + ExperimentationInvalidDuration, + ExperimentationMaxExperimentsReached, + ExperimentationExperimentSchedulingInProgress, + ExperimentationInvalidEndDate, + ExperimentationInvalidStartDate, + ExperimentationMaxDurationExceeded, + ExperimentationExclusionGroupNotFound, + ExperimentationExclusionGroupInsufficientCapacity, + ExperimentationExclusionGroupCannotDelete, + ExperimentationExclusionGroupInvalidTrafficAllocation, + ExperimentationExclusionGroupInvalidName, + MaxActionDepthExceeded, + TitleNotOnUpdatedPricingPlan, + SegmentManagementTitleNotInFlight, + SegmentManagementNoExpressionTree, + SegmentManagementTriggerActionCountOverLimit, + SegmentManagementSegmentCountOverLimit, + SegmentManagementInvalidSegmentId, + SegmentManagementInvalidInput, + SegmentManagementInvalidSegmentName, + DeleteSegmentRateLimitExceeded, + CreateSegmentRateLimitExceeded, + UpdateSegmentRateLimitExceeded, + GetSegmentsRateLimitExceeded, + AsyncExportNotInFlight, + AsyncExportNotFound, + AsyncExportRateLimitExceeded, + AnalyticsSegmentCountOverLimit, + SnapshotNotFound, + InventoryApiNotImplemented, + LobbyDoesNotExist, + LobbyRateLimitExceeded, + LobbyPlayerAlreadyJoined, + LobbyNotJoinable, + LobbyMemberCannotRejoin, + LobbyCurrentPlayersMoreThanMaxPlayers, + LobbyPlayerNotPresent, + LobbyBadRequest, + LobbyPlayerMaxLobbyLimitExceeded, + LobbyNewOwnerMustBeConnected, + LobbyCurrentOwnerStillConnected, + LobbyMemberIsNotOwner, + LobbyServerMismatch, + LobbyServerNotFound, + LobbyDifferentServerAlreadyJoined, + LobbyServerAlreadyJoined, + LobbyIsNotClientOwned, + LobbyDoesNotUseConnections, + EventSamplingInvalidRatio, + EventSamplingInvalidEventNamespace, + EventSamplingInvalidEventName, + EventSamplingRatioNotFound, + TelemetryKeyNotFound, + TelemetryKeyInvalidName, + TelemetryKeyAlreadyExists, + TelemetryKeyInvalid, + TelemetryKeyCountOverLimit, + TelemetryKeyDeactivated, + TelemetryKeyLongInsightsRetentionNotAllowed, + EventSinkConnectionInvalid, + EventSinkConnectionUnauthorized, + EventSinkRegionInvalid, + EventSinkLimitExceeded, + EventSinkSasTokenInvalid, + EventSinkNotFound, + EventSinkNameInvalid, + EventSinkSasTokenPermissionInvalid, + EventSinkSecretInvalid, + EventSinkTenantNotFound, + EventSinkAadNotFound, + EventSinkDatabaseNotFound, + EventSinkTitleUnauthorized, + EventSinkInsufficientRoleAssignment, + EventSinkContainerNotFound, + EventSinkTenantIdInvalid, + OperationCanceled, + InvalidDisplayNameRandomSuffixLength, + AllowNonUniquePlayerDisplayNamesDisableNotAllowed, + PartitionedEventInvalid, + PartitionedEventCountOverLimit, + ManageEventNamespaceInvalid, + ManageEventNameInvalid, + ManagedEventNotFound, + ManageEventsInvalidRatio, + ManagedEventInvalid, + PlayerCustomPropertiesPropertyNameTooLong, + PlayerCustomPropertiesPropertyNameIsInvalid, + PlayerCustomPropertiesStringPropertyValueTooLong, + PlayerCustomPropertiesValueIsInvalidType, + PlayerCustomPropertiesVersionMismatch, + PlayerCustomPropertiesPropertyCountTooHigh, + PlayerCustomPropertiesDuplicatePropertyName, + PlayerCustomPropertiesPropertyDoesNotExist, + AddonAlreadyExists, + AddonDoesntExist, + CopilotDisabled, + CopilotInvalidRequest, + TrueSkillUnauthorized, + TrueSkillInvalidTitleId, + TrueSkillInvalidScenarioId, + TrueSkillInvalidModelId, + TrueSkillInvalidModelName, + TrueSkillInvalidPlayerIds, + TrueSkillInvalidEntityKey, + TrueSkillInvalidConditionKey, + TrueSkillInvalidConditionValue, + TrueSkillInvalidConditionAffinityWeight, + TrueSkillInvalidEventName, + TrueSkillMatchResultCreated, + TrueSkillMatchResultAlreadySubmitted, + TrueSkillBadPlayerIdInMatchResult, + TrueSkillInvalidBotIdInMatchResult, + TrueSkillDuplicatePlayerInMatchResult, + TrueSkillNoPlayerInMatchResultTeam, + TrueSkillPlayersInMatchResultExceedingLimit, + TrueSkillInvalidPreMatchPartyInMatchResult, + TrueSkillInvalidTimestampInMatchResult, + TrueSkillStartTimeMissingInMatchResult, + TrueSkillEndTimeMissingInMatchResult, + TrueSkillInvalidPlayerSecondsPlayedInMatchResult, + TrueSkillNoTeamInMatchResult, + TrueSkillNotEnoughTeamsInMatchResult, + TrueSkillInvalidRanksInMatchResult, + TrueSkillNoWinnerInMatchResult, + TrueSkillMissingRequiredCondition, + TrueSkillMissingRequiredEvent, + TrueSkillUnknownEventName, + TrueSkillInvalidEventCount, + TrueSkillUnknownConditionKey, + TrueSkillUnknownConditionValue, + TrueSkillScenarioConfigDoesNotExist, + TrueSkillUnknownModelId, + TrueSkillNoModelInScenario, + TrueSkillNotSupportedForTitle, + TrueSkillModelIsNotActive, + TrueSkillUnauthorizedToQueryOtherPlayerSkills, + TrueSkillInvalidMaxIterations, + TrueSkillEndTimeBeforeStartTime, + TrueSkillInvalidJobId, + TrueSkillInvalidMetadataId, + TrueSkillMissingBuildVerison, + TrueSkillJobAlreadyExists, + TrueSkillJobNotFound, + TrueSkillOperationCanceled, + TrueSkillActiveModelLimitExceeded, + TrueSkillTotalModelLimitExceeded, + TrueSkillUnknownInitialModelId, + TrueSkillUnauthorizedForJob, + TrueSkillInvalidScenarioName, + TrueSkillConditionStateIsRequired, + TrueSkillEventStateIsRequired, + TrueSkillDuplicateEvent, + TrueSkillDuplicateCondition, + TrueSkillInvalidAnomalyThreshold, + TrueSkillConditionKeyLimitExceeded, + TrueSkillConditionValuePerKeyLimitExceeded, + TrueSkillInvalidTimestamp, + TrueSkillEventLimitExceeded, + TrueSkillInvalidPlayers, + TrueSkillTrueSkillPlayerNull, + TrueSkillInvalidPlayerId, + TrueSkillInvalidSquadSize, + TrueSkillConditionSetNotInModel, + TrueSkillModelStateInvalidForOperation, + TrueSkillScenarioContainsActiveModel, + GameSaveManifestNotFound, + GameSaveManifestVersionAlreadyExists, + GameSaveConflictUpdatingManifest, + GameSaveManifestUpdatesNotAllowed, + GameSaveFileAlreadyExists, + GameSaveManifestVersionNotFinalized, + GameSaveUnknownFileInManifest, + GameSaveFileExceededReportedSize, + GameSaveFileNotUploaded, + GameSaveBadRequest, + GameSaveOperationNotAllowed, + StateShareForbidden, + StateShareTitleNotInFlight, + StateShareStateNotFound, + StateShareLinkNotFound, + StateShareStateRedemptionLimitExceeded, + StateShareStateRedemptionLimitNotUpdated, + StateShareCreatedStatesLimitExceeded, + StateShareIdMissingOrMalformed + } + + [Serializable] + public class GetActionsOnPlayersInSegmentTaskInstanceResult : PlayFabResultCommon + { + /// + /// Parameter of this task instance + /// + public ActionsOnPlayersInSegmentTaskParameter Parameter; + /// + /// Status summary of the actions-on-players-in-segment task instance + /// + public ActionsOnPlayersInSegmentTaskSummary Summary; + } + + /// + /// Request has no paramaters. + /// + [Serializable] + public class GetAllSegmentsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetAllSegmentsResult : PlayFabResultCommon + { + /// + /// Array of segments for this title. + /// + public List Segments; + } + + [Serializable] + public class GetCatalogItemsRequest : PlayFabRequestCommon + { + /// + /// Which catalog is being requested. If null, uses the default catalog. + /// + public string CatalogVersion; + } + + [Serializable] + public class GetCatalogItemsResult : PlayFabResultCommon + { + /// + /// Array of items which can be purchased. + /// + public List Catalog; + } + + [Serializable] + public class GetCloudScriptRevisionRequest : PlayFabRequestCommon + { + /// + /// Revision number. If left null, defaults to the latest revision + /// + public int? Revision; + /// + /// Version number. If left null, defaults to the latest version + /// + public int? Version; + } + + [Serializable] + public class GetCloudScriptRevisionResult : PlayFabResultCommon + { + /// + /// Time this revision was created + /// + public DateTime CreatedAt; + /// + /// List of Cloud Script files in this revision. + /// + public List Files; + /// + /// True if this is the currently published revision + /// + public bool IsPublished; + /// + /// Revision number. + /// + public int Revision; + /// + /// Version number. + /// + public int Version; + } + + [Serializable] + public class GetCloudScriptTaskInstanceResult : PlayFabResultCommon + { + /// + /// Parameter of this task instance + /// + public CloudScriptTaskParameter Parameter; + /// + /// Status summary of the CloudScript task instance + /// + public CloudScriptTaskSummary Summary; + } + + [Serializable] + public class GetCloudScriptVersionsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetCloudScriptVersionsResult : PlayFabResultCommon + { + /// + /// List of versions + /// + public List Versions; + } + + [Serializable] + public class GetContentListRequest : PlayFabRequestCommon + { + /// + /// Limits the response to keys that begin with the specified prefix. You can use prefixes to list contents under a folder, + /// or for a specified version, etc. + /// + public string Prefix; + } + + [Serializable] + public class GetContentListResult : PlayFabResultCommon + { + /// + /// List of content items. + /// + public List Contents; + /// + /// Number of content items returned. We currently have a maximum of 1000 items limit. + /// + public int ItemCount; + /// + /// The total size of listed contents in bytes. + /// + public uint TotalSize; + } + + [Serializable] + public class GetContentUploadUrlRequest : PlayFabRequestCommon + { + /// + /// A standard MIME type describing the format of the contents. The same MIME type has to be set in the header when + /// uploading the content. If not specified, the MIME type is 'binary/octet-stream' by default. + /// + public string ContentType; + /// + /// Key of the content item to upload, usually formatted as a path, e.g. images/a.png + /// + public string Key; + } + + [Serializable] + public class GetContentUploadUrlResult : PlayFabResultCommon + { + /// + /// URL for uploading content via HTTP PUT method. The URL requires the 'x-ms-blob-type' header to have the value + /// 'BlockBlob'. The URL will expire in approximately one hour. + /// + public string URL; + } + + /// + /// Gets the download URL for the requested report data (in CSV form). The reports available through this API call are those + /// available in the Game Manager, in the Analytics->Reports tab. + /// + [Serializable] + public class GetDataReportRequest : PlayFabRequestCommon + { + /// + /// Reporting year (UTC) + /// + public int Day; + /// + /// Reporting month (UTC) + /// + public int Month; + /// + /// Report name + /// + public string ReportName; + /// + /// Reporting year (UTC) + /// + public int Year; + } + + [Serializable] + public class GetDataReportResult : PlayFabResultCommon + { + /// + /// The URL where the requested report can be downloaded. This can be any PlayFab generated reports. The full list of + /// reports can be found at: https://docs.microsoft.com/en-us/gaming/playfab/features/analytics/reports/quickstart. + /// + public string DownloadUrl; + } + + /// + /// Useful for identifying titles of which the player's data will be deleted by DeleteMasterPlayer. + /// + [Serializable] + public class GetPlayedTitleListRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayedTitleListResult : PlayFabResultCommon + { + /// + /// List of titles the player has played + /// + public List TitleIds; + } + + /// + /// Gets a player ID from an auth token. The token expires after 30 minutes and cannot be used to look up a player when + /// expired. + /// + [Serializable] + public class GetPlayerIdFromAuthTokenRequest : PlayFabRequestCommon + { + /// + /// The auth token of the player requesting the password reset. + /// + public string Token; + /// + /// The type of auth token of the player requesting the password reset. + /// + public AuthTokenType TokenType; + } + + [Serializable] + public class GetPlayerIdFromAuthTokenResult : PlayFabResultCommon + { + /// + /// The player ID from the token passed in + /// + public string PlayFabId; + } + + /// + /// This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class GetPlayerProfileRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + } + + [Serializable] + public class GetPlayerProfileResult : PlayFabResultCommon + { + /// + /// The profile of the player. This profile is not guaranteed to be up-to-date. For a new player, this profile will not + /// exist. + /// + public PlayerProfileModel PlayerProfile; + } + + [Serializable] + public class GetPlayerSegmentsResult : PlayFabResultCommon + { + /// + /// Array of segments the requested player currently belongs to. + /// + public List Segments; + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class GetPlayerSharedSecretsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetPlayerSharedSecretsResult : PlayFabResultCommon + { + /// + /// The player shared secret to use when calling Client/GetTitlePublicKey + /// + public List SharedSecrets; + } + + /// + /// Request must contain the ExportId + /// + [Serializable] + public class GetPlayersInSegmentExportRequest : PlayFabRequestCommon + { + /// + /// Unique identifier of the export for the requested Segment. + /// + public string ExportId; + } + + [Serializable] + public class GetPlayersInSegmentExportResponse : PlayFabResultCommon + { + /// + /// Url from which the index file can be downloaded. + /// + public string IndexUrl; + /// + /// Shows the current status of the export + /// + public string State; + } + + /// + /// Initial request must contain at least a Segment ID. Subsequent requests must contain the Segment ID as well as the + /// Continuation Token. Failure to send the Continuation Token will result in a new player segment list being generated. + /// Each time the Continuation Token is passed in the length of the Total Seconds to Live is refreshed. If too much time + /// passes between requests to the point that a subsequent request is past the Total Seconds to Live an error will be + /// returned and paging will be terminated. This API is resource intensive and should not be used in scenarios which might + /// generate high request volumes. Only one request to this API at a time should be made per title. Concurrent requests to + /// the API may be rejected with the APIConcurrentRequestLimitExceeded error. + /// + [Serializable] + public class GetPlayersInSegmentRequest : PlayFabRequestCommon + { + /// + /// Continuation token if retrieving subsequent pages of results. + /// + public string ContinuationToken; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If set to true, the profiles are loaded asynchronously and the response will include a continuation token and + /// approximate profile count until the first batch of profiles is loaded. Use this parameter to help avoid network + /// timeouts. + /// + public bool? GetProfilesAsync; + /// + /// Maximum is 10,000. The value 0 will prevent loading any profiles and return only the count of profiles matching this + /// segment. + /// + public uint? MaxBatchSize; + /// + /// Number of seconds to keep the continuation token active. After token expiration it is not possible to continue paging + /// results. Default is 300 (5 minutes). Maximum is 5,400 (90 minutes). + /// + public uint? SecondsToLive; + /// + /// Unique identifier for this segment. + /// + public string SegmentId; + } + + [Serializable] + public class GetPlayersInSegmentResult : PlayFabResultCommon + { + /// + /// Continuation token to use to retrieve subsequent pages of results. If token returns null there are no more results. + /// + public string ContinuationToken; + /// + /// Array of player profiles in this segment. + /// + public List PlayerProfiles; + /// + /// Count of profiles matching this segment. + /// + public int ProfilesInSegment; + } + + [Serializable] + public class GetPlayersSegmentsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerStatisticDefinitionsRequest : PlayFabRequestCommon + { + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The ResetInterval defines + /// the period of time at which the leaderboard for the statistic will automatically reset. Upon reset, the statistic + /// updates to a new version with no values (effectively removing all players from the leaderboard). The previous version's + /// statistic values are also archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via + /// a call to CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on + /// a schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). The AggregationMethod defines what action is taken when a new statistic value + /// is submitted - always update with the new value (Last), use the highest of the old and new values (Max), use the + /// smallest (Min), or add them together (Sum). + /// + [Serializable] + public class GetPlayerStatisticDefinitionsResult : PlayFabResultCommon + { + /// + /// the player statistic definitions for the title + /// + public List Statistics; + } + + [Serializable] + public class GetPlayerStatisticVersionsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The information returned + /// in the results defines the state of a specific version of a statistic, including when it was or will become the + /// currently active version, when it will (or did) become a previous version, and its archival state if it is no longer the + /// active version. For a statistic which has been reset, once the archival status is Complete, the full set of statistics + /// for all players in the leaderboard for that version may be retrieved via the ArchiveDownloadUrl. Statistics which have + /// not been reset (incremented/versioned) will only have a single version which is not scheduled to reset. + /// + [Serializable] + public class GetPlayerStatisticVersionsResult : PlayFabResultCommon + { + /// + /// version change history of the statistic + /// + public List StatisticVersions; + } + + /// + /// This API will return a list of canonical tags which includes both namespace and tag's name. If namespace is not + /// provided, the result is a list of all canonical tags. TagName can be used for segmentation and Namespace is limited to + /// 128 characters. + /// + [Serializable] + public class GetPlayerTagsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Optional namespace to filter results by + /// + public string Namespace; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerTagsResult : PlayFabResultCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Canonical tags (including namespace and tag's name) for the requested user + /// + public List Tags; + } + + /// + /// Views the requested policy. Today, the only supported policy is 'ApiPolicy'. + /// + [Serializable] + public class GetPolicyRequest : PlayFabRequestCommon + { + /// + /// The name of the policy to read. Only supported name is 'ApiPolicy'. + /// + public string PolicyName; + } + + [Serializable] + public class GetPolicyResponse : PlayFabResultCommon + { + /// + /// The name of the policy read. + /// + public string PolicyName; + /// + /// Policy version. + /// + public int PolicyVersion; + /// + /// The statements in the requested policy. + /// + public List Statements; + } + + /// + /// This API is designed to return publisher-specific values which can be read, but not written to, by the client. This data + /// is shared across all titles assigned to a particular publisher, and can be used for cross-game coordination. Only titles + /// assigned to a publisher can use this API. For more information email helloplayfab@microsoft.com. This AdminAPI call for + /// getting title data guarantees no delay in between update and retrieval of newly set data. + /// + [Serializable] + public class GetPublisherDataRequest : PlayFabRequestCommon + { + /// + /// array of keys to get back data from the Publisher data blob, set by the admin tools + /// + public List Keys; + } + + [Serializable] + public class GetPublisherDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + [Serializable] + public class GetRandomResultTablesRequest : PlayFabRequestCommon + { + /// + /// catalog version to fetch tables from. Use default catalog version if null + /// + public string CatalogVersion; + } + + [Serializable] + public class GetRandomResultTablesResult : PlayFabResultCommon + { + /// + /// array of random result tables currently available + /// + public Dictionary Tables; + } + + [Serializable] + public class GetSegmentResult : PlayFabBaseModel + { + /// + /// Identifier of the segments AB Test, if it is attached to one. + /// + public string ABTestParent; + /// + /// Unique identifier for this segment. + /// + public string Id; + /// + /// Segment name. + /// + public string Name; + } + + /// + /// Given input segment ids, return list of segments. + /// + [Serializable] + public class GetSegmentsRequest : PlayFabRequestCommon + { + /// + /// Segment ids to filter title segments. + /// + public List SegmentIds; + } + + [Serializable] + public class GetSegmentsResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + /// + /// List of title segments. + /// + public List Segments; + } + + /// + /// A store contains an array of references to items defined in the catalog, along with the prices for the item, in both + /// real world and virtual currencies. These prices act as an override to any prices defined in the catalog. In this way, + /// the base definitions of the items may be defined in the catalog, with all associated properties, while the pricing can + /// be set for each store, as needed. This allows for subsets of goods to be defined for different purposes (in order to + /// simplify showing some, but not all catalog items to users, based upon different characteristics), along with unique + /// prices. Note that all prices defined in the catalog and store definitions for the item are considered valid, and that a + /// compromised client can be made to send a request for an item based upon any of these definitions. If no price is + /// specified in the store for an item, the price set in the catalog should be displayed to the user. + /// + [Serializable] + public class GetStoreItemsRequest : PlayFabRequestCommon + { + /// + /// Catalog version to store items from. Use default catalog version if null + /// + public string CatalogVersion; + /// + /// Unqiue identifier for the store which is being requested. + /// + public string StoreId; + } + + [Serializable] + public class GetStoreItemsResult : PlayFabResultCommon + { + /// + /// The base catalog that this store is a part of. + /// + public string CatalogVersion; + /// + /// Additional data about the store. + /// + public StoreMarketingModel MarketingData; + /// + /// How the store was last updated (Admin or a third party). + /// + public SourceType? Source; + /// + /// Array of items which can be purchased from this store. + /// + public List Store; + /// + /// The ID of this store. + /// + public string StoreId; + } + + /// + /// The result includes detail information that's specific to a CloudScript task. Only CloudScript tasks configured as "Run + /// Cloud Script function once" will be retrieved. To get a list of task instances by task, status, or time range, use + /// GetTaskInstances. + /// + [Serializable] + public class GetTaskInstanceRequest : PlayFabRequestCommon + { + /// + /// ID of the requested task instance. + /// + public string TaskInstanceId; + } + + /// + /// Only the most recent 100 task instances are returned, ordered by start time descending. The results are generic basic + /// information for task instances. To get detail information specific to each task type, use Get*TaskInstance based on its + /// corresponding task type. + /// + [Serializable] + public class GetTaskInstancesRequest : PlayFabRequestCommon + { + /// + /// Optional range-from filter for task instances' StartedAt timestamp. + /// + public DateTime? StartedAtRangeFrom; + /// + /// Optional range-to filter for task instances' StartedAt timestamp. + /// + public DateTime? StartedAtRangeTo; + /// + /// Optional filter for task instances that are of a specific status. + /// + public TaskInstanceStatus? StatusFilter; + /// + /// Name or ID of the task whose instances are being queried. If not specified, return all task instances that satisfy + /// conditions set by other filters. + /// + public NameIdentifier TaskIdentifier; + } + + [Serializable] + public class GetTaskInstancesResult : PlayFabResultCommon + { + /// + /// Basic status summaries of the queried task instances. Empty If no task instances meets the filter criteria. To get + /// detailed status summary, use Get*TaskInstance API according to task type (e.g. + /// GetActionsOnPlayersInSegmentTaskInstance). + /// + public List Summaries; + } + + [Serializable] + public class GetTasksRequest : PlayFabRequestCommon + { + /// + /// Provide either the task ID or the task name to get a specific task. If not specified, return all defined tasks. + /// + public NameIdentifier Identifier; + } + + [Serializable] + public class GetTasksResult : PlayFabResultCommon + { + /// + /// Result tasks. Empty if there is no task found. + /// + public List Tasks; + } + + /// + /// This API method is designed to return title specific values which can be read by the client. For example, a developer + /// could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, movement + /// speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new build. If an + /// override label is specified in the request, the overrides are applied automatically and returned with the title data. + /// Note that due to caching, there may up to a minute delay in between updating title data and a query returning the newest + /// value. + /// + [Serializable] + public class GetTitleDataRequest : PlayFabRequestCommon + { + /// + /// Specific keys to search for in the title data (leave null to get all keys) + /// + public List Keys; + /// + /// Optional field that specifies the name of an override. This value is ignored when used by the game client; otherwise, + /// the overrides are applied automatically to the title data. + /// + public string OverrideLabel; + } + + [Serializable] + public class GetTitleDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + /// + /// Get all bans for a user, including inactive and expired bans. + /// + [Serializable] + public class GetUserBansRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserBansResult : PlayFabResultCommon + { + /// + /// Information about the bans + /// + public List BanData; + } + + /// + /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain + /// the data specific to the indicated Keys. Otherwise, the full set of custom user data will be returned. + /// + [Serializable] + public class GetUserDataRequest : PlayFabRequestCommon + { + /// + /// The version that currently exists according to the caller. The call will return the data for all of the keys if the + /// version in the system is greater than this. + /// + public uint? IfChangedFromDataVersion; + /// + /// Specific keys to search for in the custom user data. + /// + public List Keys; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserDataResult : PlayFabResultCommon + { + /// + /// User specific data for this title. + /// + public Dictionary Data; + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + /// + /// PlayFab unique identifier of the user whose custom data is being returned. + /// + public string PlayFabId; + } + + /// + /// All items currently in the user inventory will be returned, irrespective of how they were acquired (via purchasing, + /// grants, coupons, etc.). Items that are expired, fully consumed, or are no longer valid are not considered to be in the + /// user's current inventory, and so will not be not included. There can be a delay of up to a half a second for inventory + /// changes to be reflected in the GetUserInventory API response. + /// + [Serializable] + public class GetUserInventoryRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserInventoryResult : PlayFabResultCommon + { + /// + /// Array of inventory items belonging to the user. + /// + public List Inventory; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Array of virtual currency balance(s) belonging to the user. + /// + public Dictionary VirtualCurrency; + /// + /// Array of remaining times and timestamps for virtual currencies. + /// + public Dictionary VirtualCurrencyRechargeTimes; + } + + /// + /// Result of granting an item to a user. Note, to retrieve additional information for an item such as Tags, Description + /// that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can be matched + /// to a catalog entry, which contains the additional information. Also note that Custom Data is only set when the User's + /// specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields such as + /// UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class GrantedItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Result of this operation. + /// + public bool Result; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + [Serializable] + public class GrantItemContent : PlayFabBaseModel + { + /// + /// The catalog version of the item to be granted to the player + /// + public string CatalogVersion; + /// + /// The id of item to be granted to the player + /// + public string ItemId; + /// + /// Quantity of the item to be granted to a player + /// + public int ItemQuantity; + } + + [Serializable] + public class GrantItemSegmentAction : PlayFabBaseModel + { + /// + /// Item catalog id. + /// + public string CatelogId; + /// + /// Item id. + /// + public string ItemId; + /// + /// Item quantity. + /// + public uint Quantity; + } + + /// + /// This function directly adds inventory items to user inventories. As a result of this operations, the user will not be + /// charged any transaction fee, regardless of the inventory item catalog definition. Please note that the processing time + /// for inventory grants and purchases increases fractionally the more items are in the inventory, and the more items are in + /// the grant/purchase operation. + /// + [Serializable] + public class GrantItemsToUsersRequest : PlayFabRequestCommon + { + /// + /// Catalog version from which items are to be granted. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Array of items to grant and the users to whom the items are to be granted. + /// + public List ItemGrants; + } + + /// + /// Please note that the order of the items in the response may not match the order of items in the request. + /// + [Serializable] + public class GrantItemsToUsersResult : PlayFabResultCommon + { + /// + /// Array of items granted to users. + /// + public List ItemGrantResults; + } + + [Serializable] + public class GrantVirtualCurrencyContent : PlayFabBaseModel + { + /// + /// Amount of currency to be granted to a player + /// + public int CurrencyAmount; + /// + /// Code of the currency to be granted to a player + /// + public string CurrencyCode; + } + + [Serializable] + public class GrantVirtualCurrencySegmentAction : PlayFabBaseModel + { + /// + /// Virtual currency amount. + /// + public int Amount; + /// + /// Virtual currency code. + /// + public string CurrencyCode; + } + + /// + /// This operation will increment the global counter for the number of these items available. This number cannot be + /// decremented, except by actual grants. + /// + [Serializable] + public class IncrementLimitedEditionItemAvailabilityRequest : PlayFabRequestCommon + { + /// + /// Amount to increase availability by. + /// + public int Amount; + /// + /// Which catalog is being updated. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The item which needs more availability. + /// + public string ItemId; + } + + [Serializable] + public class IncrementLimitedEditionItemAvailabilityResult : PlayFabResultCommon + { + } + + [Serializable] + public class IncrementPlayerStatisticContent : PlayFabBaseModel + { + /// + /// Amount(in whole number) to increase the player statistic by + /// + public int StatisticChangeBy; + /// + /// Name of the player statistic to be incremented + /// + public string StatisticName; + } + + [Serializable] + public class IncrementPlayerStatisticSegmentAction : PlayFabBaseModel + { + /// + /// Increment value. + /// + public int IncrementValue; + /// + /// Statistic name. + /// + public string StatisticName; + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. When this call is made on + /// a given statistic, this forces a reset of that statistic. Upon reset, the statistic updates to a new version with no + /// values (effectively removing all players from the leaderboard). The previous version's statistic values are also + /// archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via a call to + /// CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on a + /// schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the now-previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). + /// + [Serializable] + public class IncrementPlayerStatisticVersionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + } + + [Serializable] + public class IncrementPlayerStatisticVersionResult : PlayFabResultCommon + { + /// + /// version change history of the statistic + /// + public PlayerStatisticVersion StatisticVersion; + } + + [Serializable] + public class InsightsScalingTaskParameter : PlayFabBaseModel + { + /// + /// Insights Performance Level to scale to. + /// + public int Level; + } + + [Serializable] + public class ItemGrant : PlayFabBaseModel + { + /// + /// String detailing any additional information concerning this operation. + /// + public string Annotation; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Unique identifier of the catalog item to be granted to the user. + /// + public string ItemId; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item such as Tags, + /// Description that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can + /// be matched to a catalog entry, which contains the additional information. Also note that Custom Data is only set when + /// the User's specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields + /// such as UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class ItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + [Serializable] + public class LastLoginDateSegmentFilter : PlayFabBaseModel + { + /// + /// Last player login date comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Last player login date. + /// + public DateTime LogInDate; + } + + [Serializable] + public class LastLoginTimespanSegmentFilter : PlayFabBaseModel + { + /// + /// Last player login duration comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Last player login duration. + /// + public double DurationInMinutes; + } + + [Serializable] + public class LinkedPlatformAccountModel : PlayFabBaseModel + { + /// + /// Linked account email of the user on the platform, if available + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Unique account identifier of the user on the platform + /// + public string PlatformUserId; + /// + /// Linked account username of the user on the platform, if available + /// + public string Username; + } + + [Serializable] + public class LinkedUserAccountHasEmailSegmentFilter : PlayFabBaseModel + { + /// + /// Login provider comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Login provider. + /// + public SegmentLoginIdentityProvider? LoginProvider; + } + + [Serializable] + public class LinkedUserAccountSegmentFilter : PlayFabBaseModel + { + /// + /// Login provider. + /// + public SegmentLoginIdentityProvider? LoginProvider; + } + + [Serializable] + public class ListOpenIdConnectionRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class ListOpenIdConnectionResponse : PlayFabResultCommon + { + /// + /// The list of Open ID Connections + /// + public List Connections; + } + + [Serializable] + public class ListVirtualCurrencyTypesRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class ListVirtualCurrencyTypesResult : PlayFabResultCommon + { + /// + /// List of virtual currency names defined for this title + /// + public List VirtualCurrencies; + } + + [Serializable] + public class LocationModel : PlayFabBaseModel + { + /// + /// City name. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode? ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode? CountryCode; + /// + /// Latitude coordinate of the geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the geographic location. + /// + public double? Longitude; + } + + [Serializable] + public class LocationSegmentFilter : PlayFabBaseModel + { + /// + /// Segment country code. + /// + public SegmentCountryCode? CountryCode; + } + + public enum LoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + [Serializable] + public class LogStatement : PlayFabBaseModel + { + /// + /// Optional object accompanying the message as contextual information + /// + public object Data; + /// + /// 'Debug', 'Info', or 'Error' + /// + public string Level; + public string Message; + } + + /// + /// This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class LookupUserAccountInfoRequest : PlayFabRequestCommon + { + /// + /// User email address attached to their account + /// + public string Email; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Title specific username to match against existing user accounts + /// + public string TitleDisplayName; + /// + /// PlayFab username for the account (3-20 characters) + /// + public string Username; + } + + [Serializable] + public class LookupUserAccountInfoResult : PlayFabResultCommon + { + /// + /// User info for the user matching the request + /// + public UserAccountInfo UserInfo; + } + + [Serializable] + public class MembershipModel : PlayFabBaseModel + { + /// + /// Whether this membership is active. That is, whether the MembershipExpiration time has been reached. + /// + public bool IsActive; + /// + /// The time this membership expires + /// + public DateTime MembershipExpiration; + /// + /// The id of the membership + /// + public string MembershipId; + /// + /// Membership expirations can be explicitly overridden (via game manager or the admin api). If this membership has been + /// overridden, this will be the new expiration time. + /// + public DateTime? OverrideExpiration; + /// + /// The list of subscriptions that this player has for this membership + /// + public List Subscriptions; + } + + [Serializable] + public class ModifyUserVirtualCurrencyResult : PlayFabResultCommon + { + /// + /// Balance of the virtual currency after modification. + /// + public int Balance; + /// + /// Amount added or subtracted from the user's virtual currency. Maximum VC balance is Int32 (2,147,483,647). Any increase + /// over this value will be discarded. + /// + public int BalanceChange; + /// + /// User currency was subtracted from. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which was modified. + /// + public string VirtualCurrency; + } + + /// + /// Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is + /// immutable and unique. + /// + [Serializable] + public class NameIdentifier : PlayFabBaseModel + { + /// + /// Id Identifier, if present + /// + public string Id; + /// + /// Name Identifier, if present + /// + public string Name; + } + + [Serializable] + public class OpenIdConnection : PlayFabBaseModel + { + /// + /// The client ID given by the ID provider. + /// + public string ClientId; + /// + /// The client secret given by the ID provider. + /// + public string ClientSecret; + /// + /// A name for the connection to identify it within the title. + /// + public string ConnectionId; + /// + /// Shows if data about the connection will be loaded from the issuer's discovery document + /// + public bool DiscoverConfiguration; + /// + /// Ignore 'nonce' claim in identity tokens. + /// + public bool? IgnoreNonce; + /// + /// Information for an OpenID Connect provider. + /// + public OpenIdIssuerInformation IssuerInformation; + /// + /// Override the issuer name for user indexing and lookup. + /// + public string IssuerOverride; + } + + [Serializable] + public class OpenIdIssuerInformation : PlayFabBaseModel + { + /// + /// Authorization endpoint URL to direct users to for signin. + /// + public string AuthorizationUrl; + /// + /// The URL of the issuer of the tokens. This must match the exact URL of the issuer field in tokens. + /// + public string Issuer; + /// + /// JSON Web Key Set for validating the signature of tokens. + /// + public object JsonWebKeySet; + /// + /// Token endpoint URL for code verification. + /// + public string TokenUrl; + } + + [Serializable] + public class PermissionStatement : PlayFabBaseModel + { + /// + /// The action this statement effects. The only supported action is 'Execute'. + /// + public string Action; + /// + /// Additional conditions to be applied for API Resources. + /// + public ApiCondition ApiConditions; + /// + /// A comment about the statement. Intended solely for bookkeeping and debugging. + /// + public string Comment; + /// + /// The effect this statement will have. It could be either Allow or Deny + /// + public EffectType Effect; + /// + /// The principal this statement will effect. The only supported principal is '*'. + /// + public string Principal; + /// + /// The resource this statements effects. The only supported resources look like 'pfrn:api--*' for all apis, or + /// 'pfrn:api--/Client/ConfirmPurchase' for specific apis. + /// + public string Resource; + } + + [Serializable] + public class PlayerChurnPredictionSegmentFilter : PlayFabBaseModel + { + /// + /// Comparison + /// + public SegmentFilterComparison? Comparison; + /// + /// RiskLevel + /// + public ChurnRiskLevel? RiskLevel; + } + + [Serializable] + public class PlayerChurnPredictionTimeSegmentFilter : PlayFabBaseModel + { + /// + /// Comparison + /// + public SegmentFilterComparison? Comparison; + /// + /// DurationInDays + /// + public double DurationInDays; + } + + [Serializable] + public class PlayerChurnPreviousPredictionSegmentFilter : PlayFabBaseModel + { + /// + /// Comparison + /// + public SegmentFilterComparison? Comparison; + /// + /// RiskLevel + /// + public ChurnRiskLevel? RiskLevel; + } + + [Serializable] + public class PlayerLinkedAccount : PlayFabBaseModel + { + /// + /// Linked account's email + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Platform user identifier + /// + public string PlatformUserId; + /// + /// Linked account's username + /// + public string Username; + } + + [Serializable] + public class PlayerLocation : PlayFabBaseModel + { + /// + /// City of the player's geographic location. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode CountryCode; + /// + /// Latitude coordinate of the player's geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the player's geographic location. + /// + public double? Longitude; + } + + [Serializable] + public class PlayerProfile : PlayFabBaseModel + { + /// + /// Array of ad campaigns player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// Image URL of the player's avatar. + /// + public string AvatarUrl; + /// + /// Banned until UTC Date. If permanent ban this is set for 20 years after the original ban date. + /// + public DateTime? BannedUntil; + /// + /// The prediction of the player to churn within the next seven days. + /// + public ChurnRiskLevel? ChurnPrediction; + /// + /// Array of contact email addresses associated with the player + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player Display Name + /// + public string DisplayName; + /// + /// Last login + /// + public DateTime? LastLogin; + /// + /// Array of third party accounts linked to this player + /// + public List LinkedAccounts; + /// + /// Dictionary of player's locations by type. + /// + public Dictionary Locations; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// List of player variants for experimentation + /// + public List PlayerExperimentVariants; + /// + /// PlayFab Player ID + /// + public string PlayerId; + /// + /// Array of player statistics + /// + public List PlayerStatistics; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// Array of configured push notification end points + /// + public List PushNotificationRegistrations; + /// + /// Dictionary of player's statistics using only the latest version's value + /// + public Dictionary Statistics; + /// + /// List of player's tags for segmentation. + /// + public List Tags; + /// + /// Title ID this profile applies to + /// + public string TitleId; + /// + /// A sum of player's total purchases in USD across all currencies. + /// + public uint? TotalValueToDateInUSD; + /// + /// Dictionary of player's total purchases by currency. + /// + public Dictionary ValuesToDate; + /// + /// Dictionary of player's virtual currency balances + /// + public Dictionary VirtualCurrencyBalances; + } + + [Serializable] + public class PlayerProfileModel : PlayFabBaseModel + { + /// + /// List of advertising campaigns the player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// URL of the player's avatar image + /// + public string AvatarUrl; + /// + /// If the player is currently banned, the UTC Date when the ban expires + /// + public DateTime? BannedUntil; + /// + /// List of all contact email info associated with the player account + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player display name + /// + public string DisplayName; + /// + /// List of experiment variants for the player. Note that these variants are not guaranteed to be up-to-date when returned + /// during login because the player profile is updated only after login. Instead, use the LoginResult.TreatmentAssignment + /// property during login to get the correct variants and variables. + /// + public List ExperimentVariants; + /// + /// UTC time when the player most recently logged in to the title + /// + public DateTime? LastLogin; + /// + /// List of all authentication systems linked to this player account + /// + public List LinkedAccounts; + /// + /// List of geographic locations from which the player has logged in to the title + /// + public List Locations; + /// + /// List of memberships for the player, along with whether are expired. + /// + public List Memberships; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// PlayFab player account unique identifier + /// + public string PlayerId; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// List of configured end points registered for sending the player push notifications + /// + public List PushNotificationRegistrations; + /// + /// List of leaderboard statistic values for the player + /// + public List Statistics; + /// + /// List of player's tags for segmentation + /// + public List Tags; + /// + /// Title ID this player profile applies to + /// + public string TitleId; + /// + /// Sum of the player's purchases made with real-money currencies, converted to US dollars equivalent and represented as a + /// whole number of cents (1/100 USD). For example, 999 indicates nine dollars and ninety-nine cents. + /// + public uint? TotalValueToDateInUSD; + /// + /// List of the player's lifetime purchase totals, summed by real-money currency + /// + public List ValuesToDate; + } + + [Serializable] + public class PlayerProfileViewConstraints : PlayFabBaseModel + { + /// + /// Whether to show player's avatar URL. Defaults to false + /// + public bool ShowAvatarUrl; + /// + /// Whether to show the banned until time. Defaults to false + /// + public bool ShowBannedUntil; + /// + /// Whether to show campaign attributions. Defaults to false + /// + public bool ShowCampaignAttributions; + /// + /// Whether to show contact email addresses. Defaults to false + /// + public bool ShowContactEmailAddresses; + /// + /// Whether to show the created date. Defaults to false + /// + public bool ShowCreated; + /// + /// Whether to show the display name. Defaults to false + /// + public bool ShowDisplayName; + /// + /// Whether to show player's experiment variants. Defaults to false + /// + public bool ShowExperimentVariants; + /// + /// Whether to show the last login time. Defaults to false + /// + public bool ShowLastLogin; + /// + /// Whether to show the linked accounts. Defaults to false + /// + public bool ShowLinkedAccounts; + /// + /// Whether to show player's locations. Defaults to false + /// + public bool ShowLocations; + /// + /// Whether to show player's membership information. Defaults to false + /// + public bool ShowMemberships; + /// + /// Whether to show origination. Defaults to false + /// + public bool ShowOrigination; + /// + /// Whether to show push notification registrations. Defaults to false + /// + public bool ShowPushNotificationRegistrations; + /// + /// Reserved for future development + /// + public bool ShowStatistics; + /// + /// Whether to show tags. Defaults to false + /// + public bool ShowTags; + /// + /// Whether to show the total value to date in usd. Defaults to false + /// + public bool ShowTotalValueToDateInUsd; + /// + /// Whether to show the values to date. Defaults to false + /// + public bool ShowValuesToDate; + } + + [Serializable] + public class PlayerStatistic : PlayFabBaseModel + { + /// + /// Statistic ID + /// + public string Id; + /// + /// Statistic name + /// + public string Name; + /// + /// Current statistic value + /// + public int StatisticValue; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int StatisticVersion; + } + + [Serializable] + public class PlayerStatisticDefinition : PlayFabBaseModel + { + /// + /// the aggregation method to use in updating the statistic (defaults to last) + /// + public StatisticAggregationMethod? AggregationMethod; + /// + /// current active version of the statistic, incremented each time the statistic resets + /// + public uint CurrentVersion; + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// interval at which the values of the statistic for all players are reset automatically + /// + public StatisticResetIntervalOption? VersionChangeInterval; + } + + [Serializable] + public class PlayerStatisticVersion : PlayFabBaseModel + { + /// + /// time when the statistic version became active + /// + public DateTime ActivationTime; + /// + /// URL for the downloadable archive of player statistic values, if available + /// + public string ArchiveDownloadUrl; + /// + /// time when the statistic version became inactive due to statistic version incrementing + /// + public DateTime? DeactivationTime; + /// + /// time at which the statistic version was scheduled to become active, based on the configured ResetInterval + /// + public DateTime? ScheduledActivationTime; + /// + /// time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + /// + public DateTime? ScheduledDeactivationTime; + /// + /// name of the statistic when the version became active + /// + public string StatisticName; + /// + /// status of the statistic version + /// + public StatisticVersionStatus? Status; + /// + /// version of the statistic + /// + public uint Version; + } + + [Serializable] + public class PushNotificationContent : PlayFabBaseModel + { + /// + /// Text of message to send. + /// + public string Message; + /// + /// Id of the push notification template. + /// + public string PushNotificationTemplateId; + /// + /// Subject of message to send (may not be displayed in all platforms) + /// + public string Subject; + } + + public enum PushNotificationPlatform + { + ApplePushNotificationService, + GoogleCloudMessaging + } + + [Serializable] + public class PushNotificationRegistration : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + [Serializable] + public class PushNotificationRegistrationModel : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + [Serializable] + public class PushNotificationSegmentAction : PlayFabBaseModel + { + /// + /// Push notification template id. + /// + public string PushNotificationTemplateId; + } + + [Serializable] + public class PushNotificationSegmentFilter : PlayFabBaseModel + { + /// + /// Push notification device platform. + /// + public SegmentPushNotificationDevicePlatform? PushNotificationDevicePlatform; + } + + public enum PushSetupPlatform + { + GCM, + APNS, + APNS_SANDBOX + } + + [Serializable] + public class RandomResultTable : PlayFabBaseModel + { + /// + /// Child nodes that indicate what kind of drop table item this actually is. + /// + public List Nodes; + /// + /// Unique name for this drop table + /// + public string TableId; + } + + [Serializable] + public class RandomResultTableListing : PlayFabBaseModel + { + /// + /// Catalog version this table is associated with + /// + public string CatalogVersion; + /// + /// Child nodes that indicate what kind of drop table item this actually is. + /// + public List Nodes; + /// + /// Unique name for this drop table + /// + public string TableId; + } + + [Serializable] + public class RefundPurchaseRequest : PlayFabRequestCommon + { + /// + /// Unique order ID for the purchase in question. + /// + public string OrderId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The Reason parameter should correspond with the payment providers reason field, if they require one such as Facebook. In + /// the case of Facebook this must match one of their refund or dispute resolution enums (See: + /// https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) + /// + public string Reason; + } + + [Serializable] + public class RefundPurchaseResponse : PlayFabResultCommon + { + /// + /// The order's updated purchase status. + /// + public string PurchaseStatus; + } + + /// + /// This API will trigger a player_tag_removed event and remove a tag with the given TagName and PlayFabID from the + /// corresponding player profile. TagName can be used for segmentation and it is limited to 256 characters + /// + [Serializable] + public class RemovePlayerTagRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique tag for player profile. + /// + public string TagName; + } + + [Serializable] + public class RemovePlayerTagResult : PlayFabResultCommon + { + } + + /// + /// Virtual currencies to be removed cannot have entries in any catalog nor store for the title. Note that this operation + /// will not remove player balances for the removed currencies; if a deleted currency is recreated at any point, user + /// balances will be in an undefined state. + /// + [Serializable] + public class RemoveVirtualCurrencyTypesRequest : PlayFabRequestCommon + { + /// + /// List of virtual currencies to delete + /// + public List VirtualCurrencies; + } + + /// + /// Note that this action cannot be un-done. All statistics for this character will be deleted, removing the user from all + /// leaderboards for the game. + /// + [Serializable] + public class ResetCharacterStatisticsRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ResetCharacterStatisticsResult : PlayFabResultCommon + { + } + + /// + /// Resets a player's password taking in a new password based and validating the user based off of a token sent to the + /// playerto their email. The token expires after 30 minutes. + /// + [Serializable] + public class ResetPasswordRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The new password for the player. + /// + public string Password; + /// + /// The token of the player requesting the password reset. + /// + public string Token; + } + + [Serializable] + public class ResetPasswordResult : PlayFabResultCommon + { + } + + /// + /// Note that this action cannot be un-done. All statistics for this user will be deleted, removing the user from all + /// leaderboards for the game. + /// + [Serializable] + public class ResetUserStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ResetUserStatisticsResult : PlayFabResultCommon + { + } + + public enum ResolutionOutcome + { + Revoke, + Reinstate, + Manual + } + + [Serializable] + public class ResolvePurchaseDisputeRequest : PlayFabRequestCommon + { + /// + /// Unique order ID for the purchase in question. + /// + public string OrderId; + /// + /// Enum for the desired purchase result state after notifying the payment provider. Valid values are Revoke, Reinstate and + /// Manual. Manual will cause no change to the order state. + /// + public ResolutionOutcome Outcome; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The Reason parameter should correspond with the payment providers reason field, if they require one such as Facebook. In + /// the case of Facebook this must match one of their refund or dispute resolution enums (See: + /// https://developers.facebook.com/docs/payments/implementation-guide/handling-disputes-refunds) + /// + public string Reason; + } + + [Serializable] + public class ResolvePurchaseDisputeResponse : PlayFabResultCommon + { + /// + /// The order's updated purchase status. + /// + public string PurchaseStatus; + } + + [Serializable] + public class ResultTableNode : PlayFabBaseModel + { + /// + /// Either an ItemId, or the TableId of another random result table + /// + public string ResultItem; + /// + /// Whether this entry in the table is an item or a link to another table + /// + public ResultTableNodeType ResultItemType; + /// + /// How likely this is to be rolled - larger numbers add more weight + /// + public int Weight; + } + + public enum ResultTableNodeType + { + ItemId, + TableId + } + + /// + /// Setting the active state of all non-expired bans for a user to Inactive. Expired bans with an Active state will be + /// ignored, however. Returns information about applied updates only. + /// + [Serializable] + public class RevokeAllBansForUserRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class RevokeAllBansForUserResult : PlayFabResultCommon + { + /// + /// Information on the bans that were revoked. + /// + public List BanData; + } + + /// + /// Setting the active state of all bans requested to Inactive regardless of whether that ban has already expired. BanIds + /// that do not exist will be skipped. Returns information about applied updates only. + /// + [Serializable] + public class RevokeBansRequest : PlayFabRequestCommon + { + /// + /// Ids of the bans to be revoked. Maximum 100. + /// + public List BanIds; + } + + [Serializable] + public class RevokeBansResult : PlayFabResultCommon + { + /// + /// Information on the bans that were revoked + /// + public List BanData; + } + + [Serializable] + public class RevokeInventoryItem : PlayFabBaseModel + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In cases where the inventory item in question is a "crate", and the items it contained have already been dispensed, this + /// will not revoke access or otherwise remove the items which were dispensed. + /// + [Serializable] + public class RevokeInventoryItemRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In cases where the inventory item in question is a "crate", and the items it contained have already been dispensed, this + /// will not revoke access or otherwise remove the items which were dispensed. + /// + [Serializable] + public class RevokeInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// Array of player items to revoke, between 1 and 25 items. + /// + public List Items; + } + + [Serializable] + public class RevokeInventoryItemsResult : PlayFabResultCommon + { + /// + /// Collection of any errors that occurred during processing. + /// + public List Errors; + } + + [Serializable] + public class RevokeInventoryResult : PlayFabResultCommon + { + } + + [Serializable] + public class RevokeItemError : PlayFabBaseModel + { + /// + /// Specific error that was encountered. + /// + public GenericErrorCodes? Error; + /// + /// Item information that failed to be revoked. + /// + public RevokeInventoryItem Item; + } + + /// + /// The returned task instance ID can be used to query for task execution status. + /// + [Serializable] + public class RunTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Provide either the task ID or the task name to run a task. + /// + public NameIdentifier Identifier; + } + + [Serializable] + public class RunTaskResult : PlayFabResultCommon + { + /// + /// ID of the task instance that is started. This can be used in Get*TaskInstance (e.g. GetCloudScriptTaskInstance) API call + /// to retrieve status for the task instance. + /// + public string TaskInstanceId; + } + + [Serializable] + public class ScheduledTask : PlayFabBaseModel + { + /// + /// Description the task + /// + public string Description; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// UTC time of last run + /// + public DateTime? LastRunTime; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// UTC time of next run + /// + public DateTime? NextRunTime; + /// + /// Task parameter. Different types of task have different parameter structure. See each task type's create API + /// documentation for the details. + /// + public object Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + /// + /// ID of the task + /// + public string TaskId; + /// + /// Task type. + /// + public ScheduledTaskType? Type; + } + + public enum ScheduledTaskType + { + CloudScript, + ActionsOnPlayerSegment, + CloudScriptAzureFunctions, + InsightsScheduledScaling + } + + [Serializable] + public class ScriptExecutionError : PlayFabBaseModel + { + /// + /// Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, + /// CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError + /// + public string Error; + /// + /// Details about the error + /// + public string Message; + /// + /// Point during the execution of the script at which the error occurred, if any + /// + public string StackTrace; + } + + [Serializable] + public class SegmentAndDefinition : PlayFabBaseModel + { + /// + /// Filter property for ad campaign filter. + /// + public AdCampaignSegmentFilter AdCampaignFilter; + /// + /// property for all player filter. + /// + public AllPlayersSegmentFilter AllPlayersFilter; + /// + /// Filter property for player churn risk level. + /// + public ChurnPredictionSegmentFilter ChurnPredictionFilter; + /// + /// Filter property for first login date. + /// + public FirstLoginDateSegmentFilter FirstLoginDateFilter; + /// + /// Filter property for first login timespan. + /// + public FirstLoginTimespanSegmentFilter FirstLoginFilter; + /// + /// Filter property for last login date. + /// + public LastLoginDateSegmentFilter LastLoginDateFilter; + /// + /// Filter property for last login timespan. + /// + public LastLoginTimespanSegmentFilter LastLoginFilter; + /// + /// Filter property for linked in user account. + /// + public LinkedUserAccountSegmentFilter LinkedUserAccountFilter; + /// + /// Filter property for linked in user account has email. + /// + public LinkedUserAccountHasEmailSegmentFilter LinkedUserAccountHasEmailFilter; + /// + /// Filter property for location. + /// + public LocationSegmentFilter LocationFilter; + /// + /// Filter property for current player churn value. + /// + public PlayerChurnPredictionSegmentFilter PlayerChurnPredictionFilter; + /// + /// Filter property for player churn timespan. + /// + public PlayerChurnPredictionTimeSegmentFilter PlayerChurnPredictionTimeFilter; + /// + /// Filter property for previous player churn value. + /// + public PlayerChurnPreviousPredictionSegmentFilter PlayerChurnPreviousPredictionFilter; + /// + /// Filter property for push notification. + /// + public PushNotificationSegmentFilter PushNotificationFilter; + /// + /// Filter property for statistics. + /// + public StatisticSegmentFilter StatisticFilter; + /// + /// Filter property for tags. + /// + public TagSegmentFilter TagFilter; + /// + /// Filter property for total value to date in USD. + /// + public TotalValueToDateInUSDSegmentFilter TotalValueToDateInUSDFilter; + /// + /// Filter property for user origination. + /// + public UserOriginationSegmentFilter UserOriginationFilter; + /// + /// Filter property for value to date. + /// + public ValueToDateSegmentFilter ValueToDateFilter; + /// + /// Filter property for virtual currency. + /// + public VirtualCurrencyBalanceSegmentFilter VirtualCurrencyBalanceFilter; + } + + public enum SegmentCountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW + } + + public enum SegmentCurrency + { + AED, + AFN, + ALL, + AMD, + ANG, + AOA, + ARS, + AUD, + AWG, + AZN, + BAM, + BBD, + BDT, + BGN, + BHD, + BIF, + BMD, + BND, + BOB, + BRL, + BSD, + BTN, + BWP, + BYR, + BZD, + CAD, + CDF, + CHF, + CLP, + CNY, + COP, + CRC, + CUC, + CUP, + CVE, + CZK, + DJF, + DKK, + DOP, + DZD, + EGP, + ERN, + ETB, + EUR, + FJD, + FKP, + GBP, + GEL, + GGP, + GHS, + GIP, + GMD, + GNF, + GTQ, + GYD, + HKD, + HNL, + HRK, + HTG, + HUF, + IDR, + ILS, + IMP, + INR, + IQD, + IRR, + ISK, + JEP, + JMD, + JOD, + JPY, + KES, + KGS, + KHR, + KMF, + KPW, + KRW, + KWD, + KYD, + KZT, + LAK, + LBP, + LKR, + LRD, + LSL, + LYD, + MAD, + MDL, + MGA, + MKD, + MMK, + MNT, + MOP, + MRO, + MUR, + MVR, + MWK, + MXN, + MYR, + MZN, + NAD, + NGN, + NIO, + NOK, + NPR, + NZD, + OMR, + PAB, + PEN, + PGK, + PHP, + PKR, + PLN, + PYG, + QAR, + RON, + RSD, + RUB, + RWF, + SAR, + SBD, + SCR, + SDG, + SEK, + SGD, + SHP, + SLL, + SOS, + SPL, + SRD, + STD, + SVC, + SYP, + SZL, + THB, + TJS, + TMT, + TND, + TOP, + TRY, + TTD, + TVD, + TWD, + TZS, + UAH, + UGX, + USD, + UYU, + UZS, + VEF, + VND, + VUV, + WST, + XAF, + XCD, + XDR, + XOF, + XPF, + YER, + ZAR, + ZMW, + ZWD + } + + public enum SegmentFilterComparison + { + GreaterThan, + LessThan, + EqualTo, + NotEqualTo, + GreaterThanOrEqual, + LessThanOrEqual, + Exists, + Contains, + NotContains + } + + public enum SegmentLoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames + } + + [Serializable] + public class SegmentModel : PlayFabBaseModel + { + /// + /// Segment description. + /// + public string Description; + /// + /// Segment actions for current entered segment players. + /// + public List EnteredSegmentActions; + /// + /// Segment last updated date time. + /// + public DateTime LastUpdateTime; + /// + /// Segment actions for current left segment players. + /// + public List LeftSegmentActions; + /// + /// Segment name. + /// + public string Name; + /// + /// Segment id in hex. + /// + public string SegmentId; + /// + /// Segment or definitions. This includes segment and definitions and filters. + /// + public List SegmentOrDefinitions; + } + + [Serializable] + public class SegmentOrDefinition : PlayFabBaseModel + { + /// + /// List of segment and definitions. + /// + public List SegmentAndDefinitions; + } + + public enum SegmentPushNotificationDevicePlatform + { + ApplePushNotificationService, + GoogleCloudMessaging + } + + [Serializable] + public class SegmentTrigger : PlayFabBaseModel + { + /// + /// Add inventory item v2 segment trigger action. + /// + public AddInventoryItemsV2SegmentAction AddInventoryItemsV2Action; + /// + /// Ban player segment trigger action. + /// + public BanPlayerSegmentAction BanPlayerAction; + /// + /// Delete inventory item v2 segment trigger action. + /// + public DeleteInventoryItemsV2SegmentAction DeleteInventoryItemsV2Action; + /// + /// Delete player segment trigger action. + /// + public DeletePlayerSegmentAction DeletePlayerAction; + /// + /// Delete player statistic segment trigger action. + /// + public DeletePlayerStatisticSegmentAction DeletePlayerStatisticAction; + /// + /// Email notification segment trigger action. + /// + public EmailNotificationSegmentAction EmailNotificationAction; + /// + /// Execute azure function segment trigger action. + /// + public ExecuteAzureFunctionSegmentAction ExecuteAzureFunctionAction; + /// + /// Execute cloud script segment trigger action. + /// + public ExecuteCloudScriptSegmentAction ExecuteCloudScriptAction; + /// + /// Grant item segment trigger action. + /// + public GrantItemSegmentAction GrantItemAction; + /// + /// Grant virtual currency segment trigger action. + /// + public GrantVirtualCurrencySegmentAction GrantVirtualCurrencyAction; + /// + /// Increment player statistic segment trigger action. + /// + public IncrementPlayerStatisticSegmentAction IncrementPlayerStatisticAction; + /// + /// Push notification segment trigger action. + /// + public PushNotificationSegmentAction PushNotificationAction; + /// + /// Subtract inventory item v2 segment trigger action. + /// + public SubtractInventoryItemsV2SegmentAction SubtractInventoryItemsV2Action; + } + + /// + /// If the account in question is a "temporary" account (for example, one that was created via a call to + /// LoginFromIOSDeviceID), thisfunction will have no effect. Only PlayFab accounts which have valid email addresses will be + /// able to receive a password reset email using this API. + /// + [Serializable] + public class SendAccountRecoveryEmailRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// User email address attached to their account + /// + public string Email; + /// + /// The email template id of the account recovery email template to send. + /// + public string EmailTemplateId; + } + + [Serializable] + public class SendAccountRecoveryEmailResult : PlayFabResultCommon + { + } + + [Serializable] + public class SendEmailContent : PlayFabBaseModel + { + /// + /// The email template id of the email template to send. + /// + public string EmailTemplateId; + } + + /// + /// This API lets developers set overrides for membership expirations, independent of any subscriptions setting it. + /// + [Serializable] + public class SetMembershipOverrideRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Expiration time for the membership in DateTime format, will override any subscription expirations. + /// + public DateTime ExpirationTime; + /// + /// Id of the membership to apply the override expiration date to. + /// + public string MembershipId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class SetMembershipOverrideResult : PlayFabResultCommon + { + } + + /// + /// APIs that require signatures require that the player have a configured Player Secret Key that is used to sign all + /// requests. Players that don't have a secret will be blocked from making API calls until it is configured. To create a + /// signature header add a SHA256 hashed string containing UTF8 encoded JSON body as it will be sent to the server, the + /// current time in UTC formatted to ISO 8601, and the players secret formatted as 'body.date.secret'. Place the resulting + /// hash into the header X-PlayFab-Signature, along with a header X-PlayFab-Timestamp of the same UTC timestamp used in the + /// signature. + /// + [Serializable] + public class SetPlayerSecretRequest : PlayFabRequestCommon + { + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class SetPlayerSecretResult : PlayFabResultCommon + { + } + + [Serializable] + public class SetPublishedRevisionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Revision to make the current published revision + /// + public int Revision; + /// + /// Version number + /// + public int Version; + } + + [Serializable] + public class SetPublishedRevisionResult : PlayFabResultCommon + { + } + + /// + /// This API is designed to store publisher-specific values which can be read, but not written to, by the client. This data + /// is shared across all titles assigned to a particular publisher, and can be used for cross-game coordination. Only titles + /// assigned to a publisher can use this API. This operation is additive. If a Key does not exist in the current dataset, it + /// will be added with the specified Value. If it already exists, the Value for that key will be overwritten with the new + /// Value. For more information email helloplayfab@microsoft.com + /// + [Serializable] + public class SetPublisherDataRequest : PlayFabRequestCommon + { + /// + /// key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// new value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class SetPublisherDataResult : PlayFabResultCommon + { + } + + /// + /// Will set the given key values in the specified override or the primary title data based on whether the label is provided + /// or not. + /// + [Serializable] + public class SetTitleDataAndOverridesRequest : PlayFabRequestCommon + { + /// + /// List of titleData key-value pairs to set/delete. Use an empty value to delete an existing key; use a non-empty value to + /// create/update a key. + /// + public List KeyValues; + /// + /// Name of the override. + /// + public string OverrideLabel; + } + + [Serializable] + public class SetTitleDataAndOverridesResult : PlayFabResultCommon + { + } + + /// + /// This operation is additive. If a Key does not exist in the current dataset, it will be added with the specified Value. + /// If it already exists, the Value for that key will be overwritten with the new Value. + /// + [Serializable] + public class SetTitleDataRequest : PlayFabRequestCommon + { + /// + /// key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// new value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class SetTitleDataResult : PlayFabResultCommon + { + } + + /// + /// When using the Apple Push Notification service (APNS) or the development version (APNS_SANDBOX), the APNS Private Key + /// should be used as the Credential in this call. With Google Cloud Messaging (GCM), the Android API Key should be used. + /// The current ARN (if one exists) can be overwritten by setting the OverwriteOldARN boolean to true. + /// + [Serializable] + public class SetupPushNotificationRequest : PlayFabRequestCommon + { + /// + /// Credential is the Private Key for APNS/APNS_SANDBOX, and the API Key for GCM + /// + public string Credential; + /// + /// for APNS, this is the PlatformPrincipal (SSL Certificate) + /// + public string Key; + /// + /// This field is deprecated and any usage of this will cause the API to fail. + /// + public string Name; + /// + /// replace any existing ARN with the newly generated one. If this is set to false, an error will be returned if + /// notifications have already setup for this platform. + /// + public bool OverwriteOldARN; + /// + /// supported notification platforms are Apple Push Notification Service (APNS and APNS_SANDBOX) for iOS and Google Cloud + /// Messaging (GCM) for Android + /// + public PushSetupPlatform Platform; + } + + [Serializable] + public class SetupPushNotificationResult : PlayFabResultCommon + { + /// + /// Amazon Resource Name for the created notification topic. + /// + public string ARN; + } + + [Serializable] + public class SharedSecret : PlayFabBaseModel + { + /// + /// Flag to indicate if this key is disabled + /// + public bool Disabled; + /// + /// Friendly name for this key + /// + public string FriendlyName; + /// + /// The player shared secret to use when calling Client/GetTitlePublicKey + /// + public string SecretKey; + } + + public enum SourceType + { + Admin, + BackEnd, + GameClient, + GameServer, + Partner, + Custom, + API + } + + public enum StatisticAggregationMethod + { + Last, + Min, + Max, + Sum + } + + [Serializable] + public class StatisticModel : PlayFabBaseModel + { + /// + /// Statistic name + /// + public string Name; + /// + /// Statistic value + /// + public int Value; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int Version; + } + + public enum StatisticResetIntervalOption + { + Never, + Hour, + Day, + Week, + Month + } + + [Serializable] + public class StatisticSegmentFilter : PlayFabBaseModel + { + /// + /// Statistic filter comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Statistic filter value. + /// + public string FilterValue; + /// + /// Statistic name. + /// + public string Name; + /// + /// Use current version of statistic? + /// + public bool? UseCurrentVersion; + /// + /// Statistic version. + /// + public int? Version; + } + + public enum StatisticVersionArchivalStatus + { + NotScheduled, + Scheduled, + Queued, + InProgress, + Complete + } + + public enum StatisticVersionStatus + { + Active, + SnapshotPending, + Snapshot, + ArchivalPending, + Archived + } + + /// + /// A store entry that list a catalog item at a particular price + /// + [Serializable] + public class StoreItem : PlayFabBaseModel + { + /// + /// Store specific custom data. The data only exists as part of this store; it is not transferred to item instances + /// + public object CustomData; + /// + /// Intended display position for this item. Note that 0 is the first position + /// + public uint? DisplayPosition; + /// + /// Unique identifier of the item as it exists in the catalog - note that this must exactly match the ItemId from the + /// catalog + /// + public string ItemId; + /// + /// Override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// Override prices for this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + /// + /// Marketing data about a specific store + /// + [Serializable] + public class StoreMarketingModel : PlayFabBaseModel + { + /// + /// Tagline for a store. + /// + public string Description; + /// + /// Display name of a store as it will appear to users. + /// + public string DisplayName; + /// + /// Custom data about a store. + /// + public object Metadata; + } + + [Serializable] + public class SubscriptionModel : PlayFabBaseModel + { + /// + /// When this subscription expires. + /// + public DateTime Expiration; + /// + /// The time the subscription was orignially purchased + /// + public DateTime InitialSubscriptionTime; + /// + /// Whether this subscription is currently active. That is, if Expiration > now. + /// + public bool IsActive; + /// + /// The status of this subscription, according to the subscription provider. + /// + public SubscriptionProviderStatus? Status; + /// + /// The id for this subscription + /// + public string SubscriptionId; + /// + /// The item id for this subscription from the primary catalog + /// + public string SubscriptionItemId; + /// + /// The provider for this subscription. Apple or Google Play are supported today. + /// + public string SubscriptionProvider; + } + + public enum SubscriptionProviderStatus + { + NoError, + Cancelled, + UnknownError, + BillingError, + ProductUnavailable, + CustomerDidNotAcceptPriceChange, + FreeTrial, + PaymentPending + } + + [Serializable] + public class SubtractInventoryItemsV2SegmentAction : PlayFabBaseModel + { + /// + /// Amount of the item to removed from the player + /// + public int? Amount; + /// + /// The collection id for where the item will be removed from the player inventory + /// + public string CollectionId; + /// + /// The duration in seconds to be removed from the subscription in the players inventory + /// + public int? DurationInSeconds; + /// + /// The id of item to be removed from the player + /// + public string ItemId; + /// + /// The stack id for where the item will be removed from the player inventory + /// + public string StackId; + } + + [Serializable] + public class SubtractInventoryItemV2Content : PlayFabBaseModel + { + /// + /// Amount of the item to removed from the player + /// + public int? Amount; + /// + /// The collection id for where the item will be removed from the player inventory + /// + public string CollectionId; + /// + /// The duration in seconds to be removed from the subscription in the players inventory + /// + public int? DurationInSeconds; + /// + /// The id of item to be removed from the player + /// + public string ItemId; + /// + /// The stack id for where the item will be removed from the player inventory + /// + public string StackId; + } + + [Serializable] + public class SubtractUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be subtracted from the user balance of the specified virtual currency. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab unique identifier of the user whose virtual currency balance is to be decreased. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be decremented. + /// + public string VirtualCurrency; + } + + [Serializable] + public class TagModel : PlayFabBaseModel + { + /// + /// Full value of the tag, including namespace + /// + public string TagValue; + } + + [Serializable] + public class TagSegmentFilter : PlayFabBaseModel + { + /// + /// Tag comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Tag value. + /// + public string TagValue; + } + + [Serializable] + public class TaskInstanceBasicSummary : PlayFabBaseModel + { + /// + /// UTC timestamp when the task completed. + /// + public DateTime? CompletedAt; + /// + /// Error message for last processing attempt, if an error occured. + /// + public string ErrorMessage; + /// + /// Estimated time remaining in seconds. + /// + public double? EstimatedSecondsRemaining; + /// + /// Progress represented as percentage. + /// + public double? PercentComplete; + /// + /// If manually scheduled, ID of user who scheduled the task. + /// + public string ScheduledByUserId; + /// + /// UTC timestamp when the task started. + /// + public DateTime StartedAt; + /// + /// Current status of the task instance. + /// + public TaskInstanceStatus? Status; + /// + /// Identifier of the task this instance belongs to. + /// + public NameIdentifier TaskIdentifier; + /// + /// ID of the task instance. + /// + public string TaskInstanceId; + /// + /// Type of the task. + /// + public ScheduledTaskType? Type; + } + + public enum TaskInstanceStatus + { + Succeeded, + Starting, + InProgress, + Failed, + Aborted, + Stalled + } + + public enum TitleActivationStatus + { + None, + ActivatedTitleKey, + PendingSteam, + ActivatedSteam, + RevokedSteam + } + + [Serializable] + public class TitleDataKeyValue : PlayFabBaseModel + { + /// + /// Key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// New value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class TotalValueToDateInUSDSegmentFilter : PlayFabBaseModel + { + /// + /// Total value to date USD amount. + /// + public string Amount; + /// + /// Total value to date USD comparison. + /// + public SegmentFilterComparison? Comparison; + } + + /// + /// Represents a single update ban request. + /// + [Serializable] + public class UpdateBanRequest : PlayFabBaseModel + { + /// + /// The updated active state for the ban. Null for no change. + /// + public bool? Active; + /// + /// The id of the ban to be updated. + /// + public string BanId; + /// + /// The updated expiration date for the ban. Null for no change. + /// + public DateTime? Expires; + /// + /// The updated IP address for the ban. Null for no change. + /// + public string IPAddress; + /// + /// Whether to make this ban permanent. Set to true to make this ban permanent. This will not modify Active state. + /// + public bool? Permanent; + /// + /// The updated reason for the ban to be updated. Maximum 140 characters. Null for no change. + /// + public string Reason; + /// + /// The updated family type of the user that should be included in the ban. Null for no change. + /// + public UserFamilyType? UserFamilyType; + } + + /// + /// For each ban, only updates the values that are set. Leave any value to null for no change. If a ban could not be found, + /// the rest are still applied. Returns information about applied updates only. + /// + [Serializable] + public class UpdateBansRequest : PlayFabRequestCommon + { + /// + /// List of bans to be updated. Maximum 100. + /// + public List Bans; + } + + [Serializable] + public class UpdateBansResult : PlayFabResultCommon + { + /// + /// Information on the bans that were updated + /// + public List BanData; + } + + /// + /// When used for SetCatalogItems, this operation is not additive. Using it will cause the indicated catalog version to be + /// created from scratch. If there is an existing catalog with the version number in question, it will be deleted and + /// replaced with only the items specified in this call. When used for UpdateCatalogItems, this operation is additive. Items + /// with ItemId values not currently in the catalog will be added, while those with ItemId values matching items currently + /// in the catalog will overwrite those items with the given values. + /// + [Serializable] + public class UpdateCatalogItemsRequest : PlayFabRequestCommon + { + /// + /// Array of catalog items to be submitted. Note that while CatalogItem has a parameter for CatalogVersion, it is not + /// required and ignored in this call. + /// + public List Catalog; + /// + /// Which catalog is being updated. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Should this catalog be set as the default catalog. Defaults to true. If there is currently no default catalog, this will + /// always set it. + /// + public bool? SetAsDefaultCatalog; + } + + [Serializable] + public class UpdateCatalogItemsResult : PlayFabResultCommon + { + } + + [Serializable] + public class UpdateCloudScriptRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab user ID of the developer initiating the request. + /// + public string DeveloperPlayFabId; + /// + /// List of Cloud Script files to upload to create the new revision. Must have at least one file. + /// + public List Files; + /// + /// Immediately publish the new revision + /// + public bool Publish; + } + + [Serializable] + public class UpdateCloudScriptResult : PlayFabResultCommon + { + /// + /// New revision number created + /// + public int Revision; + /// + /// Cloud Script version updated + /// + public int Version; + } + + [Serializable] + public class UpdateOpenIdConnectionRequest : PlayFabRequestCommon + { + /// + /// The client ID given by the ID provider. + /// + public string ClientId; + /// + /// The client secret given by the ID provider. + /// + public string ClientSecret; + /// + /// A name for the connection that identifies it within the title. + /// + public string ConnectionId; + /// + /// Ignore 'nonce' claim in identity tokens. + /// + public bool? IgnoreNonce; + /// + /// The issuer URL or discovery document URL to read issuer information from + /// + public string IssuerDiscoveryUrl; + /// + /// Manually specified information for an OpenID Connect issuer. + /// + public OpenIdIssuerInformation IssuerInformation; + /// + /// Override the issuer name for user indexing and lookup. + /// + public string IssuerOverride; + } + + /// + /// Player Shared Secret Keys are used for the call to Client/GetTitlePublicKey, which exchanges the shared secret for an + /// RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature header. + /// + [Serializable] + public class UpdatePlayerSharedSecretRequest : PlayFabRequestCommon + { + /// + /// Disable or Enable this key + /// + public bool Disabled; + /// + /// Friendly name for this key + /// + public string FriendlyName; + /// + /// The shared secret key to update + /// + public string SecretKey; + } + + [Serializable] + public class UpdatePlayerSharedSecretResult : PlayFabResultCommon + { + } + + /// + /// Statistics are numeric values, with each statistic in the title also generating a leaderboard. The ResetInterval enables + /// automatically resetting leaderboards on a specified interval. Upon reset, the statistic updates to a new version with no + /// values (effectively removing all players from the leaderboard). The previous version's statistic values are also + /// archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via a call to + /// CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on a + /// schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset + /// (sometimes referred to as versioned or incremented), the now-previous version can still be written to for up a short, + /// pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, + /// once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version + /// information (GetPlayerStatisticVersions). The AggregationMethod determines what action is taken when a new statistic + /// value is submitted - always update with the new value (Last), use the highest of the old and new values (Max), use the + /// smallest (Min), or add them together (Sum). + /// + [Serializable] + public class UpdatePlayerStatisticDefinitionRequest : PlayFabRequestCommon + { + /// + /// the aggregation method to use in updating the statistic (defaults to last) + /// + public StatisticAggregationMethod? AggregationMethod; + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// interval at which the values of the statistic for all players are reset (changes are effective at the next occurance of + /// the new interval boundary) + /// + public StatisticResetIntervalOption? VersionChangeInterval; + } + + [Serializable] + public class UpdatePlayerStatisticDefinitionResult : PlayFabResultCommon + { + /// + /// updated statistic definition + /// + public PlayerStatisticDefinition Statistic; + } + + /// + /// Updates permissions for your title. Policies affect what is allowed to happen on your title. Your policy is a collection + /// of statements that, together, govern particular area for your title. Today, the only allowed policy is called + /// 'ApiPolicy' and it governs what API calls are allowed. To verify that you have the latest version always download the + /// current policy from GetPolicy before uploading a new policy. PlayFab updates the base policy periodically and will + /// automatically apply it to the uploaded policy. Overwriting the combined policy blindly may result in unexpected API + /// errors. + /// + [Serializable] + public class UpdatePolicyRequest : PlayFabRequestCommon + { + /// + /// Whether to overwrite or append to the existing policy. + /// + public bool OverwritePolicy; + /// + /// The name of the policy being updated. Only supported name is 'ApiPolicy' + /// + public string PolicyName; + /// + /// Version of the policy to update. Must be the latest (as returned by GetPolicy). + /// + public int PolicyVersion; + /// + /// The new statements to include in the policy. + /// + public List Statements; + } + + [Serializable] + public class UpdatePolicyResponse : PlayFabResultCommon + { + /// + /// The name of the policy that was updated. + /// + public string PolicyName; + /// + /// The statements included in the new version of the policy. + /// + public List Statements; + } + + /// + /// This operation is additive. Tables with TableId values not currently defined will be added, while those with TableId + /// values matching Tables currently in the catalog will be overwritten with the given values. + /// + [Serializable] + public class UpdateRandomResultTablesRequest : PlayFabRequestCommon + { + /// + /// which catalog is being updated. If null, update the current default catalog version + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// array of random result tables to make available (Note: specifying an existing TableId will result in overwriting that + /// table, while any others will be added to the available set) + /// + public List Tables; + } + + [Serializable] + public class UpdateRandomResultTablesResult : PlayFabResultCommon + { + } + + /// + /// Update segment properties data which are planning to update + /// + [Serializable] + public class UpdateSegmentRequest : PlayFabRequestCommon + { + /// + /// Segment model with all of the segment properties data. + /// + public SegmentModel SegmentModel; + } + + [Serializable] + public class UpdateSegmentResponse : PlayFabResultCommon + { + /// + /// Error message. + /// + public string ErrorMessage; + /// + /// Segment id. + /// + public string SegmentId; + } + + /// + /// When used for SetStoreItems, this operation is not additive. Using it will cause the indicated virtual store to be + /// created from scratch. If there is an existing store with the same storeId, it will be deleted and replaced with only the + /// items specified in this call. When used for UpdateStoreItems, this operation is additive. Items with ItemId values not + /// currently in the store will be added, while those with ItemId values matching items currently in the catalog will + /// overwrite those items with the given values. In both cases, a store contains an array of references to items defined in + /// the catalog, along with the prices for the item, in both real world and virtual currencies. These prices act as an + /// override to any prices defined in the catalog. In this way, the base definitions of the items may be defined in the + /// catalog, with all associated properties, while the pricing can be set for each store, as needed. This allows for subsets + /// of goods to be defined for different purposes (in order to simplify showing some, but not all catalog items to users, + /// based upon different characteristics), along with unique prices. Note that all prices defined in the catalog and store + /// definitions for the item are considered valid, and that a compromised client can be made to send a request for an item + /// based upon any of these definitions. If no price is specified in the store for an item, the price set in the catalog + /// should be displayed to the user. + /// + [Serializable] + public class UpdateStoreItemsRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the store to update. If null, uses the default catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Additional data about the store + /// + public StoreMarketingModel MarketingData; + /// + /// Array of store items - references to catalog items, with specific pricing - to be added + /// + public List Store; + /// + /// Unique identifier for the store which is to be updated + /// + public string StoreId; + } + + [Serializable] + public class UpdateStoreItemsResult : PlayFabResultCommon + { + } + + /// + /// Note that when calling this API, all properties of the task have to be provided, including properties that you do not + /// want to change. Parameters not specified would be set to default value. If the task name in the update request is new, a + /// task rename operation will be executed before updating other fields of the task. WARNING: Renaming of a task may break + /// logics where the task name is used as an identifier. + /// + [Serializable] + public class UpdateTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description the task + /// + public string Description; + /// + /// Specify either the task ID or the name of the task to be updated. + /// + public NameIdentifier Identifier; + /// + /// Whether the schedule is active. Inactive schedule will not trigger task execution. + /// + public bool IsActive; + /// + /// Name of the task. This is a unique identifier for tasks in the title. + /// + public string Name; + /// + /// Parameter object specific to the task type. See each task type's create API documentation for details. + /// + public object Parameter; + /// + /// Cron expression for the run schedule of the task. The expression should be in UTC. + /// + public string Schedule; + /// + /// Task type. + /// + public ScheduledTaskType Type; + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the user. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, while keys + /// with null values will be removed. No other key-value pairs will be changed apart from those specified in the call. + /// + [Serializable] + public class UpdateUserDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set. + /// + public UserDataPermission? Permission; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UpdateUserDataResult : PlayFabResultCommon + { + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the user. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, keys with + /// null values will be removed. No other key-value pairs will be changed apart from those specified in the call. + /// + [Serializable] + public class UpdateUserInternalDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In addition to the PlayFab username, titles can make use of a DisplayName which is also a unique identifier, but + /// specific to the title. This allows for unique names which more closely match the theme or genre of a title, for example. + /// This API enables changing that name, whether due to a customer request, an offensive name choice, etc. + /// + [Serializable] + public class UpdateUserTitleDisplayNameRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// New title display name for the user - must be between 3 and 25 characters + /// + public string DisplayName; + /// + /// PlayFab unique identifier of the user whose title specific display name is to be changed + /// + public string PlayFabId; + } + + [Serializable] + public class UpdateUserTitleDisplayNameResult : PlayFabResultCommon + { + /// + /// current title display name for the user (this will be the original display name if the rename attempt failed) + /// + public string DisplayName; + } + + [Serializable] + public class UserAccountInfo : PlayFabBaseModel + { + /// + /// User Android device information, if an Android device has been linked + /// + public UserAndroidDeviceInfo AndroidDeviceInfo; + /// + /// Sign in with Apple account information, if an Apple account has been linked + /// + public UserAppleIdInfo AppleAccountInfo; + /// + /// Timestamp indicating when the user account was created + /// + public DateTime Created; + /// + /// Custom ID information, if a custom ID has been assigned + /// + public UserCustomIdInfo CustomIdInfo; + /// + /// User Facebook information, if a Facebook account has been linked + /// + public UserFacebookInfo FacebookInfo; + /// + /// Facebook Instant Games account information, if a Facebook Instant Games account has been linked + /// + public UserFacebookInstantGamesIdInfo FacebookInstantGamesIdInfo; + /// + /// User Gamecenter information, if a Gamecenter account has been linked + /// + public UserGameCenterInfo GameCenterInfo; + /// + /// User Google account information, if a Google account has been linked + /// + public UserGoogleInfo GoogleInfo; + /// + /// User Google Play Games account information, if a Google Play Games account has been linked + /// + public UserGooglePlayGamesInfo GooglePlayGamesInfo; + /// + /// User iOS device information, if an iOS device has been linked + /// + public UserIosDeviceInfo IosDeviceInfo; + /// + /// User Kongregate account information, if a Kongregate account has been linked + /// + public UserKongregateInfo KongregateInfo; + /// + /// Nintendo Switch account information, if a Nintendo Switch account has been linked + /// + public UserNintendoSwitchAccountIdInfo NintendoSwitchAccountInfo; + /// + /// Nintendo Switch device information, if a Nintendo Switch device has been linked + /// + public UserNintendoSwitchDeviceIdInfo NintendoSwitchDeviceIdInfo; + /// + /// OpenID Connect information, if any OpenID Connect accounts have been linked + /// + public List OpenIdInfo; + /// + /// Unique identifier for the user account + /// + public string PlayFabId; + /// + /// Personal information for the user which is considered more sensitive + /// + public UserPrivateAccountInfo PrivateInfo; + /// + /// User PlayStation :tm: Network account information, if a PlayStation :tm: Network account has been linked + /// + public UserPsnInfo PsnInfo; + /// + /// Server Custom ID information, if a server custom ID has been assigned + /// + public UserServerCustomIdInfo ServerCustomIdInfo; + /// + /// User Steam information, if a Steam account has been linked + /// + public UserSteamInfo SteamInfo; + /// + /// Title-specific information for the user account + /// + public UserTitleInfo TitleInfo; + /// + /// User Twitch account information, if a Twitch account has been linked + /// + public UserTwitchInfo TwitchInfo; + /// + /// User account name in the PlayFab service + /// + public string Username; + /// + /// User XBox account information, if a XBox account has been linked + /// + public UserXboxInfo XboxInfo; + } + + [Serializable] + public class UserAndroidDeviceInfo : PlayFabBaseModel + { + /// + /// Android device ID + /// + public string AndroidDeviceId; + } + + [Serializable] + public class UserAppleIdInfo : PlayFabBaseModel + { + /// + /// Apple subject ID + /// + public string AppleSubjectId; + } + + [Serializable] + public class UserCustomIdInfo : PlayFabBaseModel + { + /// + /// Custom ID + /// + public string CustomId; + } + + /// + /// Indicates whether a given data key is private (readable only by the player) or public (readable by all players). When a + /// player makes a GetUserData request about another player, only keys marked Public will be returned. + /// + public enum UserDataPermission + { + Private, + Public + } + + [Serializable] + public class UserDataRecord : PlayFabBaseModel + { + /// + /// Timestamp for when this data was last updated. + /// + public DateTime LastUpdated; + /// + /// Indicates whether this data can be read by all users (public) or only the user (private). This is used for GetUserData + /// requests being made by one player about another player. + /// + public UserDataPermission? Permission; + /// + /// Data stored for the specified user data key. + /// + public string Value; + } + + [Serializable] + public class UserFacebookInfo : PlayFabBaseModel + { + /// + /// Facebook identifier + /// + public string FacebookId; + /// + /// Facebook full name + /// + public string FullName; + } + + [Serializable] + public class UserFacebookInstantGamesIdInfo : PlayFabBaseModel + { + /// + /// Facebook Instant Games ID + /// + public string FacebookInstantGamesId; + } + + public enum UserFamilyType + { + None, + Xbox, + Steam + } + + [Serializable] + public class UserGameCenterInfo : PlayFabBaseModel + { + /// + /// Gamecenter identifier + /// + public string GameCenterId; + } + + [Serializable] + public class UserGoogleInfo : PlayFabBaseModel + { + /// + /// Email address of the Google account + /// + public string GoogleEmail; + /// + /// Gender information of the Google account + /// + public string GoogleGender; + /// + /// Google ID + /// + public string GoogleId; + /// + /// Locale of the Google account + /// + public string GoogleLocale; + /// + /// Name of the Google account user + /// + public string GoogleName; + } + + [Serializable] + public class UserGooglePlayGamesInfo : PlayFabBaseModel + { + /// + /// Avatar image url of the Google Play Games player + /// + public string GooglePlayGamesPlayerAvatarImageUrl; + /// + /// Display name of the Google Play Games player + /// + public string GooglePlayGamesPlayerDisplayName; + /// + /// Google Play Games player ID + /// + public string GooglePlayGamesPlayerId; + } + + [Serializable] + public class UserIosDeviceInfo : PlayFabBaseModel + { + /// + /// iOS device ID + /// + public string IosDeviceId; + } + + [Serializable] + public class UserKongregateInfo : PlayFabBaseModel + { + /// + /// Kongregate ID + /// + public string KongregateId; + /// + /// Kongregate Username + /// + public string KongregateName; + } + + [Serializable] + public class UserNintendoSwitchAccountIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch account subject ID + /// + public string NintendoSwitchAccountSubjectId; + } + + [Serializable] + public class UserNintendoSwitchDeviceIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch Device ID + /// + public string NintendoSwitchDeviceId; + } + + [Serializable] + public class UserOpenIdInfo : PlayFabBaseModel + { + /// + /// OpenID Connection ID + /// + public string ConnectionId; + /// + /// OpenID Issuer + /// + public string Issuer; + /// + /// OpenID Subject + /// + public string Subject; + } + + public enum UserOrigination + { + Organic, + Steam, + Google, + Amazon, + Facebook, + Kongregate, + GamersFirst, + Unknown, + IOS, + LoadTest, + Android, + PSN, + GameCenter, + CustomId, + XboxLive, + Parse, + Twitch, + ServerCustomId, + NintendoSwitchDeviceId, + FacebookInstantGamesId, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + [Serializable] + public class UserOriginationSegmentFilter : PlayFabBaseModel + { + /// + /// User login provider. + /// + public SegmentLoginIdentityProvider? LoginProvider; + } + + [Serializable] + public class UserPrivateAccountInfo : PlayFabBaseModel + { + /// + /// user email address + /// + public string Email; + } + + [Serializable] + public class UserPsnInfo : PlayFabBaseModel + { + /// + /// PlayStation :tm: Network account ID + /// + public string PsnAccountId; + /// + /// PlayStation :tm: Network online ID + /// + public string PsnOnlineId; + } + + [Serializable] + public class UserServerCustomIdInfo : PlayFabBaseModel + { + /// + /// Custom ID + /// + public string CustomId; + } + + [Serializable] + public class UserSteamInfo : PlayFabBaseModel + { + /// + /// what stage of game ownership the user is listed as being in, from Steam + /// + public TitleActivationStatus? SteamActivationStatus; + /// + /// the country in which the player resides, from Steam data + /// + public string SteamCountry; + /// + /// currency type set in the user Steam account + /// + public Currency? SteamCurrency; + /// + /// Steam identifier + /// + public string SteamId; + /// + /// Steam display name + /// + public string SteamName; + } + + [Serializable] + public class UserTitleInfo : PlayFabBaseModel + { + /// + /// URL to the player's avatar. + /// + public string AvatarUrl; + /// + /// timestamp indicating when the user was first associated with this game (this can differ significantly from when the user + /// first registered with PlayFab) + /// + public DateTime Created; + /// + /// name of the user, as it is displayed in-game + /// + public string DisplayName; + /// + /// timestamp indicating when the user first signed into this game (this can differ from the Created timestamp, as other + /// events, such as issuing a beta key to the user, can associate the title to the user) + /// + public DateTime? FirstLogin; + /// + /// boolean indicating whether or not the user is currently banned for a title + /// + public bool? isBanned; + /// + /// timestamp for the last user login for this title + /// + public DateTime? LastLogin; + /// + /// source by which the user first joined the game, if known + /// + public UserOrigination? Origination; + /// + /// Title player account entity for this user + /// + public EntityKey TitlePlayerAccount; + } + + [Serializable] + public class UserTwitchInfo : PlayFabBaseModel + { + /// + /// Twitch ID + /// + public string TwitchId; + /// + /// Twitch Username + /// + public string TwitchUserName; + } + + [Serializable] + public class UserXboxInfo : PlayFabBaseModel + { + /// + /// XBox user ID + /// + public string XboxUserId; + /// + /// XBox user sandbox + /// + public string XboxUserSandbox; + } + + [Serializable] + public class ValueToDateModel : PlayFabBaseModel + { + /// + /// ISO 4217 code of the currency used in the purchases + /// + public string Currency; + /// + /// Total value of the purchases in a whole number of 1/100 monetary units. For example, 999 indicates nine dollars and + /// ninety-nine cents when Currency is 'USD') + /// + public uint TotalValue; + /// + /// Total value of the purchases in a string representation of decimal monetary units. For example, '9.99' indicates nine + /// dollars and ninety-nine cents when Currency is 'USD'. + /// + public string TotalValueAsDecimal; + } + + [Serializable] + public class ValueToDateSegmentFilter : PlayFabBaseModel + { + /// + /// Value to date amount. + /// + public string Amount; + /// + /// Value to date comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Currency using for filter. + /// + public SegmentCurrency? Currency; + } + + [Serializable] + public class VirtualCurrencyBalanceSegmentFilter : PlayFabBaseModel + { + /// + /// Total amount. + /// + public int Amount; + /// + /// Amount comparison. + /// + public SegmentFilterComparison? Comparison; + /// + /// Currency code. + /// + public string CurrencyCode; + } + + [Serializable] + public class VirtualCurrencyData : PlayFabBaseModel + { + /// + /// unique two-character identifier for this currency type (e.g.: "CC") + /// + public string CurrencyCode; + /// + /// friendly name to show in the developer portal, reports, etc. + /// + public string DisplayName; + /// + /// amount to automatically grant users upon first login to the title + /// + public int? InitialDeposit; + /// + /// maximum amount to which the currency will recharge (cannot exceed MaxAmount, but can be less) + /// + public int? RechargeMax; + /// + /// rate at which the currency automatically be added to over time, in units per day (24 hours) + /// + public int? RechargeRate; + } + + [Serializable] + public class VirtualCurrencyRechargeTime : PlayFabBaseModel + { + /// + /// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value + /// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen + /// below this value. + /// + public int RechargeMax; + /// + /// Server timestamp in UTC indicating the next time the virtual currency will be incremented. + /// + public DateTime RechargeTime; + /// + /// Time remaining (in seconds) before the next recharge increment of the virtual currency. + /// + public int SecondsToRecharge; + } +} +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs.meta new file mode 100644 index 00000000..98594459 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5d7a769446de4b7459591c36c05197ed +timeCreated: 1468524875 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Admin/PlayFabEvents.cs b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs new file mode 100644 index 00000000..15f45128 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs @@ -0,0 +1,236 @@ +#if ENABLE_PLAYFABADMIN_API +using PlayFab.AdminModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnAdminAbortTaskInstanceRequestEvent; + public event PlayFabResultEvent OnAdminAbortTaskInstanceResultEvent; + public event PlayFabRequestEvent OnAdminAddLocalizedNewsRequestEvent; + public event PlayFabResultEvent OnAdminAddLocalizedNewsResultEvent; + public event PlayFabRequestEvent OnAdminAddNewsRequestEvent; + public event PlayFabResultEvent OnAdminAddNewsResultEvent; + public event PlayFabRequestEvent OnAdminAddPlayerTagRequestEvent; + public event PlayFabResultEvent OnAdminAddPlayerTagResultEvent; + public event PlayFabRequestEvent OnAdminAddUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnAdminAddUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnAdminAddVirtualCurrencyTypesRequestEvent; + public event PlayFabResultEvent OnAdminAddVirtualCurrencyTypesResultEvent; + public event PlayFabRequestEvent OnAdminBanUsersRequestEvent; + public event PlayFabResultEvent OnAdminBanUsersResultEvent; + public event PlayFabRequestEvent OnAdminCheckLimitedEditionItemAvailabilityRequestEvent; + public event PlayFabResultEvent OnAdminCheckLimitedEditionItemAvailabilityResultEvent; + public event PlayFabRequestEvent OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent; + public event PlayFabResultEvent OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent; + public event PlayFabRequestEvent OnAdminCreateCloudScriptTaskRequestEvent; + public event PlayFabResultEvent OnAdminCreateCloudScriptTaskResultEvent; + public event PlayFabRequestEvent OnAdminCreateInsightsScheduledScalingTaskRequestEvent; + public event PlayFabResultEvent OnAdminCreateInsightsScheduledScalingTaskResultEvent; + public event PlayFabRequestEvent OnAdminCreateOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminCreateOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminCreatePlayerSharedSecretRequestEvent; + public event PlayFabResultEvent OnAdminCreatePlayerSharedSecretResultEvent; + public event PlayFabRequestEvent OnAdminCreatePlayerStatisticDefinitionRequestEvent; + public event PlayFabResultEvent OnAdminCreatePlayerStatisticDefinitionResultEvent; + public event PlayFabRequestEvent OnAdminCreateSegmentRequestEvent; + public event PlayFabResultEvent OnAdminCreateSegmentResultEvent; + public event PlayFabRequestEvent OnAdminDeleteContentRequestEvent; + public event PlayFabResultEvent OnAdminDeleteContentResultEvent; + public event PlayFabRequestEvent OnAdminDeleteMasterPlayerAccountRequestEvent; + public event PlayFabResultEvent OnAdminDeleteMasterPlayerAccountResultEvent; + public event PlayFabRequestEvent OnAdminDeleteMasterPlayerEventDataRequestEvent; + public event PlayFabResultEvent OnAdminDeleteMasterPlayerEventDataResultEvent; + public event PlayFabRequestEvent OnAdminDeleteMembershipSubscriptionRequestEvent; + public event PlayFabResultEvent OnAdminDeleteMembershipSubscriptionResultEvent; + public event PlayFabRequestEvent OnAdminDeleteOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminDeleteOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminDeletePlayerRequestEvent; + public event PlayFabResultEvent OnAdminDeletePlayerResultEvent; + public event PlayFabRequestEvent OnAdminDeletePlayerSharedSecretRequestEvent; + public event PlayFabResultEvent OnAdminDeletePlayerSharedSecretResultEvent; + public event PlayFabRequestEvent OnAdminDeleteSegmentRequestEvent; + public event PlayFabResultEvent OnAdminDeleteSegmentResultEvent; + public event PlayFabRequestEvent OnAdminDeleteStoreRequestEvent; + public event PlayFabResultEvent OnAdminDeleteStoreResultEvent; + public event PlayFabRequestEvent OnAdminDeleteTaskRequestEvent; + public event PlayFabResultEvent OnAdminDeleteTaskResultEvent; + public event PlayFabRequestEvent OnAdminDeleteTitleRequestEvent; + public event PlayFabResultEvent OnAdminDeleteTitleResultEvent; + public event PlayFabRequestEvent OnAdminDeleteTitleDataOverrideRequestEvent; + public event PlayFabResultEvent OnAdminDeleteTitleDataOverrideResultEvent; + public event PlayFabRequestEvent OnAdminExportMasterPlayerDataRequestEvent; + public event PlayFabResultEvent OnAdminExportMasterPlayerDataResultEvent; + public event PlayFabRequestEvent OnAdminExportPlayersInSegmentRequestEvent; + public event PlayFabResultEvent OnAdminExportPlayersInSegmentResultEvent; + public event PlayFabRequestEvent OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent; + public event PlayFabResultEvent OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent; + public event PlayFabRequestEvent OnAdminGetAllSegmentsRequestEvent; + public event PlayFabResultEvent OnAdminGetAllSegmentsResultEvent; + public event PlayFabRequestEvent OnAdminGetCatalogItemsRequestEvent; + public event PlayFabResultEvent OnAdminGetCatalogItemsResultEvent; + public event PlayFabRequestEvent OnAdminGetCloudScriptRevisionRequestEvent; + public event PlayFabResultEvent OnAdminGetCloudScriptRevisionResultEvent; + public event PlayFabRequestEvent OnAdminGetCloudScriptTaskInstanceRequestEvent; + public event PlayFabResultEvent OnAdminGetCloudScriptTaskInstanceResultEvent; + public event PlayFabRequestEvent OnAdminGetCloudScriptVersionsRequestEvent; + public event PlayFabResultEvent OnAdminGetCloudScriptVersionsResultEvent; + public event PlayFabRequestEvent OnAdminGetContentListRequestEvent; + public event PlayFabResultEvent OnAdminGetContentListResultEvent; + public event PlayFabRequestEvent OnAdminGetContentUploadUrlRequestEvent; + public event PlayFabResultEvent OnAdminGetContentUploadUrlResultEvent; + public event PlayFabRequestEvent OnAdminGetDataReportRequestEvent; + public event PlayFabResultEvent OnAdminGetDataReportResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayedTitleListRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayedTitleListResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerIdFromAuthTokenRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerIdFromAuthTokenResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerProfileRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerProfileResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerSegmentsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerSegmentsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerSharedSecretsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerSharedSecretsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayersInSegmentRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayersInSegmentResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerStatisticDefinitionsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerStatisticDefinitionsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerStatisticVersionsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerStatisticVersionsResultEvent; + public event PlayFabRequestEvent OnAdminGetPlayerTagsRequestEvent; + public event PlayFabResultEvent OnAdminGetPlayerTagsResultEvent; + public event PlayFabRequestEvent OnAdminGetPolicyRequestEvent; + public event PlayFabResultEvent OnAdminGetPolicyResultEvent; + public event PlayFabRequestEvent OnAdminGetPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminGetPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminGetRandomResultTablesRequestEvent; + public event PlayFabResultEvent OnAdminGetRandomResultTablesResultEvent; + public event PlayFabRequestEvent OnAdminGetSegmentExportRequestEvent; + public event PlayFabResultEvent OnAdminGetSegmentExportResultEvent; + public event PlayFabRequestEvent OnAdminGetSegmentsRequestEvent; + public event PlayFabResultEvent OnAdminGetSegmentsResultEvent; + public event PlayFabRequestEvent OnAdminGetStoreItemsRequestEvent; + public event PlayFabResultEvent OnAdminGetStoreItemsResultEvent; + public event PlayFabRequestEvent OnAdminGetTaskInstancesRequestEvent; + public event PlayFabResultEvent OnAdminGetTaskInstancesResultEvent; + public event PlayFabRequestEvent OnAdminGetTasksRequestEvent; + public event PlayFabResultEvent OnAdminGetTasksResultEvent; + public event PlayFabRequestEvent OnAdminGetTitleDataRequestEvent; + public event PlayFabResultEvent OnAdminGetTitleDataResultEvent; + public event PlayFabRequestEvent OnAdminGetTitleInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminGetTitleInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserAccountInfoRequestEvent; + public event PlayFabResultEvent OnAdminGetUserAccountInfoResultEvent; + public event PlayFabRequestEvent OnAdminGetUserBansRequestEvent; + public event PlayFabResultEvent OnAdminGetUserBansResultEvent; + public event PlayFabRequestEvent OnAdminGetUserDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserInventoryRequestEvent; + public event PlayFabResultEvent OnAdminGetUserInventoryResultEvent; + public event PlayFabRequestEvent OnAdminGetUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserPublisherInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserPublisherInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserPublisherReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserPublisherReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminGetUserReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminGetUserReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminGrantItemsToUsersRequestEvent; + public event PlayFabResultEvent OnAdminGrantItemsToUsersResultEvent; + public event PlayFabRequestEvent OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent; + public event PlayFabResultEvent OnAdminIncrementLimitedEditionItemAvailabilityResultEvent; + public event PlayFabRequestEvent OnAdminIncrementPlayerStatisticVersionRequestEvent; + public event PlayFabResultEvent OnAdminIncrementPlayerStatisticVersionResultEvent; + public event PlayFabRequestEvent OnAdminListOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminListOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminListVirtualCurrencyTypesRequestEvent; + public event PlayFabResultEvent OnAdminListVirtualCurrencyTypesResultEvent; + public event PlayFabRequestEvent OnAdminRefundPurchaseRequestEvent; + public event PlayFabResultEvent OnAdminRefundPurchaseResultEvent; + public event PlayFabRequestEvent OnAdminRemovePlayerTagRequestEvent; + public event PlayFabResultEvent OnAdminRemovePlayerTagResultEvent; + public event PlayFabRequestEvent OnAdminRemoveVirtualCurrencyTypesRequestEvent; + public event PlayFabResultEvent OnAdminRemoveVirtualCurrencyTypesResultEvent; + public event PlayFabRequestEvent OnAdminResetCharacterStatisticsRequestEvent; + public event PlayFabResultEvent OnAdminResetCharacterStatisticsResultEvent; + public event PlayFabRequestEvent OnAdminResetPasswordRequestEvent; + public event PlayFabResultEvent OnAdminResetPasswordResultEvent; + public event PlayFabRequestEvent OnAdminResetUserStatisticsRequestEvent; + public event PlayFabResultEvent OnAdminResetUserStatisticsResultEvent; + public event PlayFabRequestEvent OnAdminResolvePurchaseDisputeRequestEvent; + public event PlayFabResultEvent OnAdminResolvePurchaseDisputeResultEvent; + public event PlayFabRequestEvent OnAdminRevokeAllBansForUserRequestEvent; + public event PlayFabResultEvent OnAdminRevokeAllBansForUserResultEvent; + public event PlayFabRequestEvent OnAdminRevokeBansRequestEvent; + public event PlayFabResultEvent OnAdminRevokeBansResultEvent; + public event PlayFabRequestEvent OnAdminRevokeInventoryItemRequestEvent; + public event PlayFabResultEvent OnAdminRevokeInventoryItemResultEvent; + public event PlayFabRequestEvent OnAdminRevokeInventoryItemsRequestEvent; + public event PlayFabResultEvent OnAdminRevokeInventoryItemsResultEvent; + public event PlayFabRequestEvent OnAdminRunTaskRequestEvent; + public event PlayFabResultEvent OnAdminRunTaskResultEvent; + public event PlayFabRequestEvent OnAdminSendAccountRecoveryEmailRequestEvent; + public event PlayFabResultEvent OnAdminSendAccountRecoveryEmailResultEvent; + public event PlayFabRequestEvent OnAdminSetCatalogItemsRequestEvent; + public event PlayFabResultEvent OnAdminSetCatalogItemsResultEvent; + public event PlayFabRequestEvent OnAdminSetMembershipOverrideRequestEvent; + public event PlayFabResultEvent OnAdminSetMembershipOverrideResultEvent; + public event PlayFabRequestEvent OnAdminSetPlayerSecretRequestEvent; + public event PlayFabResultEvent OnAdminSetPlayerSecretResultEvent; + public event PlayFabRequestEvent OnAdminSetPublishedRevisionRequestEvent; + public event PlayFabResultEvent OnAdminSetPublishedRevisionResultEvent; + public event PlayFabRequestEvent OnAdminSetPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminSetPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminSetStoreItemsRequestEvent; + public event PlayFabResultEvent OnAdminSetStoreItemsResultEvent; + public event PlayFabRequestEvent OnAdminSetTitleDataRequestEvent; + public event PlayFabResultEvent OnAdminSetTitleDataResultEvent; + public event PlayFabRequestEvent OnAdminSetTitleDataAndOverridesRequestEvent; + public event PlayFabResultEvent OnAdminSetTitleDataAndOverridesResultEvent; + public event PlayFabRequestEvent OnAdminSetTitleInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminSetTitleInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminSetupPushNotificationRequestEvent; + public event PlayFabResultEvent OnAdminSetupPushNotificationResultEvent; + public event PlayFabRequestEvent OnAdminSubtractUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnAdminSubtractUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnAdminUpdateBansRequestEvent; + public event PlayFabResultEvent OnAdminUpdateBansResultEvent; + public event PlayFabRequestEvent OnAdminUpdateCatalogItemsRequestEvent; + public event PlayFabResultEvent OnAdminUpdateCatalogItemsResultEvent; + public event PlayFabRequestEvent OnAdminUpdateCloudScriptRequestEvent; + public event PlayFabResultEvent OnAdminUpdateCloudScriptResultEvent; + public event PlayFabRequestEvent OnAdminUpdateOpenIdConnectionRequestEvent; + public event PlayFabResultEvent OnAdminUpdateOpenIdConnectionResultEvent; + public event PlayFabRequestEvent OnAdminUpdatePlayerSharedSecretRequestEvent; + public event PlayFabResultEvent OnAdminUpdatePlayerSharedSecretResultEvent; + public event PlayFabRequestEvent OnAdminUpdatePlayerStatisticDefinitionRequestEvent; + public event PlayFabResultEvent OnAdminUpdatePlayerStatisticDefinitionResultEvent; + public event PlayFabRequestEvent OnAdminUpdatePolicyRequestEvent; + public event PlayFabResultEvent OnAdminUpdatePolicyResultEvent; + public event PlayFabRequestEvent OnAdminUpdateRandomResultTablesRequestEvent; + public event PlayFabResultEvent OnAdminUpdateRandomResultTablesResultEvent; + public event PlayFabRequestEvent OnAdminUpdateSegmentRequestEvent; + public event PlayFabResultEvent OnAdminUpdateSegmentResultEvent; + public event PlayFabRequestEvent OnAdminUpdateStoreItemsRequestEvent; + public event PlayFabResultEvent OnAdminUpdateStoreItemsResultEvent; + public event PlayFabRequestEvent OnAdminUpdateTaskRequestEvent; + public event PlayFabResultEvent OnAdminUpdateTaskResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserPublisherInternalDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserPublisherInternalDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserPublisherReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserPublisherReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnAdminUpdateUserTitleDisplayNameRequestEvent; + public event PlayFabResultEvent OnAdminUpdateUserTitleDisplayNameResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Admin/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs.meta new file mode 100644 index 00000000..6cca88a7 --- /dev/null +++ b/Assets/PlayFabSDK/Admin/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 17d913d4a2b01d044a0f70f2679f2fca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication.meta b/Assets/PlayFabSDK/Authentication.meta new file mode 100644 index 00000000..5a285357 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 14f4be27db90b5d408494e5a681a55f6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs new file mode 100644 index 00000000..6006b8dd --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs @@ -0,0 +1,104 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.AuthenticationModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// The Authentication APIs provide a convenient way to convert classic authentication responses into entity authentication + /// models. These APIs will provide you with the entity authentication token needed for subsequent Entity API calls. The + /// game_server API is designed to create uniquely identifiable game_server entities. The game_server Entity token can be + /// used to call Matchmaking Lobby and Pubsub for server scenarios. + /// + public static class PlayFabAuthenticationAPI + { + static PlayFabAuthenticationAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Create a game_server entity token and return a new or existing game_server entity. + /// + public static void AuthenticateGameServerWithCustomId(AuthenticateCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/GameServerIdentity/AuthenticateGameServerWithCustomId", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete a game_server entity. + /// + public static void Delete(DeleteRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/GameServerIdentity/Delete", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid + /// Entity Token. + /// + public static void GetEntityToken(GetEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + AuthType authType = AuthType.None; +#if !DISABLE_PLAYFABCLIENT_API + if (context.IsClientLoggedIn()) { authType = AuthType.LoginSession; } +#endif +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || ENABLE_PLAYFAB_SECRETKEY + if (callSettings.DeveloperSecretKey != null) { authType = AuthType.DevSecretKey; } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (context.IsEntityLoggedIn()) { authType = AuthType.EntityToken; } +#endif + + + PlayFabHttp.MakeApiCall("/Authentication/GetEntityToken", request, authType, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Method for a server to validate a client provided EntityToken. Only callable by the title entity. + /// + public static void ValidateEntityToken(ValidateEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Authentication/ValidateEntityToken", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs.meta new file mode 100644 index 00000000..d24442f1 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf5e0beea20361a45aee9c2329eafd01 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs new file mode 100644 index 00000000..c3ed1d43 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs @@ -0,0 +1,121 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.AuthenticationModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// The Authentication APIs provide a convenient way to convert classic authentication responses into entity authentication + /// models. These APIs will provide you with the entity authentication token needed for subsequent Entity API calls. The + /// game_server API is designed to create uniquely identifiable game_server entities. The game_server Entity token can be + /// used to call Matchmaking Lobby and Pubsub for server scenarios. + /// + public class PlayFabAuthenticationInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabAuthenticationInstanceAPI() + { + authenticationContext = new PlayFabAuthenticationContext(); + } + + public PlayFabAuthenticationInstanceAPI(PlayFabApiSettings settings) + { + apiSettings = settings; + authenticationContext = new PlayFabAuthenticationContext(); + } + + public PlayFabAuthenticationInstanceAPI(PlayFabAuthenticationContext context) + { + authenticationContext = context ?? new PlayFabAuthenticationContext(); + } + + public PlayFabAuthenticationInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + apiSettings = settings; + authenticationContext = context ?? new PlayFabAuthenticationContext(); + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Create a game_server entity token and return a new or existing game_server entity. + /// + public void AuthenticateGameServerWithCustomId(AuthenticateCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/GameServerIdentity/AuthenticateGameServerWithCustomId", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete a game_server entity. + /// + public void Delete(DeleteRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/GameServerIdentity/Delete", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid + /// Entity Token. + /// + public void GetEntityToken(GetEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + AuthType authType = AuthType.None; +#if !DISABLE_PLAYFABCLIENT_API + if (context.IsClientLoggedIn()) { authType = AuthType.LoginSession; } +#endif +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || ENABLE_PLAYFAB_SECRETKEY + if (callSettings.DeveloperSecretKey != null) { authType = AuthType.DevSecretKey; } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (context.IsEntityLoggedIn()) { authType = AuthType.EntityToken; } +#endif + PlayFabHttp.MakeApiCall("/Authentication/GetEntityToken", request, authType, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Method for a server to validate a client provided EntityToken. Only callable by the title entity. + /// + public void ValidateEntityToken(ValidateEntityTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Authentication/ValidateEntityToken", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs.meta new file mode 100644 index 00000000..a10fd8d6 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ecff04cca276a454aad3baf64c4a2ab4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs new file mode 100644 index 00000000..091e27b3 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs @@ -0,0 +1,242 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.AuthenticationModels +{ + /// + /// Create or return a game_server entity token. Caller must be a title entity. + /// + [Serializable] + public class AuthenticateCustomIdRequest : PlayFabRequestCommon + { + /// + /// The customId used to create and retrieve game_server entity tokens. This is unique at the title level. CustomId must be + /// between 32 and 100 characters. + /// + public string CustomId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class AuthenticateCustomIdResult : PlayFabResultCommon + { + /// + /// The token generated used to set X-EntityToken for game_server calls. + /// + public EntityTokenResponse EntityToken; + /// + /// True if the account was newly created on this authentication. + /// + public bool NewlyCreated; + } + + /// + /// Delete a game_server entity. The caller can be the game_server entity attempting to delete itself. Or a title entity + /// attempting to delete game_server entities for this title. + /// + [Serializable] + public class DeleteRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The game_server entity to be removed. + /// + public EntityKey Entity; + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EntityLineage : PlayFabBaseModel + { + /// + /// The Character Id of the associated entity. + /// + public string CharacterId; + /// + /// The Group Id of the associated entity. + /// + public string GroupId; + /// + /// The Master Player Account Id of the associated entity. + /// + public string MasterPlayerAccountId; + /// + /// The Namespace Id of the associated entity. + /// + public string NamespaceId; + /// + /// The Title Id of the associated entity. + /// + public string TitleId; + /// + /// The Title Player Account Id of the associated entity. + /// + public string TitlePlayerAccountId; + } + + [Serializable] + public class EntityTokenResponse : PlayFabBaseModel + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The token used to set X-EntityToken for all entity based API calls. + /// + public string EntityToken; + /// + /// The time the token will expire, if it is an expiring token, in UTC. + /// + public DateTime? TokenExpiration; + } + + /// + /// This API must be called with X-SecretKey, X-Authentication or X-EntityToken headers. An optional EntityKey may be + /// included to attempt to set the resulting EntityToken to a specific entity, however the entity must be a relation of the + /// caller, such as the master_player_account of a character. If sending X-EntityToken the account will be marked as freshly + /// logged in and will issue a new token. If using X-Authentication or X-EntityToken the header must still be valid and + /// cannot be expired or revoked. + /// + [Serializable] + public class GetEntityTokenRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetEntityTokenResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The token used to set X-EntityToken for all entity based API calls. + /// + public string EntityToken; + /// + /// The time the token will expire, if it is an expiring token, in UTC. + /// + public DateTime? TokenExpiration; + } + + public enum IdentifiedDeviceType + { + Unknown, + XboxOne, + Scarlett, + WindowsOneCore, + WindowsOneCoreMobile, + Win32, + android, + iOS, + PlayStation, + Nintendo + } + + public enum LoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + /// + /// Given an entity token, validates that it hasn't expired or been revoked and will return details of the owner. + /// + [Serializable] + public class ValidateEntityTokenRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Client EntityToken + /// + public string EntityToken; + } + + [Serializable] + public class ValidateEntityTokenResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The authenticated device for this entity, for the given login + /// + public IdentifiedDeviceType? IdentifiedDeviceType; + /// + /// The identity provider for this entity, for the given login + /// + public LoginIdentityProvider? IdentityProvider; + /// + /// The ID issued by the identity provider, e.g. a XUID on Xbox Live + /// + public string IdentityProviderIssuedId; + /// + /// The lineage of this profile. + /// + public EntityLineage Lineage; + } +} +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs.meta new file mode 100644 index 00000000..defcd58c --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabAuthenticationModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ec656500f922b0b4db8e13c80770e0d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs new file mode 100644 index 00000000..0525cc11 --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs @@ -0,0 +1,18 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.AuthenticationModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnAuthenticationAuthenticateGameServerWithCustomIdRequestEvent; + public event PlayFabResultEvent OnAuthenticationAuthenticateGameServerWithCustomIdResultEvent; + public event PlayFabRequestEvent OnAuthenticationDeleteRequestEvent; + public event PlayFabResultEvent OnAuthenticationDeleteResultEvent; + public event PlayFabRequestEvent OnAuthenticationGetEntityTokenRequestEvent; + public event PlayFabResultEvent OnAuthenticationGetEntityTokenResultEvent; + public event PlayFabRequestEvent OnAuthenticationValidateEntityTokenRequestEvent; + public event PlayFabResultEvent OnAuthenticationValidateEntityTokenResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs.meta new file mode 100644 index 00000000..8ba2d25f --- /dev/null +++ b/Assets/PlayFabSDK/Authentication/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c3701fef92515c438633c5d41bf87c8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client.meta b/Assets/PlayFabSDK/Client.meta new file mode 100644 index 00000000..c4bdb8f7 --- /dev/null +++ b/Assets/PlayFabSDK/Client.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ea91f77d2459767449ffe7e92185faa3 +folderAsset: yes +timeCreated: 1468524875 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs b/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs new file mode 100644 index 00000000..d7ec5245 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs @@ -0,0 +1,2311 @@ +#if !DISABLE_PLAYFABCLIENT_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.ClientModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// APIs which provide the full range of PlayFab features available to the client - authentication, account and data + /// management, inventory, friends, matchmaking, reporting, and platform-specific functionality + /// + public static class PlayFabClientAPI + { + static PlayFabClientAPI() {} + + /// + /// Verify client login. + /// + public static bool IsClientLoggedIn() + { + return PlayFabSettings.staticPlayer.IsClientLoggedIn(); + } + + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the + /// allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted + /// items will be swapped between the two players' inventories. + /// + public static void AcceptTrade(AcceptTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AcceptTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At + /// least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + /// + public static void AddFriend(AddFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddFriend", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab + /// ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as + /// authentication credentials, as the intent is that it is easily accessible by other players. + /// + public static void AddGenericID(AddGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddGenericID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds or updates a contact email to the player's profile. + /// + public static void AddOrUpdateContactEmail(AddOrUpdateContactEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddOrUpdateContactEmail", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users + /// in the group can add new members. Shared Groups are designed for sharing data between a very small number of players, + /// please see our guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void AddSharedGroupMembers(AddSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddSharedGroupMembers", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device + /// ID login. + /// + public static void AddUsernamePassword(AddUsernamePasswordRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddUsernamePassword", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the user's balance of the specified virtual currency by the stated amount + /// + public static void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AddUserVirtualCurrency", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers the Android device to receive push notifications + /// + public static void AndroidDevicePushNotificationRegistration(AndroidDevicePushNotificationRegistrationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AndroidDevicePushNotificationRegistration", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Attributes an install for advertisment. + /// + public static void AttributeInstall(AttributeInstallRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/AttributeInstall", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade + /// can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other + /// players from accepting them, for trades that can be claimed by more than one player). + /// + public static void CancelTrade(CancelTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/CancelTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and + /// virtual currency balances as appropriate + /// + public static void ConfirmPurchase(ConfirmPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConfirmPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's + /// inventory. + /// + public static void ConsumeItem(ConsumeItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumeItem", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Grants the player's current entitlements from Microsoft Store's Collection API + /// + public static void ConsumeMicrosoftStoreEntitlements(ConsumeMicrosoftStoreEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumeMicrosoftStoreEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Checks for any new consumable entitlements. If any are found, they are consumed (if they're consumables) and added as + /// PlayFab items + /// + public static void ConsumePS5Entitlements(ConsumePS5EntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumePS5Entitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items + /// + public static void ConsumePSNEntitlements(ConsumePSNEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumePSNEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Grants the player's current entitlements from Xbox Live, consuming all availble items in Xbox and granting them to the + /// player's PlayFab inventory. This call is idempotent and will not grant previously granted items to the player. + /// + public static void ConsumeXboxEntitlements(ConsumeXboxEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ConsumeXboxEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the + /// group. Upon creation, the current user will be the only member of the group. Shared Groups are designed for sharing data + /// between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void CreateSharedGroup(CreateSharedGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/CreateSharedGroup", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player. The + /// PlayFab ID is the entity ID of the player's master_player_account entity. + /// + public static void ExecuteCloudScript(ExecuteCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ExecuteCloudScript", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + public static void ExecuteCloudScript(ExecuteCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method"); + Action wrappedResultCallback = (wrappedResult) => + { + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var wrappedJson = serializer.SerializeObject(wrappedResult.FunctionResult); + try { + wrappedResult.FunctionResult = serializer.DeserializeObject(wrappedJson); + } catch (Exception) { + wrappedResult.FunctionResult = wrappedJson; + wrappedResult.Logs.Add(new LogStatement { Level = "Warning", Data = wrappedJson, Message = "Sdk Message: Could not deserialize result as: " + typeof(TOut).Name }); + } + resultCallback(wrappedResult); + }; + PlayFabHttp.MakeApiCall("/Client/ExecuteCloudScript", request, AuthType.LoginSession, wrappedResultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the user's PlayFab account details + /// + public static void GetAccountInfo(GetAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetAccountInfo", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Returns a list of ad placements and a reward for each + /// + public static void GetAdPlacements(GetAdPlacementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetAdPlacements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be + /// evaluated with the parent PlayFabId to guarantee uniqueness. + /// + public static void GetAllUsersCharacters(ListUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetAllUsersCharacters", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public static void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCatalogItems", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the character which is readable and writable by the client + /// + public static void GetCharacterData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified character's current inventory of virtual goods + /// + public static void GetCharacterInventory(GetCharacterInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterInventory", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard + /// + public static void GetCharacterLeaderboard(GetCharacterLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the character which can only be read by the client + /// + public static void GetCharacterReadOnlyData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterReadOnlyData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the details of all title-specific statistics for the user + /// + public static void GetCharacterStatistics(GetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetCharacterStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned + /// URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the + /// content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, + /// the query to retrieve the data will fail. See this post for more information: + /// https://community.playfab.com/hc/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also, + /// please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply. + /// + public static void GetContentDownloadUrl(GetContentDownloadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetContentDownloadUrl", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in + /// the leaderboard + /// + public static void GetFriendLeaderboard(GetFriendLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetFriendLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab + /// user. If PlayFabId is empty or null will return currently logged in user. + /// + public static void GetFriendLeaderboardAroundPlayer(GetFriendLeaderboardAroundPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetFriendLeaderboardAroundPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the current friend list for the local user, constrained to users who have PlayFab accounts. Friends from + /// linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + /// + public static void GetFriendsList(GetFriendsListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetFriendsList", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard + /// + public static void GetLeaderboard(GetLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID + /// + public static void GetLeaderboardAroundCharacter(GetLeaderboardAroundCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardAroundCharacter", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or + /// null will return currently logged in user. + /// + public static void GetLeaderboardAroundPlayer(GetLeaderboardAroundPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardAroundPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of all of the user's characters for the given statistic. + /// + public static void GetLeaderboardForUserCharacters(GetLeaderboardForUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardForUserCharacters", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the + /// client completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the + /// client to create a cart. Poll GetPurchase using the returned OrderId once you've completed the payment. + /// + public static void GetPaymentToken(GetPaymentTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPaymentToken", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a Photon custom authentication token that can be used to securely join the player into a Photon room. See + /// https://docs.microsoft.com/gaming/playfab/features/multiplayer/photon/quickstart for more details. + /// + public static void GetPhotonAuthenticationToken(GetPhotonAuthenticationTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPhotonAuthenticationToken", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves all of the user's different kinds of info. + /// + public static void GetPlayerCombinedInfo(GetPlayerCombinedInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayerCombinedInfo", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the player's profile + /// + public static void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayerProfile", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public static void GetPlayerSegments(GetPlayerSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayerSegments", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local + /// player. + /// + public static void GetPlayerStatistics(GetPlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayerStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public static void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayerStatisticVersions", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public static void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayerTags", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets all trades the player has either opened or accepted, optionally filtered by trade status. + /// + public static void GetPlayerTrades(GetPlayerTradesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayerTrades", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers. + /// + public static void GetPlayFabIDsFromFacebookIDs(GetPlayFabIDsFromFacebookIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromFacebookIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook Instant Game identifiers. + /// + public static void GetPlayFabIDsFromFacebookInstantGamesIds(GetPlayFabIDsFromFacebookInstantGamesIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromFacebookInstantGamesIds", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Game Center identifiers (referenced in the Game Center + /// Programming Guide as the Player Identifier). + /// + public static void GetPlayFabIDsFromGameCenterIDs(GetPlayFabIDsFromGameCenterIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGameCenterIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the + /// service name plus the service-specific ID for the player, as specified by the title when the generic identifier was + /// added to the player account. + /// + public static void GetPlayFabIDsFromGenericIDs(GetPlayFabIDsFromGenericIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGenericIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Google identifiers. The Google identifiers are the IDs for + /// the user accounts, available as "id" in the Google+ People API calls. + /// + public static void GetPlayFabIDsFromGoogleIDs(GetPlayFabIDsFromGoogleIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGoogleIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Google Play Games identifiers. The Google Play Games + /// identifiers are the IDs for the user accounts, available as "playerId" in the Google Play Games Services - Players API + /// calls. + /// + public static void GetPlayFabIDsFromGooglePlayGamesPlayerIDs(GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGooglePlayGamesPlayerIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Kongregate identifiers. The Kongregate identifiers are the + /// IDs for the user accounts, available as "user_id" from the Kongregate API methods(ex: + /// http://developers.kongregate.com/docs/client/getUserId). + /// + public static void GetPlayFabIDsFromKongregateIDs(GetPlayFabIDsFromKongregateIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromKongregateIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Service Account identifiers. + /// + public static void GetPlayFabIDsFromNintendoServiceAccountIds(GetPlayFabIDsFromNintendoServiceAccountIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromNintendoServiceAccountIds", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Switch Device identifiers. + /// + public static void GetPlayFabIDsFromNintendoSwitchDeviceIds(GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromNintendoSwitchDeviceIds", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public static void GetPlayFabIDsFromPSNAccountIDs(GetPlayFabIDsFromPSNAccountIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromPSNAccountIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public static void GetPlayFabIDsFromPSNOnlineIDs(GetPlayFabIDsFromPSNOnlineIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromPSNOnlineIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile + /// IDs for the user accounts, available as SteamId in the Steamworks Community API calls. + /// + public static void GetPlayFabIDsFromSteamIDs(GetPlayFabIDsFromSteamIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromSteamIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for + /// the user accounts, available as "_id" from the Twitch API methods (ex: + /// https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser). + /// + public static void GetPlayFabIDsFromTwitchIDs(GetPlayFabIDsFromTwitchIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromTwitchIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of XboxLive identifiers. + /// + public static void GetPlayFabIDsFromXboxLiveIDs(GetPlayFabIDsFromXboxLiveIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromXboxLiveIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public static void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPublisherData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that + /// are still active. + /// + public static void GetPurchase(GetPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group + /// may use this to retrieve group data, including membership, but they will not receive data for keys marked as private. + /// Shared Groups are designed for sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void GetSharedGroupData(GetSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetSharedGroupData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the set of items defined for the specified store, including all prices defined + /// + public static void GetStoreItems(GetStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetStoreItems", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the current server time + /// + public static void GetTime(GetTimeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetTime", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom title settings + /// + public static void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetTitleData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title news feed, as configured in the developer portal + /// + public static void GetTitleNews(GetTitleNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetTitleNews", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Returns the title's base 64 encoded RSA CSP blob. + /// + public static void GetTitlePublicKey(GetTitlePublicKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + + + PlayFabHttp.MakeApiCall("/Client/GetTitlePublicKey", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the current status of an existing trade. + /// + public static void GetTradeStatus(GetTradeStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetTradeStatus", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetUserData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the user's current inventory of virtual goods + /// + public static void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetUserInventory", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetUserPublisherData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public static void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetUserPublisherReadOnlyData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public static void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GetUserReadOnlyData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated + /// with the parent PlayFabId to guarantee uniqueness. + /// + public static void GrantCharacterToUser(GrantCharacterToUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/GrantCharacterToUser", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Android device identifier to the user's PlayFab account + /// + public static void LinkAndroidDeviceID(LinkAndroidDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkAndroidDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Apple account associated with the token to the user's PlayFab account. + /// + public static void LinkApple(LinkAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkApple", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the custom identifier, generated by the title, to the user's PlayFab account + /// + public static void LinkCustomID(LinkCustomIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkCustomID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Facebook account associated with the provided Facebook access token to the user's PlayFab account + /// + public static void LinkFacebookAccount(LinkFacebookAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkFacebookAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Facebook Instant Games Id to the user's PlayFab account + /// + public static void LinkFacebookInstantGamesId(LinkFacebookInstantGamesIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkFacebookInstantGamesId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Game Center account associated with the provided Game Center ID to the user's PlayFab account. Logging in with + /// a Game Center ID is insecure if you do not include the optional PublicKeyUrl, Salt, Signature, and Timestamp parameters + /// in this request. It is recommended you require these parameters on all Game Center calls by going to the Apple Add-ons + /// page in the PlayFab Game Manager and enabling the 'Require secure authentication only for this app' option. + /// + public static void LinkGameCenterAccount(LinkGameCenterAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkGameCenterAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the currently signed-in user account to their Google account, using their Google account credentials + /// + public static void LinkGoogleAccount(LinkGoogleAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkGoogleAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the currently signed-in user account to their Google Play Games account, using their Google Play Games account + /// credentials + /// + public static void LinkGooglePlayGamesServicesAccount(LinkGooglePlayGamesServicesAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkGooglePlayGamesServicesAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the vendor-specific iOS device identifier to the user's PlayFab account + /// + public static void LinkIOSDeviceID(LinkIOSDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkIOSDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Kongregate identifier to the user's PlayFab account + /// + public static void LinkKongregate(LinkKongregateAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkKongregate", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Nintendo account associated with the token to the user's PlayFab account. + /// + public static void LinkNintendoServiceAccount(LinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkNintendoServiceAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the NintendoSwitchDeviceId to the user's PlayFab account + /// + public static void LinkNintendoSwitchDeviceId(LinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkNintendoSwitchDeviceId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links an OpenID Connect account to a user's PlayFab account, based on an existing relationship between a title and an + /// Open ID Connect provider and the OpenId Connect JWT from that provider. + /// + public static void LinkOpenIdConnect(LinkOpenIdConnectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkOpenIdConnect", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the PlayStation :tm: Network account associated with the provided access code to the user's PlayFab account + /// + public static void LinkPSNAccount(LinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkPSNAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account + /// + public static void LinkSteamAccount(LinkSteamAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkSteamAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Twitch account associated with the token to the user's PlayFab account. + /// + public static void LinkTwitch(LinkTwitchAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkTwitch", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Xbox Live account associated with the provided access code to the user's PlayFab account + /// + public static void LinkXboxAccount(LinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/LinkXboxAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user + /// + public static void LoginWithAndroidDeviceID(LoginWithAndroidDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithAndroidDeviceID", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs in the user with a Sign in with Apple identity token. + /// + public static void LoginWithApple(LoginWithAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithApple", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a custom unique identifier generated by the title, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public static void LoginWithCustomID(LoginWithCustomIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithCustomID", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls + /// which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the + /// creation of new accounts via the CreateAccountFlag. Email addresses may be used to create accounts via + /// RegisterPlayFabUser. + /// + public static void LoginWithEmailAddress(LoginWithEmailAddressRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithEmailAddress", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API + /// calls which require an authenticated user + /// + public static void LoginWithFacebook(LoginWithFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithFacebook", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Facebook Instant Games ID, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user. Requires Facebook Instant Games to be configured. + /// + public static void LoginWithFacebookInstantGamesId(LoginWithFacebookInstantGamesIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithFacebookInstantGamesId", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be + /// used for API calls which require an authenticated user. Logging in with a Game Center ID is insecure if you do not + /// include the optional PublicKeyUrl, Salt, Signature, and Timestamp parameters in this request. It is recommended you + /// require these parameters on all Game Center calls by going to the Apple Add-ons page in the PlayFab Game Manager and + /// enabling the 'Require secure authentication only for this app' option. + /// + public static void LoginWithGameCenter(LoginWithGameCenterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithGameCenter", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using their Google account credentials + /// + public static void LoginWithGoogleAccount(LoginWithGoogleAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithGoogleAccount", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using their Google Play Games account credentials + /// + public static void LoginWithGooglePlayGamesServices(LoginWithGooglePlayGamesServicesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithGooglePlayGamesServices", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently + /// be used for API calls which require an authenticated user + /// + public static void LoginWithIOSDeviceID(LoginWithIOSDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithIOSDeviceID", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Kongregate player account. + /// + public static void LoginWithKongregate(LoginWithKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithKongregate", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs in the user with a Nintendo service account token. + /// + public static void LoginWithNintendoServiceAccount(LoginWithNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithNintendoServiceAccount", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Nintendo Switch Device ID, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user + /// + public static void LoginWithNintendoSwitchDeviceId(LoginWithNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithNintendoSwitchDeviceId", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Logs in a user with an Open ID Connect JWT created by an existing relationship between a title and an Open ID Connect + /// provider. + /// + public static void LoginWithOpenIdConnect(LoginWithOpenIdConnectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithOpenIdConnect", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls + /// which require an authenticated user. Unlike most other login API calls, LoginWithPlayFab does not permit the creation of + /// new accounts via the CreateAccountFlag. Username/Password credentials may be used to create accounts via + /// RegisterPlayFabUser, or added to existing accounts using AddUsernamePassword. + /// + public static void LoginWithPlayFab(LoginWithPlayFabRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithPlayFab", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a PlayStation :tm: Network authentication code, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public static void LoginWithPSN(LoginWithPSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithPSN", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user + /// + public static void LoginWithSteam(LoginWithSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithSteam", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Twitch access token. + /// + public static void LoginWithTwitch(LoginWithTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithTwitch", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls + /// which require an authenticated user + /// + public static void LoginWithXbox(LoginWithXboxRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/LoginWithXbox", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time. + /// + public static void OpenTrade(OpenTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/OpenTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Selects a payment option for purchase order created via StartPurchase + /// + public static void PayForPurchase(PayForPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/PayForPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as + /// well as what the client believes the price to be. This lets the server fail the purchase if the price has changed. + /// + public static void PurchaseItem(PurchaseItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/PurchaseItem", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the + /// Economy->Catalogs tab in the PlayFab Game Manager. + /// + public static void RedeemCoupon(RedeemCouponRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RedeemCoupon", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Uses the supplied OAuth code to refresh the internally cached player PlayStation :tm: Network auth token + /// + public static void RefreshPSNAuthToken(RefreshPSNAuthTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RefreshPSNAuthToken", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers the iOS device to receive push notifications + /// + public static void RegisterForIOSPushNotification(RegisterForIOSPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RegisterForIOSPushNotification", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which + /// require an authenticated user. You must supply a username and an email address. + /// + public static void RegisterPlayFabUser(RegisterPlayFabUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + + + PlayFabHttp.MakeApiCall("/Client/RegisterPlayFabUser", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a contact email from the player's profile. + /// + public static void RemoveContactEmail(RemoveContactEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RemoveContactEmail", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a specified user from the friend list of the local user + /// + public static void RemoveFriend(RemoveFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RemoveFriend", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes the specified generic service identifier from the player's PlayFab account. + /// + public static void RemoveGenericID(RemoveGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RemoveGenericID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the + /// group can remove members. If as a result of the call, zero users remain with access, the group and its associated data + /// will be deleted. Shared Groups are designed for sharing data between a very small number of players, please see our + /// guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void RemoveSharedGroupMembers(RemoveSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RemoveSharedGroupMembers", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Report player's ad activity + /// + public static void ReportAdActivity(ReportAdActivityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ReportAdActivity", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Write a PlayStream event to describe the provided player device information. This API method is not designed to be + /// called directly by developers. Each PlayFab client SDK will eventually report this information automatically. + /// + public static void ReportDeviceInfo(DeviceInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ReportDeviceInfo", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title + /// can take action concerning potentially toxic players. + /// + public static void ReportPlayer(ReportPlayerClientRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ReportPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Restores all in-app purchases based on the given restore receipt + /// + public static void RestoreIOSPurchases(RestoreIOSPurchasesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RestoreIOSPurchases", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Reward player's ad activity + /// + public static void RewardAdActivity(RewardAdActivityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/RewardAdActivity", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to + /// change the password.If an account recovery email template ID is provided, an email using the custom email template will + /// be used. + /// + public static void SendAccountRecoveryEmail(SendAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + + + PlayFabHttp.MakeApiCall("/Client/SendAccountRecoveryEmail", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the tag list for a specified user in the friend list of the local user + /// + public static void SetFriendTags(SetFriendTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/SetFriendTags", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's + /// secret use the Admin or Server API method SetPlayerSecret. + /// + public static void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/SetPlayerSecret", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Creates an order for a list of items from the title catalog + /// + public static void StartPurchase(StartPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/StartPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make + /// a VC balance negative with this API. + /// + public static void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/SubtractUserVirtualCurrency", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Android device identifier from the user's PlayFab account + /// + public static void UnlinkAndroidDeviceID(UnlinkAndroidDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkAndroidDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Apple account from the user's PlayFab account. + /// + public static void UnlinkApple(UnlinkAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkApple", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related custom identifier from the user's PlayFab account + /// + public static void UnlinkCustomID(UnlinkCustomIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkCustomID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Facebook account from the user's PlayFab account + /// + public static void UnlinkFacebookAccount(UnlinkFacebookAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkFacebookAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Facebook Instant Game Ids from the user's PlayFab account + /// + public static void UnlinkFacebookInstantGamesId(UnlinkFacebookInstantGamesIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkFacebookInstantGamesId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Game Center account from the user's PlayFab account + /// + public static void UnlinkGameCenterAccount(UnlinkGameCenterAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkGameCenterAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Google account from the user's PlayFab account + /// (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). + /// + public static void UnlinkGoogleAccount(UnlinkGoogleAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkGoogleAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Google Play Games account from the user's PlayFab account. + /// + public static void UnlinkGooglePlayGamesServicesAccount(UnlinkGooglePlayGamesServicesAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkGooglePlayGamesServicesAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related iOS device identifier from the user's PlayFab account + /// + public static void UnlinkIOSDeviceID(UnlinkIOSDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkIOSDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Kongregate identifier from the user's PlayFab account + /// + public static void UnlinkKongregate(UnlinkKongregateAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkKongregate", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Nintendo account from the user's PlayFab account. + /// + public static void UnlinkNintendoServiceAccount(UnlinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkNintendoServiceAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related NintendoSwitchDeviceId from the user's PlayFab account + /// + public static void UnlinkNintendoSwitchDeviceId(UnlinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkNintendoSwitchDeviceId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks an OpenID Connect account from a user's PlayFab account, based on the connection ID of an existing relationship + /// between a title and an Open ID Connect provider. + /// + public static void UnlinkOpenIdConnect(UnlinkOpenIdConnectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkOpenIdConnect", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related PlayStation :tm: Network account from the user's PlayFab account + /// + public static void UnlinkPSNAccount(UnlinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkPSNAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Steam account from the user's PlayFab account + /// + public static void UnlinkSteamAccount(UnlinkSteamAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkSteamAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Twitch account from the user's PlayFab account. + /// + public static void UnlinkTwitch(UnlinkTwitchAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkTwitch", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Xbox Live account from the user's PlayFab account + /// + public static void UnlinkXboxAccount(UnlinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlinkXboxAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Opens the specified container, with the specified key (when required), and returns the contents of the + /// opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will + /// be decremented, consistent with the operation of ConsumeItem. + /// + public static void UnlockContainerInstance(UnlockContainerInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlockContainerInstance", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it + /// using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are + /// consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + /// + public static void UnlockContainerItem(UnlockContainerItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UnlockContainerItem", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update the avatar URL of the player + /// + public static void UpdateAvatarUrl(UpdateAvatarUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdateAvatarUrl", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates and updates the title-specific custom data for the user's character which is readable and writable by the client + /// + public static void UpdateCharacterData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdateCharacterData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the values of the specified title-specific statistics for the specific character. By default, clients are not + /// permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. + /// + public static void UpdateCharacterStatistics(UpdateCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdateCharacterStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to + /// update statistics. Developers may override this setting in the Game Manager > Settings > API Features. + /// + public static void UpdatePlayerStatistics(UpdatePlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdatePlayerStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated + /// or added in this call will be readable by users not in the group. By default, data permissions are set to Private. + /// Regardless of the permission setting, only members of the group can update the data. Shared Groups are designed for + /// sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void UpdateSharedGroupData(UpdateSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdateSharedGroupData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates and updates the title-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdateUserData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates and updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdateUserPublisherData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title specific display name for the user + /// + public static void UpdateUserTitleDisplayName(UpdateUserTitleDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/UpdateUserTitleDisplayName", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates with Amazon that the receipt for an Amazon App Store in-app purchase is valid and that it matches + /// the purchased catalog item + /// + public static void ValidateAmazonIAPReceipt(ValidateAmazonReceiptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ValidateAmazonIAPReceipt", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates a Google Play purchase and gives the corresponding item to the player. + /// + public static void ValidateGooglePlayPurchase(ValidateGooglePlayPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ValidateGooglePlayPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates with the Apple store that the receipt for an iOS in-app purchase is valid and that it matches the + /// purchased catalog item + /// + public static void ValidateIOSReceipt(ValidateIOSReceiptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ValidateIOSReceipt", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates with Windows that the receipt for an Windows App Store in-app purchase is valid and that it + /// matches the purchased catalog item + /// + public static void ValidateWindowsStoreReceipt(ValidateWindowsReceiptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/ValidateWindowsStoreReceipt", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Writes a character-based event into PlayStream. + /// + public static void WriteCharacterEvent(WriteClientCharacterEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/WriteCharacterEvent", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Writes a player-based event into PlayStream. + /// + public static void WritePlayerEvent(WriteClientPlayerEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/WritePlayerEvent", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Writes a title-based event into PlayStream. + /// + public static void WriteTitleEvent(WriteTitleEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Client/WriteTitleEvent", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs.meta b/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs.meta new file mode 100644 index 00000000..2050daf5 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabClientAPI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 90390500e82fe784caf147e8a6dee649 +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client/PlayFabClientInstanceAPI.cs b/Assets/PlayFabSDK/Client/PlayFabClientInstanceAPI.cs new file mode 100644 index 00000000..321b6418 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabClientInstanceAPI.cs @@ -0,0 +1,2008 @@ +#if !DISABLE_PLAYFABCLIENT_API + +using System; +using System.Collections.Generic; +using PlayFab.ClientModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// APIs which provide the full range of PlayFab features available to the client - authentication, account and data + /// management, inventory, friends, matchmaking, reporting, and platform-specific functionality + /// + public class PlayFabClientInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabClientInstanceAPI() + { + authenticationContext = new PlayFabAuthenticationContext(); + } + + public PlayFabClientInstanceAPI(PlayFabApiSettings settings) + { + apiSettings = settings; + authenticationContext = new PlayFabAuthenticationContext(); + } + + public PlayFabClientInstanceAPI(PlayFabAuthenticationContext context) + { + authenticationContext = context ?? new PlayFabAuthenticationContext(); + } + + public PlayFabClientInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + apiSettings = settings; + authenticationContext = context ?? new PlayFabAuthenticationContext(); + } + + /// + /// Verify client login. + /// + public bool IsClientLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsClientLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the + /// allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted + /// items will be swapped between the two players' inventories. + /// + public void AcceptTrade(AcceptTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AcceptTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At + /// least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + /// + public void AddFriend(AddFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AddFriend", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab + /// ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as + /// authentication credentials, as the intent is that it is easily accessible by other players. + /// + public void AddGenericID(AddGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AddGenericID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds or updates a contact email to the player's profile. + /// + public void AddOrUpdateContactEmail(AddOrUpdateContactEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AddOrUpdateContactEmail", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users + /// in the group can add new members. Shared Groups are designed for sharing data between a very small number of players, + /// please see our guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void AddSharedGroupMembers(AddSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AddSharedGroupMembers", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device + /// ID login. + /// + public void AddUsernamePassword(AddUsernamePasswordRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AddUsernamePassword", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the user's balance of the specified virtual currency by the stated amount + /// + public void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AddUserVirtualCurrency", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers the Android device to receive push notifications + /// + public void AndroidDevicePushNotificationRegistration(AndroidDevicePushNotificationRegistrationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AndroidDevicePushNotificationRegistration", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Attributes an install for advertisment. + /// + public void AttributeInstall(AttributeInstallRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/AttributeInstall", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade + /// can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other + /// players from accepting them, for trades that can be claimed by more than one player). + /// + public void CancelTrade(CancelTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/CancelTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and + /// virtual currency balances as appropriate + /// + public void ConfirmPurchase(ConfirmPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ConfirmPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's + /// inventory. + /// + public void ConsumeItem(ConsumeItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ConsumeItem", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Grants the player's current entitlements from Microsoft Store's Collection API + /// + public void ConsumeMicrosoftStoreEntitlements(ConsumeMicrosoftStoreEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ConsumeMicrosoftStoreEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Checks for any new consumable entitlements. If any are found, they are consumed (if they're consumables) and added as + /// PlayFab items + /// + public void ConsumePS5Entitlements(ConsumePS5EntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ConsumePS5Entitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items + /// + public void ConsumePSNEntitlements(ConsumePSNEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ConsumePSNEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Grants the player's current entitlements from Xbox Live, consuming all availble items in Xbox and granting them to the + /// player's PlayFab inventory. This call is idempotent and will not grant previously granted items to the player. + /// + public void ConsumeXboxEntitlements(ConsumeXboxEntitlementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ConsumeXboxEntitlements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the + /// group. Upon creation, the current user will be the only member of the group. Shared Groups are designed for sharing data + /// between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void CreateSharedGroup(CreateSharedGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/CreateSharedGroup", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player. The + /// PlayFab ID is the entity ID of the player's master_player_account entity. + /// + public void ExecuteCloudScript(ExecuteCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ExecuteCloudScript", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + public void ExecuteCloudScript(ExecuteCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method"); + Action wrappedResultCallback = (wrappedResult) => + { + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var wrappedJson = serializer.SerializeObject(wrappedResult.FunctionResult); + try { + wrappedResult.FunctionResult = serializer.DeserializeObject(wrappedJson); + } catch (Exception) { + wrappedResult.FunctionResult = wrappedJson; + wrappedResult.Logs.Add(new LogStatement { Level = "Warning", Data = wrappedJson, Message = "Sdk Message: Could not deserialize result as: " + typeof(TOut).Name }); + } + resultCallback(wrappedResult); + }; + PlayFabHttp.MakeApiCall("/Client/ExecuteCloudScript", request, AuthType.LoginSession, wrappedResultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the user's PlayFab account details + /// + public void GetAccountInfo(GetAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetAccountInfo", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Returns a list of ad placements and a reward for each + /// + public void GetAdPlacements(GetAdPlacementsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetAdPlacements", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be + /// evaluated with the parent PlayFabId to guarantee uniqueness. + /// + public void GetAllUsersCharacters(ListUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetAllUsersCharacters", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetCatalogItems", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the character which is readable and writable by the client + /// + public void GetCharacterData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetCharacterData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified character's current inventory of virtual goods + /// + public void GetCharacterInventory(GetCharacterInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetCharacterInventory", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard + /// + public void GetCharacterLeaderboard(GetCharacterLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetCharacterLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the character which can only be read by the client + /// + public void GetCharacterReadOnlyData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetCharacterReadOnlyData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the details of all title-specific statistics for the user + /// + public void GetCharacterStatistics(GetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetCharacterStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned + /// URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the + /// content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, + /// the query to retrieve the data will fail. See this post for more information: + /// https://community.playfab.com/hc/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also, + /// please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply. + /// + public void GetContentDownloadUrl(GetContentDownloadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetContentDownloadUrl", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in + /// the leaderboard + /// + public void GetFriendLeaderboard(GetFriendLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetFriendLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab + /// user. If PlayFabId is empty or null will return currently logged in user. + /// + public void GetFriendLeaderboardAroundPlayer(GetFriendLeaderboardAroundPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetFriendLeaderboardAroundPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the current friend list for the local user, constrained to users who have PlayFab accounts. Friends from + /// linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + /// + public void GetFriendsList(GetFriendsListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetFriendsList", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard + /// + public void GetLeaderboard(GetLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetLeaderboard", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID + /// + public void GetLeaderboardAroundCharacter(GetLeaderboardAroundCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardAroundCharacter", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or + /// null will return currently logged in user. + /// + public void GetLeaderboardAroundPlayer(GetLeaderboardAroundPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardAroundPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of all of the user's characters for the given statistic. + /// + public void GetLeaderboardForUserCharacters(GetLeaderboardForUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetLeaderboardForUserCharacters", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the + /// client completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the + /// client to create a cart. Poll GetPurchase using the returned OrderId once you've completed the payment. + /// + public void GetPaymentToken(GetPaymentTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPaymentToken", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a Photon custom authentication token that can be used to securely join the player into a Photon room. See + /// https://docs.microsoft.com/gaming/playfab/features/multiplayer/photon/quickstart for more details. + /// + public void GetPhotonAuthenticationToken(GetPhotonAuthenticationTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPhotonAuthenticationToken", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves all of the user's different kinds of info. + /// + public void GetPlayerCombinedInfo(GetPlayerCombinedInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayerCombinedInfo", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the player's profile + /// + public void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayerProfile", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public void GetPlayerSegments(GetPlayerSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayerSegments", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local + /// player. + /// + public void GetPlayerStatistics(GetPlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayerStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayerStatisticVersions", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayerTags", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets all trades the player has either opened or accepted, optionally filtered by trade status. + /// + public void GetPlayerTrades(GetPlayerTradesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayerTrades", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers. + /// + public void GetPlayFabIDsFromFacebookIDs(GetPlayFabIDsFromFacebookIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromFacebookIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook Instant Game identifiers. + /// + public void GetPlayFabIDsFromFacebookInstantGamesIds(GetPlayFabIDsFromFacebookInstantGamesIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromFacebookInstantGamesIds", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Game Center identifiers (referenced in the Game Center + /// Programming Guide as the Player Identifier). + /// + public void GetPlayFabIDsFromGameCenterIDs(GetPlayFabIDsFromGameCenterIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGameCenterIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the + /// service name plus the service-specific ID for the player, as specified by the title when the generic identifier was + /// added to the player account. + /// + public void GetPlayFabIDsFromGenericIDs(GetPlayFabIDsFromGenericIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGenericIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Google identifiers. The Google identifiers are the IDs for + /// the user accounts, available as "id" in the Google+ People API calls. + /// + public void GetPlayFabIDsFromGoogleIDs(GetPlayFabIDsFromGoogleIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGoogleIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Google Play Games identifiers. The Google Play Games + /// identifiers are the IDs for the user accounts, available as "playerId" in the Google Play Games Services - Players API + /// calls. + /// + public void GetPlayFabIDsFromGooglePlayGamesPlayerIDs(GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromGooglePlayGamesPlayerIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Kongregate identifiers. The Kongregate identifiers are the + /// IDs for the user accounts, available as "user_id" from the Kongregate API methods(ex: + /// http://developers.kongregate.com/docs/client/getUserId). + /// + public void GetPlayFabIDsFromKongregateIDs(GetPlayFabIDsFromKongregateIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromKongregateIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Service Account identifiers. + /// + public void GetPlayFabIDsFromNintendoServiceAccountIds(GetPlayFabIDsFromNintendoServiceAccountIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromNintendoServiceAccountIds", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Switch Device identifiers. + /// + public void GetPlayFabIDsFromNintendoSwitchDeviceIds(GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromNintendoSwitchDeviceIds", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public void GetPlayFabIDsFromPSNAccountIDs(GetPlayFabIDsFromPSNAccountIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromPSNAccountIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public void GetPlayFabIDsFromPSNOnlineIDs(GetPlayFabIDsFromPSNOnlineIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromPSNOnlineIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile + /// IDs for the user accounts, available as SteamId in the Steamworks Community API calls. + /// + public void GetPlayFabIDsFromSteamIDs(GetPlayFabIDsFromSteamIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromSteamIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for + /// the user accounts, available as "_id" from the Twitch API methods (ex: + /// https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser). + /// + public void GetPlayFabIDsFromTwitchIDs(GetPlayFabIDsFromTwitchIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromTwitchIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of XboxLive identifiers. + /// + public void GetPlayFabIDsFromXboxLiveIDs(GetPlayFabIDsFromXboxLiveIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPlayFabIDsFromXboxLiveIDs", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPublisherData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that + /// are still active. + /// + public void GetPurchase(GetPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group + /// may use this to retrieve group data, including membership, but they will not receive data for keys marked as private. + /// Shared Groups are designed for sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void GetSharedGroupData(GetSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetSharedGroupData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the set of items defined for the specified store, including all prices defined + /// + public void GetStoreItems(GetStoreItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetStoreItems", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the current server time + /// + public void GetTime(GetTimeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetTime", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom title settings + /// + public void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetTitleData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title news feed, as configured in the developer portal + /// + public void GetTitleNews(GetTitleNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetTitleNews", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Returns the title's base 64 encoded RSA CSP blob. + /// + public void GetTitlePublicKey(GetTitlePublicKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + PlayFabHttp.MakeApiCall("/Client/GetTitlePublicKey", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the current status of an existing trade. + /// + public void GetTradeStatus(GetTradeStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetTradeStatus", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetUserData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the user's current inventory of virtual goods + /// + public void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetUserInventory", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetUserPublisherData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetUserPublisherReadOnlyData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GetUserReadOnlyData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated + /// with the parent PlayFabId to guarantee uniqueness. + /// + public void GrantCharacterToUser(GrantCharacterToUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/GrantCharacterToUser", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Android device identifier to the user's PlayFab account + /// + public void LinkAndroidDeviceID(LinkAndroidDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkAndroidDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Apple account associated with the token to the user's PlayFab account. + /// + public void LinkApple(LinkAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkApple", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the custom identifier, generated by the title, to the user's PlayFab account + /// + public void LinkCustomID(LinkCustomIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkCustomID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Facebook account associated with the provided Facebook access token to the user's PlayFab account + /// + public void LinkFacebookAccount(LinkFacebookAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkFacebookAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Facebook Instant Games Id to the user's PlayFab account + /// + public void LinkFacebookInstantGamesId(LinkFacebookInstantGamesIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkFacebookInstantGamesId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Game Center account associated with the provided Game Center ID to the user's PlayFab account. Logging in with + /// a Game Center ID is insecure if you do not include the optional PublicKeyUrl, Salt, Signature, and Timestamp parameters + /// in this request. It is recommended you require these parameters on all Game Center calls by going to the Apple Add-ons + /// page in the PlayFab Game Manager and enabling the 'Require secure authentication only for this app' option. + /// + public void LinkGameCenterAccount(LinkGameCenterAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkGameCenterAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the currently signed-in user account to their Google account, using their Google account credentials + /// + public void LinkGoogleAccount(LinkGoogleAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkGoogleAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the currently signed-in user account to their Google Play Games account, using their Google Play Games account + /// credentials + /// + public void LinkGooglePlayGamesServicesAccount(LinkGooglePlayGamesServicesAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkGooglePlayGamesServicesAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the vendor-specific iOS device identifier to the user's PlayFab account + /// + public void LinkIOSDeviceID(LinkIOSDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkIOSDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Kongregate identifier to the user's PlayFab account + /// + public void LinkKongregate(LinkKongregateAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkKongregate", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Nintendo account associated with the token to the user's PlayFab account. + /// + public void LinkNintendoServiceAccount(LinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkNintendoServiceAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the NintendoSwitchDeviceId to the user's PlayFab account + /// + public void LinkNintendoSwitchDeviceId(LinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkNintendoSwitchDeviceId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links an OpenID Connect account to a user's PlayFab account, based on an existing relationship between a title and an + /// Open ID Connect provider and the OpenId Connect JWT from that provider. + /// + public void LinkOpenIdConnect(LinkOpenIdConnectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkOpenIdConnect", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the PlayStation :tm: Network account associated with the provided access code to the user's PlayFab account + /// + public void LinkPSNAccount(LinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkPSNAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account + /// + public void LinkSteamAccount(LinkSteamAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkSteamAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Twitch account associated with the token to the user's PlayFab account. + /// + public void LinkTwitch(LinkTwitchAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkTwitch", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Xbox Live account associated with the provided access code to the user's PlayFab account + /// + public void LinkXboxAccount(LinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/LinkXboxAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user + /// + public void LoginWithAndroidDeviceID(LoginWithAndroidDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithAndroidDeviceID", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs in the user with a Sign in with Apple identity token. + /// + public void LoginWithApple(LoginWithAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithApple", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a custom unique identifier generated by the title, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public void LoginWithCustomID(LoginWithCustomIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithCustomID", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls + /// which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the + /// creation of new accounts via the CreateAccountFlag. Email addresses may be used to create accounts via + /// RegisterPlayFabUser. + /// + public void LoginWithEmailAddress(LoginWithEmailAddressRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithEmailAddress", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API + /// calls which require an authenticated user + /// + public void LoginWithFacebook(LoginWithFacebookRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithFacebook", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Facebook Instant Games ID, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user. Requires Facebook Instant Games to be configured. + /// + public void LoginWithFacebookInstantGamesId(LoginWithFacebookInstantGamesIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithFacebookInstantGamesId", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be + /// used for API calls which require an authenticated user. Logging in with a Game Center ID is insecure if you do not + /// include the optional PublicKeyUrl, Salt, Signature, and Timestamp parameters in this request. It is recommended you + /// require these parameters on all Game Center calls by going to the Apple Add-ons page in the PlayFab Game Manager and + /// enabling the 'Require secure authentication only for this app' option. + /// + public void LoginWithGameCenter(LoginWithGameCenterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithGameCenter", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using their Google account credentials + /// + public void LoginWithGoogleAccount(LoginWithGoogleAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithGoogleAccount", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using their Google Play Games account credentials + /// + public void LoginWithGooglePlayGamesServices(LoginWithGooglePlayGamesServicesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithGooglePlayGamesServices", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently + /// be used for API calls which require an authenticated user + /// + public void LoginWithIOSDeviceID(LoginWithIOSDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithIOSDeviceID", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Kongregate player account. + /// + public void LoginWithKongregate(LoginWithKongregateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithKongregate", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs in the user with a Nintendo service account token. + /// + public void LoginWithNintendoServiceAccount(LoginWithNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithNintendoServiceAccount", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Nintendo Switch Device ID, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user + /// + public void LoginWithNintendoSwitchDeviceId(LoginWithNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithNintendoSwitchDeviceId", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Logs in a user with an Open ID Connect JWT created by an existing relationship between a title and an Open ID Connect + /// provider. + /// + public void LoginWithOpenIdConnect(LoginWithOpenIdConnectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithOpenIdConnect", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls + /// which require an authenticated user. Unlike most other login API calls, LoginWithPlayFab does not permit the creation of + /// new accounts via the CreateAccountFlag. Username/Password credentials may be used to create accounts via + /// RegisterPlayFabUser, or added to existing accounts using AddUsernamePassword. + /// + public void LoginWithPlayFab(LoginWithPlayFabRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithPlayFab", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a PlayStation :tm: Network authentication code, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public void LoginWithPSN(LoginWithPSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithPSN", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for + /// API calls which require an authenticated user + /// + public void LoginWithSteam(LoginWithSteamRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithSteam", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Twitch access token. + /// + public void LoginWithTwitch(LoginWithTwitchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithTwitch", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls + /// which require an authenticated user + /// + public void LoginWithXbox(LoginWithXboxRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/LoginWithXbox", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time. + /// + public void OpenTrade(OpenTradeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/OpenTrade", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Selects a payment option for purchase order created via StartPurchase + /// + public void PayForPurchase(PayForPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/PayForPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as + /// well as what the client believes the price to be. This lets the server fail the purchase if the price has changed. + /// + public void PurchaseItem(PurchaseItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/PurchaseItem", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the + /// Economy->Catalogs tab in the PlayFab Game Manager. + /// + public void RedeemCoupon(RedeemCouponRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RedeemCoupon", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Uses the supplied OAuth code to refresh the internally cached player PlayStation :tm: Network auth token + /// + public void RefreshPSNAuthToken(RefreshPSNAuthTokenRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RefreshPSNAuthToken", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers the iOS device to receive push notifications + /// + public void RegisterForIOSPushNotification(RegisterForIOSPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RegisterForIOSPushNotification", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which + /// require an authenticated user. You must supply a username and an email address. + /// + public void RegisterPlayFabUser(RegisterPlayFabUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + request.TitleId = request.TitleId ?? callSettings.TitleId; + PlayFabHttp.MakeApiCall("/Client/RegisterPlayFabUser", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a contact email from the player's profile. + /// + public void RemoveContactEmail(RemoveContactEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RemoveContactEmail", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a specified user from the friend list of the local user + /// + public void RemoveFriend(RemoveFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RemoveFriend", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes the specified generic service identifier from the player's PlayFab account. + /// + public void RemoveGenericID(RemoveGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RemoveGenericID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the + /// group can remove members. If as a result of the call, zero users remain with access, the group and its associated data + /// will be deleted. Shared Groups are designed for sharing data between a very small number of players, please see our + /// guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void RemoveSharedGroupMembers(RemoveSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RemoveSharedGroupMembers", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Report player's ad activity + /// + public void ReportAdActivity(ReportAdActivityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ReportAdActivity", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Write a PlayStream event to describe the provided player device information. This API method is not designed to be + /// called directly by developers. Each PlayFab client SDK will eventually report this information automatically. + /// + public void ReportDeviceInfo(DeviceInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ReportDeviceInfo", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title + /// can take action concerning potentially toxic players. + /// + public void ReportPlayer(ReportPlayerClientRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ReportPlayer", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Restores all in-app purchases based on the given restore receipt + /// + public void RestoreIOSPurchases(RestoreIOSPurchasesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RestoreIOSPurchases", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Reward player's ad activity + /// + public void RewardAdActivity(RewardAdActivityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/RewardAdActivity", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to + /// change the password.If an account recovery email template ID is provided, an email using the custom email template will + /// be used. + /// + public void SendAccountRecoveryEmail(SendAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + PlayFabHttp.MakeApiCall("/Client/SendAccountRecoveryEmail", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the tag list for a specified user in the friend list of the local user + /// + public void SetFriendTags(SetFriendTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/SetFriendTags", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's + /// secret use the Admin or Server API method SetPlayerSecret. + /// + public void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/SetPlayerSecret", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Creates an order for a list of items from the title catalog + /// + public void StartPurchase(StartPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/StartPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make + /// a VC balance negative with this API. + /// + public void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/SubtractUserVirtualCurrency", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Android device identifier from the user's PlayFab account + /// + public void UnlinkAndroidDeviceID(UnlinkAndroidDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkAndroidDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Apple account from the user's PlayFab account. + /// + public void UnlinkApple(UnlinkAppleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkApple", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related custom identifier from the user's PlayFab account + /// + public void UnlinkCustomID(UnlinkCustomIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkCustomID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Facebook account from the user's PlayFab account + /// + public void UnlinkFacebookAccount(UnlinkFacebookAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkFacebookAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Facebook Instant Game Ids from the user's PlayFab account + /// + public void UnlinkFacebookInstantGamesId(UnlinkFacebookInstantGamesIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkFacebookInstantGamesId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Game Center account from the user's PlayFab account + /// + public void UnlinkGameCenterAccount(UnlinkGameCenterAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkGameCenterAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Google account from the user's PlayFab account + /// (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods). + /// + public void UnlinkGoogleAccount(UnlinkGoogleAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkGoogleAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Google Play Games account from the user's PlayFab account. + /// + public void UnlinkGooglePlayGamesServicesAccount(UnlinkGooglePlayGamesServicesAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkGooglePlayGamesServicesAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related iOS device identifier from the user's PlayFab account + /// + public void UnlinkIOSDeviceID(UnlinkIOSDeviceIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkIOSDeviceID", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Kongregate identifier from the user's PlayFab account + /// + public void UnlinkKongregate(UnlinkKongregateAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkKongregate", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Nintendo account from the user's PlayFab account. + /// + public void UnlinkNintendoServiceAccount(UnlinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkNintendoServiceAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related NintendoSwitchDeviceId from the user's PlayFab account + /// + public void UnlinkNintendoSwitchDeviceId(UnlinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkNintendoSwitchDeviceId", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks an OpenID Connect account from a user's PlayFab account, based on the connection ID of an existing relationship + /// between a title and an Open ID Connect provider. + /// + public void UnlinkOpenIdConnect(UnlinkOpenIdConnectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkOpenIdConnect", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related PlayStation :tm: Network account from the user's PlayFab account + /// + public void UnlinkPSNAccount(UnlinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkPSNAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Steam account from the user's PlayFab account + /// + public void UnlinkSteamAccount(UnlinkSteamAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkSteamAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Twitch account from the user's PlayFab account. + /// + public void UnlinkTwitch(UnlinkTwitchAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkTwitch", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Xbox Live account from the user's PlayFab account + /// + public void UnlinkXboxAccount(UnlinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlinkXboxAccount", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Opens the specified container, with the specified key (when required), and returns the contents of the + /// opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will + /// be decremented, consistent with the operation of ConsumeItem. + /// + public void UnlockContainerInstance(UnlockContainerInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlockContainerInstance", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it + /// using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are + /// consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + /// + public void UnlockContainerItem(UnlockContainerItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UnlockContainerItem", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update the avatar URL of the player + /// + public void UpdateAvatarUrl(UpdateAvatarUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdateAvatarUrl", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates and updates the title-specific custom data for the user's character which is readable and writable by the client + /// + public void UpdateCharacterData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdateCharacterData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the values of the specified title-specific statistics for the specific character. By default, clients are not + /// permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features. + /// + public void UpdateCharacterStatistics(UpdateCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdateCharacterStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to + /// update statistics. Developers may override this setting in the Game Manager > Settings > API Features. + /// + public void UpdatePlayerStatistics(UpdatePlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdatePlayerStatistics", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated + /// or added in this call will be readable by users not in the group. By default, data permissions are set to Private. + /// Regardless of the permission setting, only members of the group can update the data. Shared Groups are designed for + /// sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void UpdateSharedGroupData(UpdateSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdateSharedGroupData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates and updates the title-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdateUserData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates and updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdateUserPublisherData", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title specific display name for the user + /// + public void UpdateUserTitleDisplayName(UpdateUserTitleDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/UpdateUserTitleDisplayName", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates with Amazon that the receipt for an Amazon App Store in-app purchase is valid and that it matches + /// the purchased catalog item + /// + public void ValidateAmazonIAPReceipt(ValidateAmazonReceiptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ValidateAmazonIAPReceipt", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates a Google Play purchase and gives the corresponding item to the player. + /// + public void ValidateGooglePlayPurchase(ValidateGooglePlayPurchaseRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ValidateGooglePlayPurchase", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates with the Apple store that the receipt for an iOS in-app purchase is valid and that it matches the + /// purchased catalog item + /// + public void ValidateIOSReceipt(ValidateIOSReceiptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ValidateIOSReceipt", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Validates with Windows that the receipt for an Windows App Store in-app purchase is valid and that it + /// matches the purchased catalog item + /// + public void ValidateWindowsStoreReceipt(ValidateWindowsReceiptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/ValidateWindowsStoreReceipt", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Writes a character-based event into PlayStream. + /// + public void WriteCharacterEvent(WriteClientCharacterEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/WriteCharacterEvent", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Writes a player-based event into PlayStream. + /// + public void WritePlayerEvent(WriteClientPlayerEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/WritePlayerEvent", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Writes a title-based event into PlayStream. + /// + public void WriteTitleEvent(WriteTitleEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsClientLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Client/WriteTitleEvent", request, AuthType.LoginSession, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Client/PlayFabClientInstanceAPI.cs.meta b/Assets/PlayFabSDK/Client/PlayFabClientInstanceAPI.cs.meta new file mode 100644 index 00000000..b7573e77 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabClientInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ddd185cc4cdc40643a08607da563ddc4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client/PlayFabClientModels.cs b/Assets/PlayFabSDK/Client/PlayFabClientModels.cs new file mode 100644 index 00000000..a8e51aae --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabClientModels.cs @@ -0,0 +1,7535 @@ +#if !DISABLE_PLAYFABCLIENT_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.ClientModels +{ + [Serializable] + public class AcceptTradeRequest : PlayFabRequestCommon + { + /// + /// Items from the accepting player's inventory in exchange for the offered items in the trade. In the case of a gift, this + /// will be null. + /// + public List AcceptedInventoryInstanceIds; + /// + /// Player who opened the trade. + /// + public string OfferingPlayerId; + /// + /// Trade identifier. + /// + public string TradeId; + } + + [Serializable] + public class AcceptTradeResponse : PlayFabResultCommon + { + /// + /// Details about trade which was just accepted. + /// + public TradeInfo Trade; + } + + public enum AdActivity + { + Opened, + Closed, + Start, + End + } + + [Serializable] + public class AdCampaignAttributionModel : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + [Serializable] + public class AddFriendRequest : PlayFabRequestCommon + { + /// + /// Email address of the user to attempt to add to the local user's friend list. + /// + public string FriendEmail; + /// + /// PlayFab identifier of the user to attempt to add to the local user's friend list. + /// + public string FriendPlayFabId; + /// + /// Title-specific display name of the user to attempt to add to the local user's friend list. + /// + public string FriendTitleDisplayName; + /// + /// PlayFab username of the user to attempt to add to the local user's friend list. + /// + public string FriendUsername; + } + + [Serializable] + public class AddFriendResult : PlayFabResultCommon + { + /// + /// True if the friend request was processed successfully. + /// + public bool Created; + } + + [Serializable] + public class AddGenericIDRequest : PlayFabRequestCommon + { + /// + /// Generic service identifier to add to the player account. + /// + public GenericServiceId GenericId; + } + + [Serializable] + public class AddGenericIDResult : PlayFabResultCommon + { + } + + /// + /// This API adds a contact email to the player's profile. If the player's profile already contains a contact email, it will + /// update the contact email to the email address specified. + /// + [Serializable] + public class AddOrUpdateContactEmailRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The new contact email to associate with the player. + /// + public string EmailAddress; + } + + [Serializable] + public class AddOrUpdateContactEmailResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddSharedGroupMembersRequest : PlayFabRequestCommon + { + /// + /// An array of unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public List PlayFabIds; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class AddSharedGroupMembersResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddUsernamePasswordRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// User email address attached to their account + /// + public string Email; + /// + /// Password for the PlayFab account (6-100 characters) + /// + public string Password; + /// + /// PlayFab username for the account (3-20 characters) + /// + public string Username; + } + + /// + /// Each account must have a unique username and email address in the PlayFab service. Once created, the account may be + /// associated with additional accounts (Steam, Facebook, Game Center, etc.), allowing for added social network lists and + /// achievements systems. This can also be used to provide a recovery method if the user loses their original means of + /// access. + /// + [Serializable] + public class AddUsernamePasswordResult : PlayFabResultCommon + { + /// + /// PlayFab unique user name. + /// + public string Username; + } + + /// + /// This API must be enabled for use as an option in the game manager website. It is disabled by default. + /// + [Serializable] + public class AddUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be added to the user balance of the specified virtual currency. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Name of the virtual currency which is to be incremented. + /// + public string VirtualCurrency; + } + + /// + /// A single ad placement details including placement and reward information + /// + [Serializable] + public class AdPlacementDetails : PlayFabBaseModel + { + /// + /// Placement unique ID + /// + public string PlacementId; + /// + /// Placement name + /// + public string PlacementName; + /// + /// If placement has viewing limits indicates how many views are left + /// + public int? PlacementViewsRemaining; + /// + /// If placement has viewing limits indicates when they will next reset + /// + public double? PlacementViewsResetMinutes; + /// + /// Optional URL to a reward asset + /// + public string RewardAssetUrl; + /// + /// Reward description + /// + public string RewardDescription; + /// + /// Reward unique ID + /// + public string RewardId; + /// + /// Reward name + /// + public string RewardName; + } + + /// + /// Details for each item granted + /// + [Serializable] + public class AdRewardItemGranted : PlayFabBaseModel + { + /// + /// Catalog ID + /// + public string CatalogId; + /// + /// Catalog item display name + /// + public string DisplayName; + /// + /// Inventory instance ID + /// + public string InstanceId; + /// + /// Item ID + /// + public string ItemId; + } + + /// + /// Details on what was granted to the player + /// + [Serializable] + public class AdRewardResults : PlayFabBaseModel + { + /// + /// Array of the items granted to the player + /// + public List GrantedItems; + /// + /// Dictionary of virtual currencies that were granted to the player + /// + public Dictionary GrantedVirtualCurrencies; + /// + /// Dictionary of statistics that were modified for the player + /// + public Dictionary IncrementedStatistics; + } + + /// + /// More information can be found on configuring your game for the Google Cloud Messaging service in the Google developer + /// documentation, here: http://developer.android.com/google/gcm/client.html. The steps to configure and send Push + /// Notifications is described in the PlayFab tutorials, here: + /// https://docs.microsoft.com/gaming/playfab/features/engagement/push-notifications/quickstart. + /// + [Serializable] + public class AndroidDevicePushNotificationRegistrationRequest : PlayFabRequestCommon + { + /// + /// Message to display when confirming push notification. + /// + public string ConfirmationMessage; + /// + /// Registration ID provided by the Google Cloud Messaging service when the title registered to receive push notifications + /// (see the GCM documentation, here: http://developer.android.com/google/gcm/client.html). + /// + public string DeviceToken; + /// + /// If true, send a test push message immediately after sucessful registration. Defaults to false. + /// + public bool? SendPushNotificationConfirmation; + } + + [Serializable] + public class AndroidDevicePushNotificationRegistrationResult : PlayFabResultCommon + { + } + + /// + /// If you have an ad attribution partner enabled, this will post an install to their service to track the device. It uses + /// the given device id to match based on clicks on ads. + /// + [Serializable] + public class AttributeInstallRequest : PlayFabRequestCommon + { + /// + /// The adid for this device. + /// + public string Adid; + /// + /// The IdentifierForAdvertisers for iOS Devices. + /// + public string Idfa; + } + + [Serializable] + public class AttributeInstallResult : PlayFabResultCommon + { + } + + [Serializable] + public class CancelTradeRequest : PlayFabRequestCommon + { + /// + /// Trade identifier. + /// + public string TradeId; + } + + [Serializable] + public class CancelTradeResponse : PlayFabResultCommon + { + /// + /// Details about trade which was just canceled. + /// + public TradeInfo Trade; + } + + [Serializable] + public class CartItem : PlayFabBaseModel + { + /// + /// Description of the catalog item. + /// + public string Description; + /// + /// Display name for the catalog item. + /// + public string DisplayName; + /// + /// Class name to which catalog item belongs. + /// + public string ItemClass; + /// + /// Unique identifier for the catalog item. + /// + public string ItemId; + /// + /// Unique instance identifier for this catalog item. + /// + public string ItemInstanceId; + /// + /// Cost of the catalog item for each applicable real world currency. + /// + public Dictionary RealCurrencyPrices; + /// + /// Amount of each applicable virtual currency which will be received as a result of purchasing this catalog item. + /// + public Dictionary VCAmount; + /// + /// Cost of the catalog item for each applicable virtual currency. + /// + public Dictionary VirtualCurrencyPrices; + } + + /// + /// A purchasable item from the item catalog + /// + [Serializable] + public class CatalogItem : PlayFabBaseModel + { + /// + /// defines the bundle properties for the item - bundles are items which contain other items, including random drop tables + /// and virtual currencies + /// + public CatalogItemBundleInfo Bundle; + /// + /// if true, then an item instance of this type can be used to grant a character to a user. + /// + public bool CanBecomeCharacter; + /// + /// catalog version for this item + /// + public string CatalogVersion; + /// + /// defines the consumable properties (number of uses, timeout) for the item + /// + public CatalogItemConsumableInfo Consumable; + /// + /// defines the container properties for the item - what items it contains, including random drop tables and virtual + /// currencies, and what item (if any) is required to open it via the UnlockContainerItem API + /// + public CatalogItemContainerInfo Container; + /// + /// game specific custom data + /// + public string CustomData; + /// + /// text description of item, to show in-game + /// + public string Description; + /// + /// text name for the item, to show in-game + /// + public string DisplayName; + /// + /// If the item has IsLImitedEdition set to true, and this is the first time this ItemId has been defined as a limited + /// edition item, this value determines the total number of instances to allocate for the title. Once this limit has been + /// reached, no more instances of this ItemId can be created, and attempts to purchase or grant it will return a Result of + /// false for that ItemId. If the item has already been defined to have a limited edition count, or if this value is less + /// than zero, it will be ignored. + /// + public int InitialLimitedEditionCount; + /// + /// BETA: If true, then only a fixed number can ever be granted. + /// + public bool IsLimitedEdition; + /// + /// if true, then only one item instance of this type will exist and its remaininguses will be incremented instead. + /// RemainingUses will cap out at Int32.Max (2,147,483,647). All subsequent increases will be discarded + /// + public bool IsStackable; + /// + /// if true, then an item instance of this type can be traded between players using the trading APIs + /// + public bool IsTradable; + /// + /// class to which the item belongs + /// + public string ItemClass; + /// + /// unique identifier for this item + /// + public string ItemId; + /// + /// URL to the item image. For Facebook purchase to display the image on the item purchase page, this must be set to an HTTP + /// URL. + /// + public string ItemImageUrl; + /// + /// override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// list of item tags + /// + public List Tags; + /// + /// price of this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + [Serializable] + public class CatalogItemBundleInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory when the bundle is added + /// + public List BundledItems; + /// + /// unique TableId values for all RandomResultTable objects which are part of the bundle (random tables will be resolved and + /// add the relevant items to the player inventory when the bundle is added) + /// + public List BundledResultTables; + /// + /// virtual currency types and balances which will be added to the player inventory when the bundle is added + /// + public Dictionary BundledVirtualCurrencies; + } + + [Serializable] + public class CatalogItemConsumableInfo : PlayFabBaseModel + { + /// + /// number of times this object can be used, after which it will be removed from the player inventory + /// + public uint? UsageCount; + /// + /// duration in seconds for how long the item will remain in the player inventory - once elapsed, the item will be removed + /// (recommended minimum value is 5 seconds, as lower values can cause the item to expire before operations depending on + /// this item's details have completed) + /// + public uint? UsagePeriod; + /// + /// all inventory item instances in the player inventory sharing a non-null UsagePeriodGroup have their UsagePeriod values + /// added together, and share the result - when that period has elapsed, all the items in the group will be removed + /// + public string UsagePeriodGroup; + } + + /// + /// Containers are inventory items that can hold other items defined in the catalog, as well as virtual currency, which is + /// added to the player inventory when the container is unlocked, using the UnlockContainerItem API. The items can be + /// anything defined in the catalog, as well as RandomResultTable objects which will be resolved when the container is + /// unlocked. Containers and their keys should be defined as Consumable (having a limited number of uses) in their catalog + /// defintiions, unless the intent is for the player to be able to re-use them infinitely. + /// + [Serializable] + public class CatalogItemContainerInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory, once the container has been unlocked + /// + public List ItemContents; + /// + /// ItemId for the catalog item used to unlock the container, if any (if not specified, a call to UnlockContainerItem will + /// open the container, adding the contents to the player inventory and currency balances) + /// + public string KeyItemId; + /// + /// unique TableId values for all RandomResultTable objects which are part of the container (once unlocked, random tables + /// will be resolved and add the relevant items to the player inventory) + /// + public List ResultTableContents; + /// + /// virtual currency types and balances which will be added to the player inventory when the container is unlocked + /// + public Dictionary VirtualCurrencyContents; + } + + [Serializable] + public class CharacterInventory : PlayFabBaseModel + { + /// + /// The id of this character. + /// + public string CharacterId; + /// + /// The inventory of this character. + /// + public List Inventory; + } + + [Serializable] + public class CharacterLeaderboardEntry : PlayFabBaseModel + { + /// + /// PlayFab unique identifier of the character that belongs to the user for this leaderboard entry. + /// + public string CharacterId; + /// + /// Title-specific display name of the character for this leaderboard entry. + /// + public string CharacterName; + /// + /// Name of the character class for this entry. + /// + public string CharacterType; + /// + /// Title-specific display name of the user for this leaderboard entry. + /// + public string DisplayName; + /// + /// PlayFab unique identifier of the user for this leaderboard entry. + /// + public string PlayFabId; + /// + /// User's overall position in the leaderboard. + /// + public int Position; + /// + /// Specific value of the user's statistic. + /// + public int StatValue; + } + + [Serializable] + public class CharacterResult : PlayFabBaseModel + { + /// + /// The id for this character on this player. + /// + public string CharacterId; + /// + /// The name of this character. + /// + public string CharacterName; + /// + /// The type-string that was given to this character on creation. + /// + public string CharacterType; + } + + public enum CloudScriptRevisionOption + { + Live, + Latest, + Specific + } + + /// + /// The final step in the purchasing process, this API finalizes the purchase with the payment provider, where applicable, + /// adding virtual goods to the player inventory (including random drop table resolution and recursive addition of bundled + /// items) and adjusting virtual currency balances for funds used or added. Note that this is a pull operation, and should + /// be polled regularly when a purchase is in progress. Please note that the processing time for inventory grants and + /// purchases increases fractionally the more items are in the inventory, and the more items are in the grant/purchase + /// operation. + /// + [Serializable] + public class ConfirmPurchaseRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Purchase order identifier returned from StartPurchase. + /// + public string OrderId; + } + + /// + /// When the FailedByPaymentProvider error is returned, it's important to check the ProviderErrorCode, ProviderErrorMessage, + /// and ProviderErrorDetails to understand the specific reason the payment was rejected, as in some rare cases, this may + /// mean that the provider hasn't completed some operation required to finalize the purchase. + /// + [Serializable] + public class ConfirmPurchaseResult : PlayFabResultCommon + { + /// + /// Array of items purchased. + /// + public List Items; + /// + /// Purchase order identifier. + /// + public string OrderId; + /// + /// Date and time of the purchase. + /// + public DateTime PurchaseDate; + } + + [Serializable] + public class ConsumeItemRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Number of uses to consume from the item. + /// + public int ConsumeCount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique instance identifier of the item to be consumed. + /// + public string ItemInstanceId; + } + + [Serializable] + public class ConsumeItemResult : PlayFabResultCommon + { + /// + /// Unique instance identifier of the item with uses consumed. + /// + public string ItemInstanceId; + /// + /// Number of uses remaining on the item. + /// + public int RemainingUses; + } + + [Serializable] + public class ConsumeMicrosoftStoreEntitlementsRequest : PlayFabRequestCommon + { + /// + /// Catalog version to use + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Marketplace specific payload containing details to fetch in app purchase transactions + /// + public MicrosoftStorePayload MarketplaceSpecificData; + } + + [Serializable] + public class ConsumeMicrosoftStoreEntitlementsResponse : PlayFabResultCommon + { + /// + /// Details for the items purchased. + /// + public List Items; + } + + [Serializable] + public class ConsumePS5EntitlementsRequest : PlayFabRequestCommon + { + /// + /// Catalog version to use + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Marketplace specific payload containing details to fetch in app purchase transactions + /// + public PlayStation5Payload MarketplaceSpecificData; + } + + [Serializable] + public class ConsumePS5EntitlementsResult : PlayFabResultCommon + { + /// + /// Details for the items purchased. + /// + public List Items; + } + + [Serializable] + public class ConsumePSNEntitlementsRequest : PlayFabRequestCommon + { + /// + /// Which catalog to match granted entitlements against. If null, defaults to title default catalog + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Id of the PlayStation :tm: Network service label to consume entitlements from + /// + public int ServiceLabel; + } + + [Serializable] + public class ConsumePSNEntitlementsResult : PlayFabResultCommon + { + /// + /// Array of items granted to the player as a result of consuming entitlements. + /// + public List ItemsGranted; + } + + [Serializable] + public class ConsumeXboxEntitlementsRequest : PlayFabRequestCommon + { + /// + /// Catalog version to use + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). + /// + public string XboxToken; + } + + [Serializable] + public class ConsumeXboxEntitlementsResult : PlayFabResultCommon + { + /// + /// Details for the items purchased. + /// + public List Items; + } + + [Serializable] + public class ContactEmailInfoModel : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + public enum ContinentCode + { + AF, + AN, + AS, + EU, + NA, + OC, + SA, + Unknown + } + + public enum CountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW, + Unknown + } + + /// + /// If SharedGroupId is specified, the service will attempt to create a group with that identifier, and will return an error + /// if it is already in use. If no SharedGroupId is specified, a random identifier will be assigned. + /// + [Serializable] + public class CreateSharedGroupRequest : PlayFabRequestCommon + { + /// + /// Unique identifier for the shared group (a random identifier will be assigned, if one is not specified). + /// + public string SharedGroupId; + } + + [Serializable] + public class CreateSharedGroupResult : PlayFabResultCommon + { + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + public enum Currency + { + AED, + AFN, + ALL, + AMD, + ANG, + AOA, + ARS, + AUD, + AWG, + AZN, + BAM, + BBD, + BDT, + BGN, + BHD, + BIF, + BMD, + BND, + BOB, + BRL, + BSD, + BTN, + BWP, + BYR, + BZD, + CAD, + CDF, + CHF, + CLP, + CNY, + COP, + CRC, + CUC, + CUP, + CVE, + CZK, + DJF, + DKK, + DOP, + DZD, + EGP, + ERN, + ETB, + EUR, + FJD, + FKP, + GBP, + GEL, + GGP, + GHS, + GIP, + GMD, + GNF, + GTQ, + GYD, + HKD, + HNL, + HRK, + HTG, + HUF, + IDR, + ILS, + IMP, + INR, + IQD, + IRR, + ISK, + JEP, + JMD, + JOD, + JPY, + KES, + KGS, + KHR, + KMF, + KPW, + KRW, + KWD, + KYD, + KZT, + LAK, + LBP, + LKR, + LRD, + LSL, + LYD, + MAD, + MDL, + MGA, + MKD, + MMK, + MNT, + MOP, + MRO, + MUR, + MVR, + MWK, + MXN, + MYR, + MZN, + NAD, + NGN, + NIO, + NOK, + NPR, + NZD, + OMR, + PAB, + PEN, + PGK, + PHP, + PKR, + PLN, + PYG, + QAR, + RON, + RSD, + RUB, + RWF, + SAR, + SBD, + SCR, + SDG, + SEK, + SGD, + SHP, + SLL, + SOS, + SPL, + SRD, + STD, + SVC, + SYP, + SZL, + THB, + TJS, + TMT, + TND, + TOP, + TRY, + TTD, + TVD, + TWD, + TZS, + UAH, + UGX, + USD, + UYU, + UZS, + VEF, + VND, + VUV, + WST, + XAF, + XCD, + XDR, + XOF, + XPF, + YER, + ZAR, + ZMW, + ZWD + } + + /// + /// Any arbitrary information collected by the device + /// + [Serializable] + public class DeviceInfoRequest : PlayFabRequestCommon + { + /// + /// Information posted to the PlayStream Event. Currently arbitrary, and specific to the environment sending it. + /// + public Dictionary Info; + } + + public enum EmailVerificationStatus + { + Unverified, + Pending, + Confirmed + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + [Serializable] + public class EmptyResult : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EntityTokenResponse : PlayFabBaseModel + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The token used to set X-EntityToken for all entity based API calls. + /// + public string EntityToken; + /// + /// The time the token will expire, if it is an expiring token, in UTC. + /// + public DateTime? TokenExpiration; + } + + [Serializable] + public class ExecuteCloudScriptRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the CloudScript function to execute + /// + public string FunctionName; + /// + /// Object that is passed in to the function as the first argument + /// + public object FunctionParameter; + /// + /// Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other + /// contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager. + /// + public bool? GeneratePlayStreamEvent; + /// + /// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' + /// executes the current live, published revision, and 'Specific' executes the specified revision. The default value is + /// 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'. + /// + public CloudScriptRevisionOption? RevisionSelection; + /// + /// The specivic revision to execute, when RevisionSelection is set to 'Specific' + /// + public int? SpecificRevision; + } + + [Serializable] + public class ExecuteCloudScriptResult : PlayFabResultCommon + { + /// + /// Number of PlayFab API requests issued by the CloudScript function + /// + public int APIRequestsIssued; + /// + /// Information about the error, if any, that occurred during execution + /// + public ScriptExecutionError Error; + public double ExecutionTimeSeconds; + /// + /// The name of the function that executed + /// + public string FunctionName; + /// + /// The object returned from the CloudScript function, if any + /// + public object FunctionResult; + /// + /// Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if + /// the total event size is larger than 350KB. + /// + public bool? FunctionResultTooLarge; + /// + /// Number of external HTTP requests issued by the CloudScript function + /// + public int HttpRequestsIssued; + /// + /// Entries logged during the function execution. These include both entries logged in the function code using log.info() + /// and log.error() and error entries for API and HTTP request failures. + /// + public List Logs; + /// + /// Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total + /// event size is larger than 350KB after the FunctionResult was removed. + /// + public bool? LogsTooLarge; + public uint MemoryConsumedBytes; + /// + /// Processor time consumed while executing the function. This does not include time spent waiting on API calls or HTTP + /// requests. + /// + public double ProcessorTimeSeconds; + /// + /// The revision of the CloudScript that executed + /// + public int Revision; + } + + public enum ExternalFriendSources + { + None, + Steam, + Facebook, + Xbox, + Psn, + All + } + + [Serializable] + public class FacebookInstantGamesPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Facebook Instant Games identifier for a user. + /// + public string FacebookInstantGamesId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Facebook Instant Games identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class FacebookPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Facebook identifier for a user. + /// + public string FacebookId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Facebook identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class FriendInfo : PlayFabBaseModel + { + /// + /// Available Facebook information (if the user and connected Facebook friend both have PlayFab Accounts in the same title). + /// + public UserFacebookInfo FacebookInfo; + /// + /// PlayFab unique identifier for this friend. + /// + public string FriendPlayFabId; + /// + /// Available Game Center information (if the user and connected Game Center friend both have PlayFab Accounts in the same + /// title). + /// + public UserGameCenterInfo GameCenterInfo; + /// + /// The profile of the user, if requested. + /// + public PlayerProfileModel Profile; + /// + /// Available PlayStation :tm: Network information, if the user connected PlayStation :tm Network friend both have PlayFab + /// Accounts in the same title. + /// + public UserPsnInfo PSNInfo; + /// + /// Available Steam information (if the user and connected Steam friend both have PlayFab Accounts in the same title). + /// + public UserSteamInfo SteamInfo; + /// + /// Tags which have been associated with this friend. + /// + public List Tags; + /// + /// Title-specific display name for this friend. + /// + public string TitleDisplayName; + /// + /// PlayFab unique username for this friend. + /// + public string Username; + /// + /// Available Xbox information, (if the user and connected Xbox Live friend both have PlayFab Accounts in the same title). + /// + public UserXboxInfo XboxInfo; + } + + [Serializable] + public class GameCenterPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Game Center identifier for a user. + /// + public string GameCenterId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Game Center identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class GenericPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique generic service identifier for a user. + /// + public GenericServiceId GenericId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the given generic identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class GenericServiceId : PlayFabBaseModel + { + /// + /// Name of the service for which the player has a unique identifier. + /// + public string ServiceName; + /// + /// Unique identifier of the player in that service. + /// + public string UserId; + } + + [Serializable] + public class GetAccountInfoRequest : PlayFabRequestCommon + { + /// + /// User email address for the account to find (if no Username is specified). + /// + public string Email; + /// + /// Unique PlayFab identifier of the user whose info is being requested. Optional, defaults to the authenticated user if no + /// other lookup identifier set. + /// + public string PlayFabId; + /// + /// Title-specific username for the account to find (if no Email is set). Note that if the non-unique Title Display Names + /// option is enabled for the title, attempts to look up users by Title Display Name will always return AccountNotFound. + /// + public string TitleDisplayName; + /// + /// PlayFab Username for the account to find (if no PlayFabId is specified). + /// + public string Username; + } + + /// + /// This API retrieves details regarding the player in the PlayFab service. Note that when this call is used to retrieve + /// data about another player (not the one signed into the local client), some data, such as Personally Identifying + /// Information (PII), will be omitted for privacy reasons or to comply with the requirements of the platform belongs to. + /// The user account returned will be based on the identifier provided in priority order: PlayFabId, Username, Email, then + /// TitleDisplayName. If no identifier is specified, the currently signed in user's information will be returned. + /// + [Serializable] + public class GetAccountInfoResult : PlayFabResultCommon + { + /// + /// Account information for the local user. + /// + public UserAccountInfo AccountInfo; + } + + /// + /// Using an AppId to return a list of valid ad placements for a player. + /// + [Serializable] + public class GetAdPlacementsRequest : PlayFabRequestCommon + { + /// + /// The current AppId to use + /// + public string AppId; + /// + /// Using the name or unique identifier, filter the result for get a specific placement. + /// + public NameIdentifier Identifier; + } + + /// + /// Array of AdPlacementDetails + /// + [Serializable] + public class GetAdPlacementsResult : PlayFabResultCommon + { + /// + /// Array of results + /// + public List AdPlacements; + } + + [Serializable] + public class GetCatalogItemsRequest : PlayFabRequestCommon + { + /// + /// Which catalog is being requested. If null, uses the default catalog. + /// + public string CatalogVersion; + } + + /// + /// If CatalogVersion is not specified, only inventory items associated with the most recent version of the catalog will be + /// returned. + /// + [Serializable] + public class GetCatalogItemsResult : PlayFabResultCommon + { + /// + /// Array of items which can be purchased. + /// + public List Catalog; + } + + /// + /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain + /// the data specific to the indicated Keys. Otherwise, the full set of custom character data will be returned. + /// + [Serializable] + public class GetCharacterDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The version that currently exists according to the caller. The call will return the data for all of the keys if the + /// version in the system is greater than this. + /// + public uint? IfChangedFromDataVersion; + /// + /// Specific keys to search for in the custom user data. + /// + public List Keys; + /// + /// Unique PlayFab identifier of the user to load data for. Optional, defaults to yourself if not set. + /// + public string PlayFabId; + } + + [Serializable] + public class GetCharacterDataResult : PlayFabResultCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// User specific data for this title. + /// + public Dictionary Data; + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + /// + /// All items currently in the character inventory will be returned, irrespective of how they were acquired (via purchasing, + /// grants, coupons, etc.). Items that are expired, fully consumed, or are no longer valid are not considered to be in the + /// user's current inventory, and so will not be not included. Also returns their virtual currency balances. + /// + [Serializable] + public class GetCharacterInventoryRequest : PlayFabRequestCommon + { + /// + /// Used to limit results to only those from a specific catalog version. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetCharacterInventoryResult : PlayFabResultCommon + { + /// + /// Unique identifier of the character for this inventory. + /// + public string CharacterId; + /// + /// Array of inventory items belonging to the character. + /// + public List Inventory; + /// + /// Array of virtual currency balance(s) belonging to the character. + /// + public Dictionary VirtualCurrency; + /// + /// Array of remaining times and timestamps for virtual currencies. + /// + public Dictionary VirtualCurrencyRechargeTimes; + } + + [Serializable] + public class GetCharacterLeaderboardRequest : PlayFabRequestCommon + { + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount; + /// + /// First entry in the leaderboard to be retrieved. + /// + public int StartPosition; + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + } + + /// + /// Note that the Position of the character in the results is for the overall leaderboard. + /// + [Serializable] + public class GetCharacterLeaderboardResult : PlayFabResultCommon + { + /// + /// Ordered list of leaderboard entries. + /// + public List Leaderboard; + } + + [Serializable] + public class GetCharacterStatisticsRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + } + + /// + /// In addition to being available for use by the title, the statistics are used for all leaderboard operations in PlayFab. + /// + [Serializable] + public class GetCharacterStatisticsResult : PlayFabResultCommon + { + /// + /// The requested character statistics. + /// + public Dictionary CharacterStatistics; + } + + [Serializable] + public class GetContentDownloadUrlRequest : PlayFabRequestCommon + { + /// + /// HTTP method to fetch item - GET or HEAD. Use HEAD when only fetching metadata. Default is GET. + /// + public string HttpMethod; + /// + /// Key of the content item to fetch, usually formatted as a path, e.g. images/a.png + /// + public string Key; + /// + /// True to download through CDN. CDN provides higher download bandwidth and lower latency. However, if you want the latest, + /// non-cached version of the content during development, set this to false. Default is true. + /// + public bool? ThruCDN; + } + + [Serializable] + public class GetContentDownloadUrlResult : PlayFabResultCommon + { + /// + /// URL for downloading content via HTTP GET or HEAD method. The URL will expire in approximately one hour. + /// + public string URL; + } + + [Serializable] + public class GetFriendLeaderboardAroundPlayerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates which other platforms' friends should be included in the response. In HTTP, it is represented as a + /// comma-separated list of platforms. + /// + public ExternalFriendSources? ExternalPlatformFriends; + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount; + /// + /// PlayFab unique identifier of the user to center the leaderboard around. If null will center on the logged in user. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Statistic used to rank players for this leaderboard. + /// + public string StatisticName; + /// + /// The version of the leaderboard to get. + /// + public int? Version; + /// + /// Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab. + /// + public string XboxToken; + } + + /// + /// Note: When calling 'GetLeaderboardAround...' APIs, the position of the user defaults to 0 when the user does not have + /// the corresponding statistic.If Facebook friends are included, make sure the access token from previous LoginWithFacebook + /// call is still valid and not expired. If Xbox Live friends are included, make sure the access token from the previous + /// LoginWithXbox call is still valid and not expired. + /// + [Serializable] + public class GetFriendLeaderboardAroundPlayerResult : PlayFabResultCommon + { + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard; + /// + /// The time the next scheduled reset will occur. Null if the leaderboard does not reset on a schedule. + /// + public DateTime? NextReset; + /// + /// The version of the leaderboard returned. + /// + public int Version; + } + + [Serializable] + public class GetFriendLeaderboardRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates which other platforms' friends should be included in the response. In HTTP, it is represented as a + /// comma-separated list of platforms. + /// + public ExternalFriendSources? ExternalPlatformFriends; + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Position in the leaderboard to start this listing (defaults to the first entry). + /// + public int StartPosition; + /// + /// Statistic used to rank friends for this leaderboard. + /// + public string StatisticName; + /// + /// The version of the leaderboard to get. + /// + public int? Version; + /// + /// Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab. + /// + public string XboxToken; + } + + [Serializable] + public class GetFriendsListRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates which other platforms' friends should be included in the response. In HTTP, it is represented as a + /// comma-separated list of platforms. + /// + public ExternalFriendSources? ExternalPlatformFriends; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab. + /// + public string XboxToken; + } + + /// + /// If any additional services are queried for the user's friends, those friends who also have a PlayFab account registered + /// for the title will be returned in the results. For Facebook, user has to have logged into the title's Facebook app + /// recently, and only friends who also plays this game will be included. Note: If the user authenticated with + /// AuthenticationToken when calling LoginWithFacebook, instead of AcessToken, an empty list will be returned. For Xbox + /// Live, user has to have logged into the Xbox Live recently, and only friends who also play this game will be included. + /// + [Serializable] + public class GetFriendsListResult : PlayFabResultCommon + { + /// + /// Array of friends found. + /// + public List Friends; + } + + [Serializable] + public class GetLeaderboardAroundCharacterRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character on which to center the leaderboard. + /// + public string CharacterId; + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount; + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + } + + /// + /// Note: When calling 'GetLeaderboardAround...' APIs, the position of the character defaults to 0 when the character does + /// not have the corresponding statistic. + /// + [Serializable] + public class GetLeaderboardAroundCharacterResult : PlayFabResultCommon + { + /// + /// Ordered list of leaderboard entries. + /// + public List Leaderboard; + } + + [Serializable] + public class GetLeaderboardAroundPlayerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount; + /// + /// PlayFab unique identifier of the user to center the leaderboard around. If null will center on the logged in user. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Statistic used to rank players for this leaderboard. + /// + public string StatisticName; + /// + /// The version of the leaderboard to get. + /// + public int? Version; + } + + /// + /// Note: When calling 'GetLeaderboardAround...' APIs, the position of the user defaults to 0 when the user does not have + /// the corresponding statistic. + /// + [Serializable] + public class GetLeaderboardAroundPlayerResult : PlayFabResultCommon + { + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard; + /// + /// The time the next scheduled reset will occur. Null if the leaderboard does not reset on a schedule. + /// + public DateTime? NextReset; + /// + /// The version of the leaderboard returned. + /// + public int Version; + } + + [Serializable] + public class GetLeaderboardForUsersCharactersRequest : PlayFabRequestCommon + { + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + } + + /// + /// NOTE: The position of the character in the results is relative to the other characters for that specific user. This mean + /// the values will always be between 0 and one less than the number of characters returned regardless of the size of the + /// actual leaderboard. + /// + [Serializable] + public class GetLeaderboardForUsersCharactersResult : PlayFabResultCommon + { + /// + /// Ordered list of leaderboard entries. + /// + public List Leaderboard; + } + + [Serializable] + public class GetLeaderboardRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Maximum number of entries to retrieve. Default 10, maximum 100. + /// + public int? MaxResultsCount; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Position in the leaderboard to start this listing (defaults to the first entry). + /// + public int StartPosition; + /// + /// Statistic used to rank players for this leaderboard. + /// + public string StatisticName; + /// + /// The version of the leaderboard to get. + /// + public int? Version; + } + + /// + /// Note: the user's Position is relative to the overall leaderboard. + /// + [Serializable] + public class GetLeaderboardResult : PlayFabResultCommon + { + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard; + /// + /// The time the next scheduled reset will occur. Null if the leaderboard does not reset on a schedule. + /// + public DateTime? NextReset; + /// + /// The version of the leaderboard returned. + /// + public int Version; + } + + [Serializable] + public class GetPaymentTokenRequest : PlayFabRequestCommon + { + /// + /// The name of service to provide the payment token. Allowed Values are: xsolla + /// + public string TokenProvider; + } + + [Serializable] + public class GetPaymentTokenResult : PlayFabResultCommon + { + /// + /// PlayFab's purchase order identifier. + /// + public string OrderId; + /// + /// The token from provider. + /// + public string ProviderToken; + } + + [Serializable] + public class GetPhotonAuthenticationTokenRequest : PlayFabRequestCommon + { + /// + /// The Photon applicationId for the game you wish to log into. + /// + public string PhotonApplicationId; + } + + [Serializable] + public class GetPhotonAuthenticationTokenResult : PlayFabResultCommon + { + /// + /// The Photon authentication token for this game-session. + /// + public string PhotonCustomAuthenticationToken; + } + + [Serializable] + public class GetPlayerCombinedInfoRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// PlayFabId of the user whose data will be returned. If not filled included, we return the data for the calling player. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerCombinedInfoRequestParams : PlayFabBaseModel + { + /// + /// Whether to get character inventories. Defaults to false. + /// + public bool GetCharacterInventories; + /// + /// Whether to get the list of characters. Defaults to false. + /// + public bool GetCharacterList; + /// + /// Whether to get player profile. Defaults to false. Has no effect for a new player. + /// + public bool GetPlayerProfile; + /// + /// Whether to get player statistics. Defaults to false. + /// + public bool GetPlayerStatistics; + /// + /// Whether to get title data. Defaults to false. + /// + public bool GetTitleData; + /// + /// Whether to get the player's account Info. Defaults to false + /// + public bool GetUserAccountInfo; + /// + /// Whether to get the player's custom data. Defaults to false + /// + public bool GetUserData; + /// + /// Whether to get the player's inventory. Defaults to false + /// + public bool GetUserInventory; + /// + /// Whether to get the player's read only data. Defaults to false + /// + public bool GetUserReadOnlyData; + /// + /// Whether to get the player's virtual currency balances. Defaults to false + /// + public bool GetUserVirtualCurrency; + /// + /// Specific statistics to retrieve. Leave null to get all keys. Has no effect if GetPlayerStatistics is false + /// + public List PlayerStatisticNames; + /// + /// Specifies the properties to return from the player profile. Defaults to returning the player's display name. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetTitleData is false + /// + public List TitleDataKeys; + /// + /// Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetUserData is false + /// + public List UserDataKeys; + /// + /// Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetUserReadOnlyData is + /// false + /// + public List UserReadOnlyDataKeys; + } + + /// + /// Returns whatever info is requested in the response for the user. If no user is explicitly requested this defaults to the + /// authenticated user. If the user is the same as the requester, PII (like email address, facebook id) is returned if + /// available. Otherwise, only public information is returned. All parameters default to false. + /// + [Serializable] + public class GetPlayerCombinedInfoResult : PlayFabResultCommon + { + /// + /// Results for requested info. + /// + public GetPlayerCombinedInfoResultPayload InfoResultPayload; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerCombinedInfoResultPayload : PlayFabBaseModel + { + /// + /// Account information for the user. This is always retrieved. + /// + public UserAccountInfo AccountInfo; + /// + /// Inventories for each character for the user. + /// + public List CharacterInventories; + /// + /// List of characters for the user. + /// + public List CharacterList; + /// + /// The profile of the players. This profile is not guaranteed to be up-to-date. For a new player, this profile will not + /// exist. + /// + public PlayerProfileModel PlayerProfile; + /// + /// List of statistics for this player. + /// + public List PlayerStatistics; + /// + /// Title data for this title. + /// + public Dictionary TitleData; + /// + /// User specific custom data. + /// + public Dictionary UserData; + /// + /// The version of the UserData that was returned. + /// + public uint UserDataVersion; + /// + /// Array of inventory items in the user's current inventory. + /// + public List UserInventory; + /// + /// User specific read-only data. + /// + public Dictionary UserReadOnlyData; + /// + /// The version of the Read-Only UserData that was returned. + /// + public uint UserReadOnlyDataVersion; + /// + /// Dictionary of virtual currency balance(s) belonging to the user. + /// + public Dictionary UserVirtualCurrency; + /// + /// Dictionary of remaining times and timestamps for virtual currencies. + /// + public Dictionary UserVirtualCurrencyRechargeTimes; + } + + /// + /// This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class GetPlayerProfileRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + } + + [Serializable] + public class GetPlayerProfileResult : PlayFabResultCommon + { + /// + /// The profile of the player. This profile is not guaranteed to be up-to-date. For a new player, this profile will not + /// exist. + /// + public PlayerProfileModel PlayerProfile; + } + + [Serializable] + public class GetPlayerSegmentsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetPlayerSegmentsResult : PlayFabResultCommon + { + /// + /// Array of segments the requested player currently belongs to. + /// + public List Segments; + } + + [Serializable] + public class GetPlayerStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// statistics to return (current version will be returned for each) + /// + public List StatisticNames; + /// + /// statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be + /// returned) + /// + public List StatisticNameVersions; + } + + /// + /// In addition to being available for use by the title, the statistics are used for all leaderboard operations in PlayFab. + /// + [Serializable] + public class GetPlayerStatisticsResult : PlayFabResultCommon + { + /// + /// User statistics for the requested user. + /// + public List Statistics; + } + + [Serializable] + public class GetPlayerStatisticVersionsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + } + + [Serializable] + public class GetPlayerStatisticVersionsResult : PlayFabResultCommon + { + /// + /// version change history of the statistic + /// + public List StatisticVersions; + } + + /// + /// This API will return a list of canonical tags which includes both namespace and tag's name. If namespace is not + /// provided, the result is a list of all canonical tags. TagName can be used for segmentation and Namespace is limited to + /// 128 characters. + /// + [Serializable] + public class GetPlayerTagsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Optional namespace to filter results by + /// + public string Namespace; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerTagsResult : PlayFabResultCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Canonical tags (including namespace and tag's name) for the requested user + /// + public List Tags; + } + + [Serializable] + public class GetPlayerTradesRequest : PlayFabRequestCommon + { + /// + /// Returns only trades with the given status. If null, returns all trades. + /// + public TradeStatus? StatusFilter; + } + + [Serializable] + public class GetPlayerTradesResponse : PlayFabResultCommon + { + /// + /// History of trades which this player has accepted. + /// + public List AcceptedTrades; + /// + /// The trades for this player which are currently available to be accepted. + /// + public List OpenedTrades; + } + + [Serializable] + public class GetPlayFabIDsFromFacebookIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. The array cannot exceed 2,000 + /// in length. + /// + public List FacebookIDs; + } + + /// + /// For Facebook identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromFacebookIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Facebook identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromFacebookInstantGamesIdsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Facebook Instant Games identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 25 in length. + /// + public List FacebookInstantGamesIds; + } + + /// + /// For Facebook Instant Game identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromFacebookInstantGamesIdsResult : PlayFabResultCommon + { + /// + /// Mapping of Facebook Instant Games identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromGameCenterIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Game Center identifiers (the Player Identifier) for which the title needs to get PlayFab identifiers. + /// The array cannot exceed 2,000 in length. + /// + public List GameCenterIDs; + } + + /// + /// For Game Center identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromGameCenterIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Game Center identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromGenericIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique generic service identifiers for which the title needs to get PlayFab identifiers. Currently limited to a + /// maximum of 10 in a single request. + /// + public List GenericIDs; + } + + /// + /// For generic service identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromGenericIDsResult : PlayFabResultCommon + { + /// + /// Mapping of generic service identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromGoogleIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Google identifiers (Google+ user IDs) for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List GoogleIDs; + } + + /// + /// For Google identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromGoogleIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Google identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Google Play Games identifiers (Google+ user IDs) for which the title needs to get PlayFab identifiers. + /// The array cannot exceed 2,000 in length. + /// + public List GooglePlayGamesPlayerIDs; + } + + /// + /// For Google Play Games identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Google Play Games identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromKongregateIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Kongregate identifiers (Kongregate's user_id) for which the title needs to get PlayFab identifiers. The + /// array cannot exceed 2,000 in length. + /// + public List KongregateIDs; + } + + /// + /// For Kongregate identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromKongregateIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Kongregate identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromNintendoServiceAccountIdsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Nintendo Switch Account identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List NintendoAccountIds; + } + + /// + /// For Nintendo Service Account identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromNintendoServiceAccountIdsResult : PlayFabResultCommon + { + /// + /// Mapping of Nintendo Switch Service Account identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Nintendo Switch Device identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List NintendoSwitchDeviceIds; + } + + /// + /// For Nintendo Switch identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromNintendoSwitchDeviceIdsResult : PlayFabResultCommon + { + /// + /// Mapping of Nintendo Switch Device identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromPSNAccountIDsRequest : PlayFabRequestCommon + { + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Array of unique PlayStation :tm: Network identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List PSNAccountIDs; + } + + /// + /// For PlayStation :tm: Network identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromPSNAccountIDsResult : PlayFabResultCommon + { + /// + /// Mapping of PlayStation :tm: Network identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromPSNOnlineIDsRequest : PlayFabRequestCommon + { + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Array of unique PlayStation :tm: Network identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List PSNOnlineIDs; + } + + /// + /// For PlayStation :tm: Network identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromPSNOnlineIDsResult : PlayFabResultCommon + { + /// + /// Mapping of PlayStation :tm: Network identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromSteamIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List SteamStringIDs; + } + + /// + /// For Steam identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromSteamIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Steam identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromTwitchIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Twitch identifiers (Twitch's _id) for which the title needs to get PlayFab identifiers. The array cannot + /// exceed 2,000 in length. + /// + public List TwitchIds; + } + + /// + /// For Twitch identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromTwitchIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Twitch identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromXboxLiveIDsRequest : PlayFabRequestCommon + { + /// + /// The ID of Xbox Live sandbox. + /// + public string Sandbox; + /// + /// Array of unique Xbox Live account identifiers for which the title needs to get PlayFab identifiers. The array cannot + /// exceed 2,000 in length. + /// + public List XboxLiveAccountIDs; + } + + /// + /// For XboxLive identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromXboxLiveIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Xbox Live identifiers to PlayFab identifiers. + /// + public List Data; + } + + /// + /// This API is designed to return publisher-specific values which can be read, but not written to, by the client. This data + /// is shared across all titles assigned to a particular publisher, and can be used for cross-game coordination. Only titles + /// assigned to a publisher can use this API. For more information email helloplayfab@microsoft.com. Note that there may up + /// to a minute delay in between updating title data and this API call returning the newest value. + /// + [Serializable] + public class GetPublisherDataRequest : PlayFabRequestCommon + { + /// + /// array of keys to get back data from the Publisher data blob, set by the admin tools + /// + public List Keys; + } + + [Serializable] + public class GetPublisherDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + [Serializable] + public class GetPurchaseRequest : PlayFabRequestCommon + { + /// + /// Purchase order identifier. + /// + public string OrderId; + } + + [Serializable] + public class GetPurchaseResult : PlayFabResultCommon + { + /// + /// Purchase order identifier. + /// + public string OrderId; + /// + /// Payment provider used for transaction (If not VC) + /// + public string PaymentProvider; + /// + /// Date and time of the purchase. + /// + public DateTime PurchaseDate; + /// + /// Provider transaction ID (If not VC) + /// + public string TransactionId; + /// + /// PlayFab transaction status + /// + public string TransactionStatus; + } + + [Serializable] + public class GetSegmentResult : PlayFabBaseModel + { + /// + /// Identifier of the segments AB Test, if it is attached to one. + /// + public string ABTestParent; + /// + /// Unique identifier for this segment. + /// + public string Id; + /// + /// Segment name. + /// + public string Name; + } + + [Serializable] + public class GetSharedGroupDataRequest : PlayFabRequestCommon + { + /// + /// If true, return the list of all members of the shared group. + /// + public bool? GetMembers; + /// + /// Specific keys to retrieve from the shared group (if not specified, all keys will be returned, while an empty array + /// indicates that no keys should be returned). + /// + public List Keys; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class GetSharedGroupDataResult : PlayFabResultCommon + { + /// + /// Data for the requested keys. + /// + public Dictionary Data; + /// + /// List of PlayFabId identifiers for the members of this group, if requested. + /// + public List Members; + } + + /// + /// A store contains an array of references to items defined in one or more catalog versions of the game, along with the + /// prices for the item, in both real world and virtual currencies. These prices act as an override to any prices defined in + /// the catalog. In this way, the base definitions of the items may be defined in the catalog, with all associated + /// properties, while the pricing can be set for each store, as needed. This allows for subsets of goods to be defined for + /// different purposes (in order to simplify showing some, but not all catalog items to users, based upon different + /// characteristics), along with unique prices. Note that all prices defined in the catalog and store definitions for the + /// item are considered valid, and that a compromised client can be made to send a request for an item based upon any of + /// these definitions. If no price is specified in the store for an item, the price set in the catalog should be displayed + /// to the user. + /// + [Serializable] + public class GetStoreItemsRequest : PlayFabRequestCommon + { + /// + /// Catalog version to store items from. Use default catalog version if null + /// + public string CatalogVersion; + /// + /// Unqiue identifier for the store which is being requested. + /// + public string StoreId; + } + + [Serializable] + public class GetStoreItemsResult : PlayFabResultCommon + { + /// + /// The base catalog that this store is a part of. + /// + public string CatalogVersion; + /// + /// Additional data about the store. + /// + public StoreMarketingModel MarketingData; + /// + /// How the store was last updated (Admin or a third party). + /// + public SourceType? Source; + /// + /// Array of items which can be purchased from this store. + /// + public List Store; + /// + /// The ID of this store. + /// + public string StoreId; + } + + /// + /// This query retrieves the current time from one of the servers in PlayFab. Please note that due to clock drift between + /// servers, there is a potential variance of up to 5 seconds. + /// + [Serializable] + public class GetTimeRequest : PlayFabRequestCommon + { + } + + /// + /// Time is always returned as Coordinated Universal Time (UTC). + /// + [Serializable] + public class GetTimeResult : PlayFabResultCommon + { + /// + /// Current server time when the request was received, in UTC + /// + public DateTime Time; + } + + /// + /// This API is designed to return title specific values which can be read, but not written to, by the client. For example, + /// a developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, + /// movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new + /// build. If the player belongs to an experiment variant that uses title data overrides, the overrides are applied + /// automatically and returned with the title data. Note that there may up to a minute delay in between updating title data + /// and this API call returning the newest value. + /// + [Serializable] + public class GetTitleDataRequest : PlayFabRequestCommon + { + /// + /// Specific keys to search for in the title data (leave null to get all keys) + /// + public List Keys; + /// + /// Optional field that specifies the name of an override. This value is ignored when used by the game client; otherwise, + /// the overrides are applied automatically to the title data. + /// + public string OverrideLabel; + } + + [Serializable] + public class GetTitleDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + [Serializable] + public class GetTitleNewsRequest : PlayFabRequestCommon + { + /// + /// Limits the results to the last n entries. Defaults to 10 if not set. + /// + public int? Count; + } + + [Serializable] + public class GetTitleNewsResult : PlayFabResultCommon + { + /// + /// Array of news items. + /// + public List News; + } + + /// + /// An RSA CSP blob to be used to encrypt the payload of account creation requests when that API requires a signature + /// header. For example if Client/LoginWithCustomId requires signature headers but the player does not have an account yet + /// follow these steps: 1) Call Client/GetTitlePublicKey with one of the title's shared secrets. 2) Convert the Base64 + /// encoded CSP blob to a byte array and create an RSA signing object. 3) Encrypt the UTF8 encoded JSON body of the + /// registration request and place the Base64 encoded result into the EncryptedRequest and with the TitleId field, all other + /// fields can be left empty when performing the API request. 4) Client receives authentication token as normal. Future + /// requests to LoginWithCustomId will require the X-PlayFab-Signature header. + /// + [Serializable] + public class GetTitlePublicKeyRequest : PlayFabRequestCommon + { + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + /// + /// The shared secret key for this title + /// + public string TitleSharedSecret; + } + + [Serializable] + public class GetTitlePublicKeyResult : PlayFabResultCommon + { + /// + /// Base64 encoded RSA CSP byte array blob containing the title's public RSA key + /// + public string RSAPublicKey; + } + + [Serializable] + public class GetTradeStatusRequest : PlayFabRequestCommon + { + /// + /// Player who opened trade. + /// + public string OfferingPlayerId; + /// + /// Trade identifier as returned by OpenTradeOffer. + /// + public string TradeId; + } + + [Serializable] + public class GetTradeStatusResponse : PlayFabResultCommon + { + /// + /// Information about the requested trade. + /// + public TradeInfo Trade; + } + + /// + /// Data is stored as JSON key-value pairs. Every time the data is updated via any source, the version counter is + /// incremented. If the Version parameter is provided, then this call will only return data if the current version on the + /// system is greater than the value provided. If the Keys parameter is provided, the data object returned will only contain + /// the data specific to the indicated Keys. Otherwise, the full set of custom user data will be returned. + /// + [Serializable] + public class GetUserDataRequest : PlayFabRequestCommon + { + /// + /// The version that currently exists according to the caller. The call will return the data for all of the keys if the + /// version in the system is greater than this. + /// + public uint? IfChangedFromDataVersion; + /// + /// List of unique keys to load from. + /// + public List Keys; + /// + /// Unique PlayFab identifier of the user to load data for. Optional, defaults to yourself if not set. When specified to a + /// PlayFab id of another player, then this will only return public keys for that account. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserDataResult : PlayFabResultCommon + { + /// + /// User specific data for this title. + /// + public Dictionary Data; + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + [Serializable] + public class GetUserInventoryRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// All items currently in the user inventory will be returned, irrespective of how they were acquired (via purchasing, + /// grants, coupons, etc.). Items that are expired, fully consumed, or are no longer valid are not considered to be in the + /// user's current inventory, and so will not be not included. + /// + [Serializable] + public class GetUserInventoryResult : PlayFabResultCommon + { + /// + /// Array of inventory items belonging to the user. + /// + public List Inventory; + /// + /// Array of virtual currency balance(s) belonging to the user. + /// + public Dictionary VirtualCurrency; + /// + /// Array of remaining times and timestamps for virtual currencies. + /// + public Dictionary VirtualCurrencyRechargeTimes; + } + + [Serializable] + public class GooglePlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Google identifier for a user. + /// + public string GoogleId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Google identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class GooglePlayGamesPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Google Play Games identifier for a user. + /// + public string GooglePlayGamesPlayerId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Google Play Games identifier. + /// + public string PlayFabId; + } + + /// + /// Grants a character to the user of the type specified by the item ID. The user must already have an instance of this item + /// in their inventory in order to allow character creation. This item can come from a purchase or grant, which must be done + /// before calling to create the character. + /// + [Serializable] + public class GrantCharacterToUserRequest : PlayFabRequestCommon + { + /// + /// Catalog version from which items are to be granted. + /// + public string CatalogVersion; + /// + /// Non-unique display name of the character being granted (1-40 characters in length). + /// + public string CharacterName; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Catalog item identifier of the item in the user's inventory that corresponds to the character in the catalog to be + /// created. + /// + public string ItemId; + } + + [Serializable] + public class GrantCharacterToUserResult : PlayFabResultCommon + { + /// + /// Unique identifier tagged to this character. + /// + public string CharacterId; + /// + /// Type of character that was created. + /// + public string CharacterType; + /// + /// Indicates whether this character was created successfully. + /// + public bool Result; + } + + /// + /// A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item such as Tags, + /// Description that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can + /// be matched to a catalog entry, which contains the additional information. Also note that Custom Data is only set when + /// the User's specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields + /// such as UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class ItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + [Serializable] + public class ItemPurchaseRequest : PlayFabBaseModel + { + /// + /// Title-specific text concerning this purchase. + /// + public string Annotation; + /// + /// Unique ItemId of the item to purchase. + /// + public string ItemId; + /// + /// How many of this item to purchase. Min 1, maximum 25. + /// + public uint Quantity; + /// + /// Items to be upgraded as a result of this purchase (upgraded items are hidden, as they are "replaced" by the new items). + /// + public List UpgradeFromItems; + } + + [Serializable] + public class KongregatePlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Kongregate identifier for a user. + /// + public string KongregateId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Kongregate identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class LinkAndroidDeviceIDRequest : PlayFabRequestCommon + { + /// + /// Specific model of the user's device. + /// + public string AndroidDevice; + /// + /// Android device identifier for the user's device. + /// + public string AndroidDeviceId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the device, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Specific Operating System version for the user's device. + /// + public string OS; + } + + [Serializable] + public class LinkAndroidDeviceIDResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkAppleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to a specific Apple account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// The JSON Web token (JWT) returned by Apple after login. Represented as the identityToken field in the authorization + /// credential payload. Used to validate the request and find the user ID (Apple subject) to link with. + /// + public string IdentityToken; + } + + [Serializable] + public class LinkCustomIDRequest : PlayFabRequestCommon + { + /// + /// Custom unique identifier for the user, generated by the title. + /// + public string CustomId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the custom ID, unlink the other user and re-link. + /// + public bool? ForceLink; + } + + [Serializable] + public class LinkCustomIDResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkedPlatformAccountModel : PlayFabBaseModel + { + /// + /// Linked account email of the user on the platform, if available + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Unique account identifier of the user on the platform + /// + public string PlatformUserId; + /// + /// Linked account username of the user on the platform, if available + /// + public string Username; + } + + /// + /// Facebook sign-in is accomplished using the Facebook User Access Token. More information on the Token can be found in the + /// Facebook developer documentation (https://developers.facebook.com/docs/facebook-login/access-tokens/). In Unity, for + /// example, the Token is available as AccessToken in the Facebook SDK ScriptableObject FB. Note that titles should never + /// re-use the same Facebook applications between PlayFab Title IDs, as Facebook provides unique user IDs per application + /// and doing so can result in issues with the Facebook ID for the user in their PlayFab account information. If you must + /// re-use an application in a new PlayFab Title ID, please be sure to first unlink all accounts from Facebook, or delete + /// all users in the first Title ID. + /// + [Serializable] + public class LinkFacebookAccountRequest : PlayFabRequestCommon + { + /// + /// Unique identifier from Facebook for the user. + /// + public string AccessToken; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + } + + [Serializable] + public class LinkFacebookAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkFacebookInstantGamesIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Facebook Instant Games signature for the user. + /// + public string FacebookInstantGamesSignature; + /// + /// If another user is already linked to the Facebook Instant Games ID, unlink the other user and re-link. + /// + public bool? ForceLink; + } + + [Serializable] + public class LinkFacebookInstantGamesIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkGameCenterAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. If the current user is already + /// linked, link both accounts + /// + public bool? ForceLink; + /// + /// Game Center identifier for the player account to be linked. + /// + public string GameCenterId; + /// + /// The URL for the public encryption key that will be used to verify the signature. + /// + public string PublicKeyUrl; + /// + /// A random value used to compute the hash and keep it randomized. + /// + public string Salt; + /// + /// The verification signature of the authentication payload. + /// + public string Signature; + /// + /// The integer representation of date and time that the signature was created on. PlayFab will reject authentication + /// signatures not within 10 minutes of the server's current time. + /// + public string Timestamp; + } + + [Serializable] + public class LinkGameCenterAccountResult : PlayFabResultCommon + { + } + + /// + /// Google sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google sign-in for Android APIs on + /// the device and passing it to this API. + /// + [Serializable] + public class LinkGoogleAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. If the current user is already + /// linked, link both accounts + /// + public bool? ForceLink; + /// + /// Server authentication code obtained on the client by calling getServerAuthCode() + /// (https://developers.google.com/identity/sign-in/android/offline-access) from Google Play for the user. + /// + public string ServerAuthCode; + } + + [Serializable] + public class LinkGoogleAccountResult : PlayFabResultCommon + { + } + + /// + /// Google Play Games sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google Play Games sign-in + /// for Android APIs on the device and passing it to this API. + /// + [Serializable] + public class LinkGooglePlayGamesServicesAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. If the current user is already + /// linked, link both accounts + /// + public bool? ForceLink; + /// + /// OAuth 2.0 server authentication code obtained on the client by calling the requestServerSideAccess() + /// (https://developers.google.com/games/services/android/signin) Google Play Games client API. + /// + public string ServerAuthCode; + } + + [Serializable] + public class LinkGooglePlayGamesServicesAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkIOSDeviceIDRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Vendor-specific iOS identifier for the user's device. + /// + public string DeviceId; + /// + /// Specific model of the user's device. + /// + public string DeviceModel; + /// + /// If another user is already linked to the device, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Specific Operating System version for the user's device. + /// + public string OS; + } + + [Serializable] + public class LinkIOSDeviceIDResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkKongregateAccountRequest : PlayFabRequestCommon + { + /// + /// Valid session auth ticket issued by Kongregate + /// + public string AuthTicket; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Numeric user ID assigned by Kongregate + /// + public string KongregateId; + } + + [Serializable] + public class LinkKongregateAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkNintendoServiceAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to a specific Nintendo Switch account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// The JSON Web token (JWT) returned by Nintendo after login. Used to validate the request and find the user ID (Nintendo + /// Switch subject) to link with. + /// + public string IdentityToken; + } + + [Serializable] + public class LinkNintendoSwitchDeviceIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the Nintendo Switch Device ID, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Nintendo Switch unique identifier for the user's device. + /// + public string NintendoSwitchDeviceId; + } + + [Serializable] + public class LinkNintendoSwitchDeviceIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkOpenIdConnectRequest : PlayFabRequestCommon + { + /// + /// A name that identifies which configured OpenID Connect provider relationship to use. Maximum 100 characters. + /// + public string ConnectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to a specific OpenId Connect user, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// The JSON Web token (JWT) returned by the identity provider after login. Represented as the id_token field in the + /// identity provider's response. Used to validate the request and find the user ID (OpenID Connect subject) to link with. + /// + public string IdToken; + } + + [Serializable] + public class LinkPSNAccountRequest : PlayFabRequestCommon + { + /// + /// Authentication code provided by the PlayStation :tm: Network. + /// + public string AuthCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code + /// + public string RedirectUri; + } + + [Serializable] + public class LinkPSNAccountResult : PlayFabResultCommon + { + } + + /// + /// Steam authentication is accomplished with the Steam Session Ticket. More information on the Ticket can be found in the + /// Steamworks SDK, here: https://partner.steamgames.com/documentation/auth (requires sign-in). NOTE: For Steam + /// authentication to work, the title must be configured with the Steam Application ID and Publisher Key in the PlayFab Game + /// Manager (under Properties). Information on creating a Publisher Key (referred to as the Secret Key in PlayFab) for your + /// title can be found here: https://partner.steamgames.com/documentation/webapi#publisherkey. + /// + [Serializable] + public class LinkSteamAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Authentication token for the user, returned as a byte array from Steam, and converted to a string (for example, the byte + /// 0x08 should become "08"). + /// + public string SteamTicket; + /// + /// True if ticket was generated using ISteamUser::GetAuthTicketForWebAPI() using "AzurePlayFab" as the identity string. + /// False if the ticket was generated with ISteamUser::GetAuthSessionTicket(). + /// + public bool? TicketIsServiceSpecific; + } + + [Serializable] + public class LinkSteamAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkTwitchAccountRequest : PlayFabRequestCommon + { + /// + /// Valid token issued by Twitch + /// + public string AccessToken; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + } + + [Serializable] + public class LinkTwitchAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkXboxAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). + /// + public string XboxToken; + } + + [Serializable] + public class LinkXboxAccountResult : PlayFabResultCommon + { + } + + /// + /// Returns a list of every character that currently belongs to a user. + /// + [Serializable] + public class ListUsersCharactersRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ListUsersCharactersResult : PlayFabResultCommon + { + /// + /// The requested list of characters. + /// + public List Characters; + } + + [Serializable] + public class LocationModel : PlayFabBaseModel + { + /// + /// City name. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode? ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode? CountryCode; + /// + /// Latitude coordinate of the geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the geographic location. + /// + public double? Longitude; + } + + public enum LoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + [Serializable] + public class LoginResult : PlayFabLoginResultCommon + { + /// + /// If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and + /// returned. + /// + public EntityTokenResponse EntityToken; + /// + /// Results for requested info. + /// + public GetPlayerCombinedInfoResultPayload InfoResultPayload; + /// + /// The time of this user's previous login. If there was no previous login, then it's DateTime.MinValue + /// + public DateTime? LastLoginTime; + /// + /// True if the account was newly created on this login. + /// + public bool NewlyCreated; + /// + /// Player's unique PlayFabId. + /// + public string PlayFabId; + /// + /// Unique token authorizing the user and game at the server level, for the current session. + /// + public string SessionTicket; + /// + /// Settings specific to this user. + /// + public UserSettings SettingsForUser; + /// + /// The experimentation treatments for this user at the time of login. + /// + public TreatmentAssignment TreatmentAssignment; + } + + /// + /// On Android devices, the recommendation is to use the Settings.Secure.ANDROID_ID as the AndroidDeviceId, as described in + /// this blog post (http://android-developers.blogspot.com/2011/03/identifying-app-installations.html). More information on + /// this identifier can be found in the Android documentation + /// (http://developer.android.com/reference/android/provider/Settings.Secure.html). If this is the first time a user has + /// signed in with the Android device and CreateAccount is set to true, a new PlayFab account will be created and linked to + /// the Android device ID. In this case, no email or username will be associated with the PlayFab account. Otherwise, if no + /// PlayFab account is linked to the Android device, an error indicating this will be returned, so that the title can guide + /// the user through creation of a PlayFab account. Please note that while multiple devices of this type can be linked to a + /// single user account, only the one most recently used to login (or most recently linked) will be reflected in the user's + /// account information. We will be updating to show all linked devices in a future release. + /// + [Serializable] + public class LoginWithAndroidDeviceIDRequest : PlayFabRequestCommon + { + /// + /// Specific model of the user's device. + /// + public string AndroidDevice; + /// + /// Android device identifier for the user's device. + /// + public string AndroidDeviceId; + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Specific Operating System version for the user's device. + /// + public string OS; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class LoginWithAppleRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// The JSON Web token (JWT) returned by Apple after login. Represented as the identityToken field in the authorization + /// credential payload. If you choose to ignore the expiration date for identity tokens, you will receive an NotAuthorized + /// error if Apple rotates the signing key. In this case, users have to login to provide a fresh identity token. + /// + public string IdentityToken; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// It is highly recommended that developers ensure that it is extremely unlikely that a customer could generate an ID which + /// is already in use by another customer. If this is the first time a user has signed in with the Custom ID and + /// CreateAccount is set to true, a new PlayFab account will be created and linked to the Custom ID. In this case, no email + /// or username will be associated with the PlayFab account. Otherwise, if no PlayFab account is linked to the Custom ID, an + /// error indicating this will be returned, so that the title can guide the user through creation of a PlayFab account. + /// + [Serializable] + public class LoginWithCustomIDRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// Custom unique identifier for the user, generated by the title. + /// + public string CustomId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// Email address and password lengths are provided for information purposes. The server will validate that data passed in + /// conforms to the field definition and report errors appropriately. It is recommended that developers not perform this + /// validation locally, so that future updates do not require client updates. + /// + [Serializable] + public class LoginWithEmailAddressRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Email address for the account. + /// + public string Email; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Password for the PlayFab account (6-100 characters) + /// + public string Password; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class LoginWithFacebookInstantGamesIdRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Facebook Instant Games signature for the user. + /// + public string FacebookInstantGamesSignature; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// Facebook sign-in is accomplished using the Facebook User Access Token. More information on the Token can be found in the + /// Facebook developer documentation (https://developers.facebook.com/docs/facebook-login/access-tokens/). In Unity, for + /// example, the Token is available as AccessToken in the Facebook SDK ScriptableObject FB. If this is the first time a user + /// has signed in with the Facebook account and CreateAccount is set to true, a new PlayFab account will be created and + /// linked to the provided account's Facebook ID. In this case, no email or username will be associated with the PlayFab + /// account. Otherwise, if no PlayFab account is linked to the Facebook account, an error indicating this will be returned, + /// so that the title can guide the user through creation of a PlayFab account. Note that titles should never re-use the + /// same Facebook applications between PlayFab Title IDs, as Facebook provides unique user IDs per application and doing so + /// can result in issues with the Facebook ID for the user in their PlayFab account information. If you must re-use an + /// application in a new PlayFab Title ID, please be sure to first unlink all accounts from Facebook, or delete all users in + /// the first Title ID. Note: If the user is authenticated with AuthenticationToken, instead of AccessToken, the + /// GetFriendsList API will return an empty list. + /// + [Serializable] + public class LoginWithFacebookRequest : PlayFabRequestCommon + { + /// + /// Unique identifier from Facebook for the user. + /// + public string AccessToken; + /// + /// Token used for limited login authentication. + /// + public string AuthenticationToken; + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// The Game Center player identifier + /// (https://developer.apple.com/library/ios/documentation/Accounts/Reference/ACAccountClassRef/index.html#//apple_ref/occ/instp/ACAccount/identifier) + /// is a generated string which is stored on the local device. As with device identifiers, care must be taken to never + /// expose a player's Game Center identifier to end users, as that could result in a user's account being compromised. If + /// this is the first time a user has signed in with Game Center and CreateAccount is set to true, a new PlayFab account + /// will be created and linked to the Game Center identifier. In this case, no email or username will be associated with the + /// PlayFab account. Otherwise, if no PlayFab account is linked to the Game Center account, an error indicating this will be + /// returned, so that the title can guide the user through creation of a PlayFab account. If an invalid iOS Game Center + /// player identifier is used, an error indicating this will be returned. + /// + [Serializable] + public class LoginWithGameCenterRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Unique Game Center player id. + /// + public string PlayerId; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// The URL for the public encryption key that will be used to verify the signature. + /// + public string PublicKeyUrl; + /// + /// A random value used to compute the hash and keep it randomized. + /// + public string Salt; + /// + /// The verification signature of the authentication payload. + /// + public string Signature; + /// + /// The integer representation of date and time that the signature was created on. PlayFab will reject authentication + /// signatures not within 10 minutes of the server's current time. + /// + public string Timestamp; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// Google sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google sign-in for Android APIs on + /// the device and passing it to this API. If this is the first time a user has signed in with the Google account and + /// CreateAccount is set to true, a new PlayFab account will be created and linked to the Google account. Otherwise, if no + /// PlayFab account is linked to the Google account, an error indicating this will be returned, so that the title can guide + /// the user through creation of a PlayFab account. The current (recommended) method for obtaining a Google account + /// credential in an Android application is to call GoogleSignInAccount.getServerAuthCode() and send the auth code as the + /// ServerAuthCode parameter of this API. Before doing this, you must create an OAuth 2.0 web application client ID in the + /// Google API Console and configure its client ID and secret in the PlayFab Game Manager Google Add-on for your title. This + /// method does not require prompting of the user for additional Google account permissions, resulting in a user experience + /// with the least possible friction. For more information about obtaining the server auth code, see + /// https://developers.google.com/identity/sign-in/android/offline-access. The previous (deprecated) method was to obtain an + /// OAuth access token by calling GetAccessToken() on the client and passing it as the AccessToken parameter to this API. + /// for the with the Google OAuth 2.0 Access Token. More information on this change can be found in the Google developer + /// documentation (https://android-developers.googleblog.com/2016/01/play-games-permissions-are-changing-in.html). + /// + [Serializable] + public class LoginWithGoogleAccountRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// OAuth 2.0 server authentication code obtained on the client by calling the getServerAuthCode() + /// (https://developers.google.com/identity/sign-in/android/offline-access) Google client API. + /// + public string ServerAuthCode; + /// + /// Optional boolean to opt out of setting the MPA email when creating a Google account, defaults to true. + /// + public bool? SetEmail; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// Google Play Games sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google Play Games sign-in + /// for Android APIs on the device and passing it to this API. If this is the first time a user has signed in with the + /// Google Play Games account and CreateAccount is set to true, a new PlayFab account will be created and linked to the + /// Google Play Games account. Otherwise, if no PlayFab account is linked to the Google Play Games account, an error + /// indicating this will be returned, so that the title can guide the user through creation of a PlayFab account. The + /// current (recommended) method for obtaining a Google Play Games account credential in an Android application is to call + /// GamesSignInClient.requestServerSideAccess() and send the auth code as the ServerAuthCode parameter of this API. Before + /// doing this, you must create an OAuth 2.0 web application client ID in the Google API Console and configure its client ID + /// and secret in the PlayFab Game Manager Google Add-on for your title. This method does not require prompting of the user + /// for additional Google account permissions, resulting in a user experience with the least possible friction. For more + /// information about obtaining the server auth code, see https://developers.google.com/games/services/android/signin. + /// + [Serializable] + public class LoginWithGooglePlayGamesServicesRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// OAuth 2.0 server authentication code obtained on the client by calling the requestServerSideAccess() + /// (https://developers.google.com/games/services/android/signin) Google Play Games client API. + /// + public string ServerAuthCode; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// On iOS devices, the identifierForVendor + /// (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#//apple_ref/occ/instp/UIDevice/identifierForVendor) + /// must be used as the DeviceId, as the UIDevice uniqueIdentifier has been deprecated as of iOS 5, and use of the + /// advertisingIdentifier for this purpose will result in failure of Apple's certification process. If this is the first + /// time a user has signed in with the iOS device and CreateAccount is set to true, a new PlayFab account will be created + /// and linked to the vendor-specific iOS device ID. In this case, no email or username will be associated with the PlayFab + /// account. Otherwise, if no PlayFab account is linked to the iOS device, an error indicating this will be returned, so + /// that the title can guide the user through creation of a PlayFab account. Please note that while multiple devices of this + /// type can be linked to a single user account, only the one most recently used to login (or most recently linked) will be + /// reflected in the user's account information. We will be updating to show all linked devices in a future release. + /// + [Serializable] + public class LoginWithIOSDeviceIDRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Vendor-specific iOS identifier for the user's device. + /// + public string DeviceId; + /// + /// Specific model of the user's device. + /// + public string DeviceModel; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Specific Operating System version for the user's device. + /// + public string OS; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// More details regarding Kongregate and their game authentication system can be found at + /// http://developers.kongregate.com/docs/virtual-goods/authentication. Developers must provide the Kongregate user ID and + /// auth token that are generated using the Kongregate client library. PlayFab will combine these identifiers with the + /// title's unique Kongregate app ID to log the player into the Kongregate system. If CreateAccount is set to true and there + /// is not already a user matched to this Kongregate ID, then PlayFab will create a new account for this user and link the + /// ID. In this case, no email or username will be associated with the PlayFab account. If there is already a different + /// PlayFab user linked with this account, then an error will be returned. + /// + [Serializable] + public class LoginWithKongregateRequest : PlayFabRequestCommon + { + /// + /// Token issued by Kongregate's client API for the user. + /// + public string AuthTicket; + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Numeric user ID assigned by Kongregate + /// + public string KongregateId; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class LoginWithNintendoServiceAccountRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// The JSON Web token (JWT) returned by Nintendo after login. + /// + public string IdentityToken; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class LoginWithNintendoSwitchDeviceIdRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Nintendo Switch unique identifier for the user's device. + /// + public string NintendoSwitchDeviceId; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class LoginWithOpenIdConnectRequest : PlayFabRequestCommon + { + /// + /// A name that identifies which configured OpenID Connect provider relationship to use. Maximum 100 characters. + /// + public string ConnectionId; + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// The JSON Web token (JWT) returned by the identity provider after login. Represented as the id_token field in the + /// identity provider's response. + /// + public string IdToken; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// Username and password lengths are provided for information purposes. The server will validate that data passed in + /// conforms to the field definition and report errors appropriately. It is recommended that developers not perform this + /// validation locally, so that future updates to the username or password do not require client updates. + /// + [Serializable] + public class LoginWithPlayFabRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Password for the PlayFab account (6-100 characters) + /// + public string Password; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + /// + /// PlayFab username for the account. + /// + public string Username; + } + + /// + /// If this is the first time a user has signed in with the PlayStation :tm: Network account and CreateAccount is set to + /// true, a new PlayFab account will be created and linked to the PlayStation :tm: Network account. In this case, no email + /// or username will be associated with the PlayFab account. Otherwise, if no PlayFab account is linked to the PlayStation + /// :tm: Network account, an error indicating this will be returned, so that the title can guide the user through creation + /// of a PlayFab account. + /// + [Serializable] + public class LoginWithPSNRequest : PlayFabRequestCommon + { + /// + /// Auth code provided by the PlayStation :tm: Network OAuth provider. + /// + public string AuthCode; + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code + /// + public string RedirectUri; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// Steam sign-in is accomplished with the Steam Session Ticket. More information on the Ticket can be found in the + /// Steamworks SDK, here: https://partner.steamgames.com/documentation/auth. NOTE: For Steam authentication to work, the + /// title must be configured with the Steam Application ID and Web API Key in the PlayFab Game Manager (under Steam in the + /// Add-ons Marketplace). You can obtain a Web API Key from the Permissions page of any Group associated with your App ID in + /// the Steamworks site. If this is the first time a user has signed in with the Steam account and CreateAccount is set to + /// true, a new PlayFab account will be created and linked to the provided account's Steam ID. In this case, no email or + /// username will be associated with the PlayFab account. Otherwise, if no PlayFab account is linked to the Steam account, + /// an error indicating this will be returned, so that the title can guide the user through creation of a PlayFab account. + /// + [Serializable] + public class LoginWithSteamRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Authentication token for the user, returned as a byte array from Steam, and converted to a string (for example, the byte + /// 0x08 should become "08"). + /// + public string SteamTicket; + /// + /// True if ticket was generated using ISteamUser::GetAuthTicketForWebAPI() using "AzurePlayFab" as the identity string. + /// False if the ticket was generated with ISteamUser::GetAuthSessionTicket(). + /// + public bool? TicketIsServiceSpecific; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// More details regarding Twitch and their authentication system can be found at + /// https://github.com/justintv/Twitch-API/blob/master/authentication.md. Developers must provide the Twitch access token + /// that is generated using one of the Twitch authentication flows. PlayFab will use the title's unique Twitch Client ID to + /// authenticate the token and log in to the PlayFab system. If CreateAccount is set to true and there is not already a user + /// matched to the Twitch username that generated the token, then PlayFab will create a new account for this user and link + /// the ID. In this case, no email or username will be associated with the PlayFab account. If there is already a different + /// PlayFab user linked with this account, then an error will be returned. + /// + [Serializable] + public class LoginWithTwitchRequest : PlayFabRequestCommon + { + /// + /// Token issued by Twitch's API for the user. + /// + public string AccessToken; + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + /// + /// If this is the first time a user has signed in with the Xbox Live account and CreateAccount is set to true, a new + /// PlayFab account will be created and linked to the Xbox Live account. In this case, no email or username will be + /// associated with the PlayFab account. Otherwise, if no PlayFab account is linked to the Xbox Live account, an error + /// indicating this will be returned, so that the title can guide the user through creation of a PlayFab account. + /// + [Serializable] + public class LoginWithXboxRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + /// + /// Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). + /// + public string XboxToken; + } + + [Serializable] + public class LogStatement : PlayFabBaseModel + { + /// + /// Optional object accompanying the message as contextual information + /// + public object Data; + /// + /// 'Debug', 'Info', or 'Error' + /// + public string Level; + public string Message; + } + + [Serializable] + public class MembershipModel : PlayFabBaseModel + { + /// + /// Whether this membership is active. That is, whether the MembershipExpiration time has been reached. + /// + public bool IsActive; + /// + /// The time this membership expires + /// + public DateTime MembershipExpiration; + /// + /// The id of the membership + /// + public string MembershipId; + /// + /// Membership expirations can be explicitly overridden (via game manager or the admin api). If this membership has been + /// overridden, this will be the new expiration time. + /// + public DateTime? OverrideExpiration; + /// + /// The list of subscriptions that this player has for this membership + /// + public List Subscriptions; + } + + [Serializable] + public class MicrosoftStorePayload : PlayFabBaseModel + { + /// + /// Microsoft store ID key. This is optional. Alternatively you can use XboxToken + /// + public string CollectionsMsIdKey; + /// + /// If collectionsMsIdKey is provided, this will verify the user id in the collectionsMsIdKey is the same. + /// + public string UserId; + /// + /// Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). This is + /// optional. Alternatively can use CollectionsMsIdKey + /// + public string XboxToken; + } + + [Serializable] + public class ModifyUserVirtualCurrencyResult : PlayFabResultCommon + { + /// + /// Balance of the virtual currency after modification. + /// + public int Balance; + /// + /// Amount added or subtracted from the user's virtual currency. Maximum VC balance is Int32 (2,147,483,647). Any increase + /// over this value will be discarded. + /// + public int BalanceChange; + /// + /// User currency was subtracted from. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which was modified. + /// + public string VirtualCurrency; + } + + /// + /// Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is + /// immutable and unique. + /// + [Serializable] + public class NameIdentifier : PlayFabBaseModel + { + /// + /// Id Identifier, if present + /// + public string Id; + /// + /// Name Identifier, if present + /// + public string Name; + } + + [Serializable] + public class NintendoServiceAccountPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Nintendo Switch Service Account identifier for a user. + /// + public string NintendoServiceAccountId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Nintendo Switch Service Account + /// identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class NintendoSwitchPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Nintendo Switch Device identifier for a user. + /// + public string NintendoSwitchDeviceId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Nintendo Switch Device identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class OpenTradeRequest : PlayFabRequestCommon + { + /// + /// Players who are allowed to accept the trade. If null, the trade may be accepted by any player. If empty, the trade may + /// not be accepted by any player. + /// + public List AllowedPlayerIds; + /// + /// Player inventory items offered for trade. If not set, the trade is effectively a gift request + /// + public List OfferedInventoryInstanceIds; + /// + /// Catalog items accepted for the trade. If not set, the trade is effectively a gift. + /// + public List RequestedCatalogItemIds; + } + + [Serializable] + public class OpenTradeResponse : PlayFabResultCommon + { + /// + /// The information about the trade that was just opened. + /// + public TradeInfo Trade; + } + + /// + /// This is the second step in the purchasing process, initiating the purchase transaction with the payment provider (if + /// applicable). For payment provider scenarios, the title should next present the user with the payment provider'sinterface + /// for payment. Once the player has completed the payment with the provider, the title should call ConfirmPurchase + /// tofinalize the process and add the appropriate items to the player inventory. + /// + [Serializable] + public class PayForPurchaseRequest : PlayFabRequestCommon + { + /// + /// Currency to use to fund the purchase. + /// + public string Currency; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Purchase order identifier returned from StartPurchase. + /// + public string OrderId; + /// + /// Payment provider to use to fund the purchase. + /// + public string ProviderName; + /// + /// Payment provider transaction identifier. Required for Facebook Payments. + /// + public string ProviderTransactionId; + } + + /// + /// For web-based payment providers, this operation returns the URL to which the user should be directed inorder to approve + /// the purchase. Items added to the user inventory as a result of this operation will be marked as unconfirmed. + /// + [Serializable] + public class PayForPurchaseResult : PlayFabResultCommon + { + /// + /// Local credit applied to the transaction (provider specific). + /// + public uint CreditApplied; + /// + /// Purchase order identifier. + /// + public string OrderId; + /// + /// Provider used for the transaction. + /// + public string ProviderData; + /// + /// A token generated by the provider to authenticate the request (provider-specific). + /// + public string ProviderToken; + /// + /// URL to the purchase provider page that details the purchase. + /// + public string PurchaseConfirmationPageURL; + /// + /// Currency for the transaction, may be a virtual currency or real money. + /// + public string PurchaseCurrency; + /// + /// Cost of the transaction. + /// + public uint PurchasePrice; + /// + /// Status of the transaction. + /// + public TransactionStatus? Status; + /// + /// Virtual currencies granted by the transaction, if any. + /// + public Dictionary VCAmount; + /// + /// Current virtual currency balances for the user. + /// + public Dictionary VirtualCurrency; + } + + [Serializable] + public class PaymentOption : PlayFabBaseModel + { + /// + /// Specific currency to use to fund the purchase. + /// + public string Currency; + /// + /// Amount of the specified currency needed for the purchase. + /// + public uint Price; + /// + /// Name of the purchase provider for this option. + /// + public string ProviderName; + /// + /// Amount of existing credit the user has with the provider. + /// + public uint StoreCredit; + } + + [Serializable] + public class PlayerLeaderboardEntry : PlayFabBaseModel + { + /// + /// Title-specific display name of the user for this leaderboard entry. + /// + public string DisplayName; + /// + /// PlayFab unique identifier of the user for this leaderboard entry. + /// + public string PlayFabId; + /// + /// User's overall position in the leaderboard. + /// + public int Position; + /// + /// The profile of the user, if requested. + /// + public PlayerProfileModel Profile; + /// + /// Specific value of the user's statistic. + /// + public int StatValue; + } + + [Serializable] + public class PlayerProfileModel : PlayFabBaseModel + { + /// + /// List of advertising campaigns the player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// URL of the player's avatar image + /// + public string AvatarUrl; + /// + /// If the player is currently banned, the UTC Date when the ban expires + /// + public DateTime? BannedUntil; + /// + /// List of all contact email info associated with the player account + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player display name + /// + public string DisplayName; + /// + /// List of experiment variants for the player. Note that these variants are not guaranteed to be up-to-date when returned + /// during login because the player profile is updated only after login. Instead, use the LoginResult.TreatmentAssignment + /// property during login to get the correct variants and variables. + /// + public List ExperimentVariants; + /// + /// UTC time when the player most recently logged in to the title + /// + public DateTime? LastLogin; + /// + /// List of all authentication systems linked to this player account + /// + public List LinkedAccounts; + /// + /// List of geographic locations from which the player has logged in to the title + /// + public List Locations; + /// + /// List of memberships for the player, along with whether are expired. + /// + public List Memberships; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// PlayFab player account unique identifier + /// + public string PlayerId; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// List of configured end points registered for sending the player push notifications + /// + public List PushNotificationRegistrations; + /// + /// List of leaderboard statistic values for the player + /// + public List Statistics; + /// + /// List of player's tags for segmentation + /// + public List Tags; + /// + /// Title ID this player profile applies to + /// + public string TitleId; + /// + /// Sum of the player's purchases made with real-money currencies, converted to US dollars equivalent and represented as a + /// whole number of cents (1/100 USD). For example, 999 indicates nine dollars and ninety-nine cents. + /// + public uint? TotalValueToDateInUSD; + /// + /// List of the player's lifetime purchase totals, summed by real-money currency + /// + public List ValuesToDate; + } + + [Serializable] + public class PlayerProfileViewConstraints : PlayFabBaseModel + { + /// + /// Whether to show player's avatar URL. Defaults to false + /// + public bool ShowAvatarUrl; + /// + /// Whether to show the banned until time. Defaults to false + /// + public bool ShowBannedUntil; + /// + /// Whether to show campaign attributions. Defaults to false + /// + public bool ShowCampaignAttributions; + /// + /// Whether to show contact email addresses. Defaults to false + /// + public bool ShowContactEmailAddresses; + /// + /// Whether to show the created date. Defaults to false + /// + public bool ShowCreated; + /// + /// Whether to show the display name. Defaults to false + /// + public bool ShowDisplayName; + /// + /// Whether to show player's experiment variants. Defaults to false + /// + public bool ShowExperimentVariants; + /// + /// Whether to show the last login time. Defaults to false + /// + public bool ShowLastLogin; + /// + /// Whether to show the linked accounts. Defaults to false + /// + public bool ShowLinkedAccounts; + /// + /// Whether to show player's locations. Defaults to false + /// + public bool ShowLocations; + /// + /// Whether to show player's membership information. Defaults to false + /// + public bool ShowMemberships; + /// + /// Whether to show origination. Defaults to false + /// + public bool ShowOrigination; + /// + /// Whether to show push notification registrations. Defaults to false + /// + public bool ShowPushNotificationRegistrations; + /// + /// Reserved for future development + /// + public bool ShowStatistics; + /// + /// Whether to show tags. Defaults to false + /// + public bool ShowTags; + /// + /// Whether to show the total value to date in usd. Defaults to false + /// + public bool ShowTotalValueToDateInUsd; + /// + /// Whether to show the values to date. Defaults to false + /// + public bool ShowValuesToDate; + } + + [Serializable] + public class PlayerStatisticVersion : PlayFabBaseModel + { + /// + /// time when the statistic version became active + /// + public DateTime ActivationTime; + /// + /// time when the statistic version became inactive due to statistic version incrementing + /// + public DateTime? DeactivationTime; + /// + /// time at which the statistic version was scheduled to become active, based on the configured ResetInterval + /// + public DateTime? ScheduledActivationTime; + /// + /// time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + /// + public DateTime? ScheduledDeactivationTime; + /// + /// name of the statistic when the version became active + /// + public string StatisticName; + /// + /// version of the statistic + /// + public uint Version; + } + + [Serializable] + public class PlayStation5Payload : PlayFabBaseModel + { + /// + /// An optional list of entitlement ids to query against PlayStation :tm: Network + /// + public List Ids; + /// + /// Id of the PlayStation :tm: Network service label to consume entitlements from + /// + public string ServiceLabel; + } + + [Serializable] + public class PSNAccountPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the PlayStation :tm: Network + /// identifier. + /// + public string PlayFabId; + /// + /// Unique PlayStation :tm: Network identifier for a user. + /// + public string PSNAccountId; + } + + [Serializable] + public class PSNOnlinePlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the PlayStation :tm: Network + /// identifier. + /// + public string PlayFabId; + /// + /// Unique PlayStation :tm: Network identifier for a user. + /// + public string PSNOnlineId; + } + + /// + /// Please note that the processing time for inventory grants and purchases increases fractionally the more items are in the + /// inventory, and the more items are in the grant/purchase operation (with each item in a bundle being a distinct add). + /// + [Serializable] + public class PurchaseItemRequest : PlayFabRequestCommon + { + /// + /// Catalog version for the items to be purchased (defaults to most recent version. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique identifier of the item to purchase. + /// + public string ItemId; + /// + /// Price the client expects to pay for the item (in case a new catalog or store was uploaded, with new prices). + /// + public int Price; + /// + /// Store to buy this item through. If not set, prices default to those in the catalog. + /// + public string StoreId; + /// + /// Virtual currency to use to purchase the item. + /// + public string VirtualCurrency; + } + + [Serializable] + public class PurchaseItemResult : PlayFabResultCommon + { + /// + /// Details for the items purchased. + /// + public List Items; + } + + [Serializable] + public class PurchaseReceiptFulfillment : PlayFabBaseModel + { + /// + /// Items granted to the player in fulfillment of the validated receipt. + /// + public List FulfilledItems; + /// + /// Source of the payment price information for the recorded purchase transaction. A value of 'Request' indicates that the + /// price specified in the request was used, whereas a value of 'Catalog' indicates that the real-money price of the catalog + /// item matching the product ID in the validated receipt transaction and the currency specified in the request (defaulting + /// to USD) was used. + /// + public string RecordedPriceSource; + /// + /// Currency used to purchase the items (ISO 4217 currency code). + /// + public string RecordedTransactionCurrency; + /// + /// Amount of the stated currency paid for the items, in centesimal units + /// + public uint? RecordedTransactionTotal; + } + + public enum PushNotificationPlatform + { + ApplePushNotificationService, + GoogleCloudMessaging + } + + [Serializable] + public class PushNotificationRegistrationModel : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + /// + /// Coupon codes can be created for any item, or set of items, in the catalog for the title. This operation causes the + /// coupon to be consumed, and the specific items to be awarded to the user. Attempting to re-use an already consumed code, + /// or a code which has not yet been created in the service, will result in an error. + /// + [Serializable] + public class RedeemCouponRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the coupon. If null, uses the default catalog + /// + public string CatalogVersion; + /// + /// Optional identifier for the Character that should receive the item. If null, item is added to the player + /// + public string CharacterId; + /// + /// Generated coupon code to redeem. + /// + public string CouponCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class RedeemCouponResult : PlayFabResultCommon + { + /// + /// Items granted to the player as a result of redeeming the coupon. + /// + public List GrantedItems; + } + + [Serializable] + public class RefreshPSNAuthTokenRequest : PlayFabRequestCommon + { + /// + /// Auth code returned by PlayStation :tm: Network OAuth system. + /// + public string AuthCode; + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code + /// + public string RedirectUri; + } + + /// + /// The steps to configure and send Push Notifications is described in the PlayFab tutorials, here: + /// https://docs.microsoft.com/gaming/playfab/features/engagement/push-notifications/quickstart + /// + [Serializable] + public class RegisterForIOSPushNotificationRequest : PlayFabRequestCommon + { + /// + /// Message to display when confirming push notification. + /// + public string ConfirmationMessage; + /// + /// Unique token generated by the Apple Push Notification service when the title registered to receive push notifications. + /// + public string DeviceToken; + /// + /// If true, send a test push message immediately after sucessful registration. Defaults to false. + /// + public bool? SendPushNotificationConfirmation; + } + + [Serializable] + public class RegisterForIOSPushNotificationResult : PlayFabResultCommon + { + } + + [Serializable] + public class RegisterPlayFabUserRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// An optional parameter for setting the display name for this title (3-25 characters). + /// + public string DisplayName; + /// + /// User email address attached to their account + /// + public string Email; + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Password for the PlayFab account (6-100 characters) + /// + public string Password; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// An optional parameter that specifies whether both the username and email parameters are required. If true, both + /// parameters are required; if false, the user must supply either the username or email parameter. The default value is + /// true. + /// + public bool? RequireBothUsernameAndEmail; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + /// + /// PlayFab username for the account (3-20 characters) + /// + public string Username; + } + + /// + /// Each account must have a unique email address in the PlayFab service. Once created, the account may be associated with + /// additional accounts (Steam, Facebook, Game Center, etc.), allowing for added social network lists and achievements + /// systems. + /// + [Serializable] + public class RegisterPlayFabUserResult : PlayFabLoginResultCommon + { + /// + /// If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and + /// returned. + /// + public EntityTokenResponse EntityToken; + /// + /// PlayFab unique identifier for this newly created account. + /// + public string PlayFabId; + /// + /// Unique token identifying the user and game at the server level, for the current session. + /// + public string SessionTicket; + /// + /// Settings specific to this user. + /// + public UserSettings SettingsForUser; + /// + /// PlayFab unique user name. + /// + public string Username; + } + + /// + /// This API removes an existing contact email from the player's profile. + /// + [Serializable] + public class RemoveContactEmailRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class RemoveContactEmailResult : PlayFabResultCommon + { + } + + [Serializable] + public class RemoveFriendRequest : PlayFabRequestCommon + { + /// + /// PlayFab identifier of the friend account which is to be removed. + /// + public string FriendPlayFabId; + } + + [Serializable] + public class RemoveFriendResult : PlayFabResultCommon + { + } + + [Serializable] + public class RemoveGenericIDRequest : PlayFabRequestCommon + { + /// + /// Generic service identifier to be removed from the player. + /// + public GenericServiceId GenericId; + } + + [Serializable] + public class RemoveGenericIDResult : PlayFabResultCommon + { + } + + [Serializable] + public class RemoveSharedGroupMembersRequest : PlayFabRequestCommon + { + /// + /// An array of unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public List PlayFabIds; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class RemoveSharedGroupMembersResult : PlayFabResultCommon + { + } + + /// + /// Report ad activity + /// + [Serializable] + public class ReportAdActivityRequest : PlayFabRequestCommon + { + /// + /// Type of activity, may be Opened, Closed, Start or End + /// + public AdActivity Activity; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique ID of the placement to report for + /// + public string PlacementId; + /// + /// Unique ID of the reward the player was offered + /// + public string RewardId; + } + + /// + /// Report ad activity response has no body + /// + [Serializable] + public class ReportAdActivityResult : PlayFabResultCommon + { + } + + [Serializable] + public class ReportPlayerClientRequest : PlayFabRequestCommon + { + /// + /// Optional additional comment by reporting player. + /// + public string Comment; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab identifier of the reported player. + /// + public string ReporteeId; + } + + /// + /// Players are currently limited to five reports per day. Attempts by a single user account to submit reports beyond five + /// will result in Updated being returned as false. + /// + [Serializable] + public class ReportPlayerClientResult : PlayFabResultCommon + { + /// + /// The number of remaining reports which may be filed today. + /// + public int SubmissionsRemaining; + } + + /// + /// The title should obtain a refresh receipt via restoreCompletedTransactions in the SKPaymentQueue of the Apple StoreKit + /// and pass that in to this call. The resultant receipt contains new receipt instances for all non-consumable goods + /// previously purchased by the user. This API call iterates through every purchase in the receipt and restores the items if + /// they still exist in the catalog and can be validated. + /// + [Serializable] + public class RestoreIOSPurchasesRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the restored items. If null, defaults to primary catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Base64 encoded receipt data, passed back by the App Store as a result of a successful purchase. + /// + public string ReceiptData; + } + + /// + /// Once verified, the valid items will be restored into the user's inventory. This result should be used for immediate + /// updates to the local client game state as opposed to the GetUserInventory API which can have an up to half second delay. + /// + [Serializable] + public class RestoreIOSPurchasesResult : PlayFabResultCommon + { + /// + /// Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. + /// + public List Fulfillments; + } + + /// + /// Details on which placement and reward to perform a grant on + /// + [Serializable] + public class RewardAdActivityRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Placement unique ID + /// + public string PlacementId; + /// + /// Reward unique ID + /// + public string RewardId; + } + + /// + /// Result for rewarding an ad activity + /// + [Serializable] + public class RewardAdActivityResult : PlayFabResultCommon + { + /// + /// PlayStream Event ID that was generated by this reward (all subsequent events are associated with this event identifier) + /// + public string AdActivityEventId; + /// + /// Debug results from the grants + /// + public List DebugResults; + /// + /// Id of the placement the reward was for + /// + public string PlacementId; + /// + /// Name of the placement the reward was for + /// + public string PlacementName; + /// + /// If placement has viewing limits indicates how many views are left + /// + public int? PlacementViewsRemaining; + /// + /// If placement has viewing limits indicates when they will next reset + /// + public double? PlacementViewsResetMinutes; + /// + /// Reward results + /// + public AdRewardResults RewardResults; + } + + [Serializable] + public class ScriptExecutionError : PlayFabBaseModel + { + /// + /// Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, + /// CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError + /// + public string Error; + /// + /// Details about the error + /// + public string Message; + /// + /// Point during the execution of the script at which the error occurred, if any + /// + public string StackTrace; + } + + /// + /// If the account in question is a "temporary" account (for example, one that was created via a call to + /// LoginFromIOSDeviceID), thisfunction will have no effect. Only PlayFab accounts which have valid email addresses will be + /// able to receive a password reset email using this API. + /// + [Serializable] + public class SendAccountRecoveryEmailRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// User email address attached to their account + /// + public string Email; + /// + /// The email template id of the account recovery email template to send. + /// + public string EmailTemplateId; + /// + /// Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + /// title has been selected. + /// + public string TitleId; + } + + [Serializable] + public class SendAccountRecoveryEmailResult : PlayFabResultCommon + { + } + + /// + /// This operation is not additive. It will completely replace the tag list for the specified user. Please note that only + /// users in the PlayFab friends list can be assigned tags. Attempting to set a tag on a friend only included in the friends + /// list from a social site integration (such as Facebook or Steam) will return the AccountNotFound error. + /// + [Serializable] + public class SetFriendTagsRequest : PlayFabRequestCommon + { + /// + /// PlayFab identifier of the friend account to which the tag(s) should be applied. + /// + public string FriendPlayFabId; + /// + /// Array of tags to set on the friend account. + /// + public List Tags; + } + + [Serializable] + public class SetFriendTagsResult : PlayFabResultCommon + { + } + + /// + /// APIs that require signatures require that the player have a configured Player Secret Key that is used to sign all + /// requests. Players that don't have a secret will be blocked from making API calls until it is configured. To create a + /// signature header add a SHA256 hashed string containing UTF8 encoded JSON body as it will be sent to the server, the + /// current time in UTC formatted to ISO 8601, and the players secret formatted as 'body.date.secret'. Place the resulting + /// hash into the header X-PlayFab-Signature, along with a header X-PlayFab-Timestamp of the same UTC timestamp used in the + /// signature. + /// + [Serializable] + public class SetPlayerSecretRequest : PlayFabRequestCommon + { + /// + /// Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + /// + public string EncryptedRequest; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + } + + [Serializable] + public class SetPlayerSecretResult : PlayFabResultCommon + { + } + + [Serializable] + public class SharedGroupDataRecord : PlayFabBaseModel + { + /// + /// Timestamp for when this data was last updated. + /// + public DateTime LastUpdated; + /// + /// Unique PlayFab identifier of the user to last update this value. + /// + public string LastUpdatedBy; + /// + /// Indicates whether this data can be read by all users (public) or only members of the group (private). + /// + public UserDataPermission? Permission; + /// + /// Data stored for the specified group data key. + /// + public string Value; + } + + public enum SourceType + { + Admin, + BackEnd, + GameClient, + GameServer, + Partner, + Custom, + API + } + + /// + /// This is the first step in the purchasing process. For security purposes, once the order (or "cart") has been created, + /// additional inventory objects may no longer be added. In addition, inventory objects will be locked to the current + /// prices, regardless of any subsequent changes at the catalog level which may occur during the next two steps. + /// + [Serializable] + public class StartPurchaseRequest : PlayFabRequestCommon + { + /// + /// Catalog version for the items to be purchased. Defaults to most recent catalog. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Array of items to purchase. + /// + public List Items; + /// + /// Store through which to purchase items. If not set, prices will be pulled from the catalog itself. + /// + public string StoreId; + } + + [Serializable] + public class StartPurchaseResult : PlayFabResultCommon + { + /// + /// Cart items to be purchased. + /// + public List Contents; + /// + /// Purchase order identifier. + /// + public string OrderId; + /// + /// Available methods by which the user can pay. + /// + public List PaymentOptions; + /// + /// Current virtual currency totals for the user. + /// + public Dictionary VirtualCurrencyBalances; + } + + [Serializable] + public class StatisticModel : PlayFabBaseModel + { + /// + /// Statistic name + /// + public string Name; + /// + /// Statistic value + /// + public int Value; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int Version; + } + + [Serializable] + public class StatisticNameVersion : PlayFabBaseModel + { + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// the version of the statistic to be returned + /// + public uint Version; + } + + [Serializable] + public class StatisticUpdate : PlayFabBaseModel + { + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// statistic value for the player + /// + public int Value; + /// + /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded. Null when + /// setting the statistic value for the first time. + /// + public uint? Version; + } + + [Serializable] + public class StatisticValue : PlayFabBaseModel + { + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// statistic value for the player + /// + public int Value; + /// + /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded + /// + public uint Version; + } + + [Serializable] + public class SteamPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam identifier. + /// + public string PlayFabId; + /// + /// Unique Steam identifier for a user. + /// + public string SteamStringId; + } + + /// + /// A store entry that list a catalog item at a particular price + /// + [Serializable] + public class StoreItem : PlayFabBaseModel + { + /// + /// Store specific custom data. The data only exists as part of this store; it is not transferred to item instances + /// + public object CustomData; + /// + /// Intended display position for this item. Note that 0 is the first position + /// + public uint? DisplayPosition; + /// + /// Unique identifier of the item as it exists in the catalog - note that this must exactly match the ItemId from the + /// catalog + /// + public string ItemId; + /// + /// Override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// Override prices for this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + /// + /// Marketing data about a specific store + /// + [Serializable] + public class StoreMarketingModel : PlayFabBaseModel + { + /// + /// Tagline for a store. + /// + public string Description; + /// + /// Display name of a store as it will appear to users. + /// + public string DisplayName; + /// + /// Custom data about a store. + /// + public object Metadata; + } + + [Serializable] + public class SubscriptionModel : PlayFabBaseModel + { + /// + /// When this subscription expires. + /// + public DateTime Expiration; + /// + /// The time the subscription was orignially purchased + /// + public DateTime InitialSubscriptionTime; + /// + /// Whether this subscription is currently active. That is, if Expiration > now. + /// + public bool IsActive; + /// + /// The status of this subscription, according to the subscription provider. + /// + public SubscriptionProviderStatus? Status; + /// + /// The id for this subscription + /// + public string SubscriptionId; + /// + /// The item id for this subscription from the primary catalog + /// + public string SubscriptionItemId; + /// + /// The provider for this subscription. Apple or Google Play are supported today. + /// + public string SubscriptionProvider; + } + + public enum SubscriptionProviderStatus + { + NoError, + Cancelled, + UnknownError, + BillingError, + ProductUnavailable, + CustomerDidNotAcceptPriceChange, + FreeTrial, + PaymentPending + } + + /// + /// This API must be enabled for use as an option in the game manager website. It is disabled by default. + /// + [Serializable] + public class SubtractUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be subtracted from the user balance of the specified virtual currency. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Name of the virtual currency which is to be decremented. + /// + public string VirtualCurrency; + } + + [Serializable] + public class TagModel : PlayFabBaseModel + { + /// + /// Full value of the tag, including namespace + /// + public string TagValue; + } + + public enum TitleActivationStatus + { + None, + ActivatedTitleKey, + PendingSteam, + ActivatedSteam, + RevokedSteam + } + + [Serializable] + public class TitleNewsItem : PlayFabBaseModel + { + /// + /// News item text. + /// + public string Body; + /// + /// Unique identifier of news item. + /// + public string NewsId; + /// + /// Date and time when the news item was posted. + /// + public DateTime Timestamp; + /// + /// Title of the news item. + /// + public string Title; + } + + [Serializable] + public class TradeInfo : PlayFabBaseModel + { + /// + /// Item instances from the accepting player that are used to fulfill the trade. If null, no one has accepted the trade. + /// + public List AcceptedInventoryInstanceIds; + /// + /// The PlayFab ID of the player who accepted the trade. If null, no one has accepted the trade. + /// + public string AcceptedPlayerId; + /// + /// An optional list of players allowed to complete this trade. If null, anybody can complete the trade. + /// + public List AllowedPlayerIds; + /// + /// If set, The UTC time when this trade was canceled. + /// + public DateTime? CancelledAt; + /// + /// If set, The UTC time when this trade was fulfilled. + /// + public DateTime? FilledAt; + /// + /// If set, The UTC time when this trade was made invalid. + /// + public DateTime? InvalidatedAt; + /// + /// The catalogItem Ids of the item instances being offered. + /// + public List OfferedCatalogItemIds; + /// + /// The itemInstance Ids that are being offered. + /// + public List OfferedInventoryInstanceIds; + /// + /// The PlayFabId for the offering player. + /// + public string OfferingPlayerId; + /// + /// The UTC time when this trade was created. + /// + public DateTime? OpenedAt; + /// + /// The catalogItem Ids requested in exchange. + /// + public List RequestedCatalogItemIds; + /// + /// Describes the current state of this trade. + /// + public TradeStatus? Status; + /// + /// The identifier for this trade. + /// + public string TradeId; + } + + public enum TradeStatus + { + Invalid, + Opening, + Open, + Accepting, + Accepted, + Filled, + Cancelled + } + + public enum TransactionStatus + { + CreateCart, + Init, + Approved, + Succeeded, + FailedByProvider, + DisputePending, + RefundPending, + Refunded, + RefundFailed, + ChargedBack, + FailedByUber, + FailedByPlayFab, + Revoked, + TradePending, + Traded, + Upgraded, + StackPending, + Stacked, + Other, + Failed + } + + [Serializable] + public class TreatmentAssignment : PlayFabBaseModel + { + /// + /// List of the experiment variables. + /// + public List Variables; + /// + /// List of the experiment variants. + /// + public List Variants; + } + + [Serializable] + public class TwitchPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Twitch identifier. + /// + public string PlayFabId; + /// + /// Unique Twitch identifier for a user. + /// + public string TwitchId; + } + + [Serializable] + public class UnlinkAndroidDeviceIDRequest : PlayFabRequestCommon + { + /// + /// Android device identifier for the user's device. If not specified, the most recently signed in Android Device ID will be + /// used. + /// + public string AndroidDeviceId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkAndroidDeviceIDResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkAppleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkCustomIDRequest : PlayFabRequestCommon + { + /// + /// Custom unique identifier for the user, generated by the title. If not specified, the most recently signed in Custom ID + /// will be used. + /// + public string CustomId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkCustomIDResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkFacebookAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkFacebookAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkFacebookInstantGamesIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Facebook Instant Games identifier for the user. If not specified, the most recently signed in ID will be used. + /// + public string FacebookInstantGamesId; + } + + [Serializable] + public class UnlinkFacebookInstantGamesIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkGameCenterAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkGameCenterAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkGoogleAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkGoogleAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkGooglePlayGamesServicesAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkGooglePlayGamesServicesAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkIOSDeviceIDRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Vendor-specific iOS identifier for the user's device. If not specified, the most recently signed in iOS Device ID will + /// be used. + /// + public string DeviceId; + } + + [Serializable] + public class UnlinkIOSDeviceIDResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkKongregateAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkKongregateAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkNintendoServiceAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkNintendoSwitchDeviceIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Nintendo Switch Device identifier for the user. If not specified, the most recently signed in device ID will be used. + /// + public string NintendoSwitchDeviceId; + } + + [Serializable] + public class UnlinkNintendoSwitchDeviceIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkOpenIdConnectRequest : PlayFabRequestCommon + { + /// + /// A name that identifies which configured OpenID Connect provider relationship to use. Maximum 100 characters. + /// + public string ConnectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkPSNAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkPSNAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkSteamAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkSteamAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkTwitchAccountRequest : PlayFabRequestCommon + { + /// + /// Valid token issued by Twitch. Used to specify which twitch account to unlink from the profile. By default it uses the + /// one that is present on the profile. + /// + public string AccessToken; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkTwitchAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkXboxAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UnlinkXboxAccountResult : PlayFabResultCommon + { + } + + /// + /// Specify the container and optionally the catalogVersion for the container to open + /// + [Serializable] + public class UnlockContainerInstanceRequest : PlayFabRequestCommon + { + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog + /// associated with the item instance. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// ItemInstanceId of the container to unlock. + /// + public string ContainerItemInstanceId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this + /// parameter is required. + /// + public string KeyItemInstanceId; + } + + /// + /// Specify the type of container to open and optionally the catalogVersion for the container to open + /// + [Serializable] + public class UnlockContainerItemRequest : PlayFabRequestCommon + { + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary + /// catalog. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Catalog ItemId of the container type to unlock. + /// + public string ContainerItemId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// The items and vc found within the container. These will be added and stacked in the appropriate inventory. + /// + [Serializable] + public class UnlockContainerItemResult : PlayFabResultCommon + { + /// + /// Items granted to the player as a result of unlocking the container. + /// + public List GrantedItems; + /// + /// Unique instance identifier of the container unlocked. + /// + public string UnlockedItemInstanceId; + /// + /// Unique instance identifier of the key used to unlock the container, if applicable. + /// + public string UnlockedWithItemInstanceId; + /// + /// Virtual currency granted to the player as a result of unlocking the container. + /// + public Dictionary VirtualCurrency; + } + + [Serializable] + public class UpdateAvatarUrlRequest : PlayFabRequestCommon + { + /// + /// URL of the avatar image. If empty, it removes the existing avatar URL. + /// + public string ImageUrl; + } + + /// + /// This function performs an additive update of the arbitrary strings containing the custom data for the character. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, while keys + /// with null values will be removed. New keys will be added, with the given values. No other key-value pairs will be + /// changed apart from those specified in the call. + /// + [Serializable] + public class UpdateCharacterDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set. + /// + public UserDataPermission? Permission; + } + + [Serializable] + public class UpdateCharacterDataResult : PlayFabResultCommon + { + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + /// + /// Enable this option with the 'Allow Client to Post Player Statistics' option in PlayFab GameManager for your title. + /// However, this is not best practice, as this data will no longer be safely controlled by the server. This operation is + /// additive. Character Statistics not currently defined will be added, while those already defined will be updated with the + /// given values. All other user statistics will remain unchanged. Character statistics are used by the + /// character-leaderboard apis, and accessible for custom game-logic. + /// + [Serializable] + public class UpdateCharacterStatisticsRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Statistics to be updated with the provided values, in the Key(string), Value(int) pattern. + /// + public Dictionary CharacterStatistics; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UpdateCharacterStatisticsResult : PlayFabResultCommon + { + } + + /// + /// Enable this option with the 'Allow Client to Post Player Statistics' option in PlayFab GameManager for your title. + /// However, this is not best practice, as this data will no longer be safely controlled by the server. This operation is + /// additive. Statistics not currently defined will be added, while those already defined will be updated with the given + /// values. All other user statistics will remain unchanged. Note that if the statistic is intended to have a reset period, + /// the UpdatePlayerStatisticDefinition API call can be used to define that reset period. Once a statistic has been + /// versioned (reset), the now-previous version can still be written to for up a short, pre-defined period (currently 10 + /// seconds), using the Version parameter in this call. + /// + [Serializable] + public class UpdatePlayerStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Statistics to be updated with the provided values + /// + public List Statistics; + } + + [Serializable] + public class UpdatePlayerStatisticsResult : PlayFabResultCommon + { + } + + /// + /// Note that in the case of multiple calls to write to the same shared group data keys, the last write received by the + /// PlayFab service will determine the value available to subsequent read operations. For scenarios requiring coordination + /// of data updates, it is recommended that titles make use of user data with read permission set to public, or a + /// combination of user data and shared group data. + /// + [Serializable] + public class UpdateSharedGroupDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys in this request. + /// + public UserDataPermission? Permission; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class UpdateSharedGroupDataResult : PlayFabResultCommon + { + } + + /// + /// This function performs an additive update of the arbitrary strings containing the custom data for the user. In updating + /// the custom data object, keys which already exist in the object will have their values overwritten, while keys with null + /// values will be removed. New keys will be added, with the given values. No other key-value pairs will be changed apart + /// from those specified in the call. + /// + [Serializable] + public class UpdateUserDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set. This is used + /// for requests by one player for information about another player; those requests will only return Public keys. + /// + public UserDataPermission? Permission; + } + + [Serializable] + public class UpdateUserDataResult : PlayFabResultCommon + { + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + /// + /// In addition to the PlayFab username, titles can make use of a DisplayName which is also a unique identifier, but + /// specific to the title. This allows for unique names which more closely match the theme or genre of a title, for example. + /// + [Serializable] + public class UpdateUserTitleDisplayNameRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// New title display name for the user - must be between 3 and 25 characters. + /// + public string DisplayName; + } + + [Serializable] + public class UpdateUserTitleDisplayNameResult : PlayFabResultCommon + { + /// + /// Current title display name for the user (this will be the original display name if the rename attempt failed). + /// + public string DisplayName; + } + + [Serializable] + public class UserAccountInfo : PlayFabBaseModel + { + /// + /// User Android device information, if an Android device has been linked + /// + public UserAndroidDeviceInfo AndroidDeviceInfo; + /// + /// Sign in with Apple account information, if an Apple account has been linked + /// + public UserAppleIdInfo AppleAccountInfo; + /// + /// Timestamp indicating when the user account was created + /// + public DateTime Created; + /// + /// Custom ID information, if a custom ID has been assigned + /// + public UserCustomIdInfo CustomIdInfo; + /// + /// User Facebook information, if a Facebook account has been linked + /// + public UserFacebookInfo FacebookInfo; + /// + /// Facebook Instant Games account information, if a Facebook Instant Games account has been linked + /// + public UserFacebookInstantGamesIdInfo FacebookInstantGamesIdInfo; + /// + /// User Gamecenter information, if a Gamecenter account has been linked + /// + public UserGameCenterInfo GameCenterInfo; + /// + /// User Google account information, if a Google account has been linked + /// + public UserGoogleInfo GoogleInfo; + /// + /// User Google Play Games account information, if a Google Play Games account has been linked + /// + public UserGooglePlayGamesInfo GooglePlayGamesInfo; + /// + /// User iOS device information, if an iOS device has been linked + /// + public UserIosDeviceInfo IosDeviceInfo; + /// + /// User Kongregate account information, if a Kongregate account has been linked + /// + public UserKongregateInfo KongregateInfo; + /// + /// Nintendo Switch account information, if a Nintendo Switch account has been linked + /// + public UserNintendoSwitchAccountIdInfo NintendoSwitchAccountInfo; + /// + /// Nintendo Switch device information, if a Nintendo Switch device has been linked + /// + public UserNintendoSwitchDeviceIdInfo NintendoSwitchDeviceIdInfo; + /// + /// OpenID Connect information, if any OpenID Connect accounts have been linked + /// + public List OpenIdInfo; + /// + /// Unique identifier for the user account + /// + public string PlayFabId; + /// + /// Personal information for the user which is considered more sensitive + /// + public UserPrivateAccountInfo PrivateInfo; + /// + /// User PlayStation :tm: Network account information, if a PlayStation :tm: Network account has been linked + /// + public UserPsnInfo PsnInfo; + /// + /// Server Custom ID information, if a server custom ID has been assigned + /// + public UserServerCustomIdInfo ServerCustomIdInfo; + /// + /// User Steam information, if a Steam account has been linked + /// + public UserSteamInfo SteamInfo; + /// + /// Title-specific information for the user account + /// + public UserTitleInfo TitleInfo; + /// + /// User Twitch account information, if a Twitch account has been linked + /// + public UserTwitchInfo TwitchInfo; + /// + /// User account name in the PlayFab service + /// + public string Username; + /// + /// User XBox account information, if a XBox account has been linked + /// + public UserXboxInfo XboxInfo; + } + + [Serializable] + public class UserAndroidDeviceInfo : PlayFabBaseModel + { + /// + /// Android device ID + /// + public string AndroidDeviceId; + } + + [Serializable] + public class UserAppleIdInfo : PlayFabBaseModel + { + /// + /// Apple subject ID + /// + public string AppleSubjectId; + } + + [Serializable] + public class UserCustomIdInfo : PlayFabBaseModel + { + /// + /// Custom ID + /// + public string CustomId; + } + + /// + /// Indicates whether a given data key is private (readable only by the player) or public (readable by all players). When a + /// player makes a GetUserData request about another player, only keys marked Public will be returned. + /// + public enum UserDataPermission + { + Private, + Public + } + + [Serializable] + public class UserDataRecord : PlayFabBaseModel + { + /// + /// Timestamp for when this data was last updated. + /// + public DateTime LastUpdated; + /// + /// Indicates whether this data can be read by all users (public) or only the user (private). This is used for GetUserData + /// requests being made by one player about another player. + /// + public UserDataPermission? Permission; + /// + /// Data stored for the specified user data key. + /// + public string Value; + } + + [Serializable] + public class UserFacebookInfo : PlayFabBaseModel + { + /// + /// Facebook identifier + /// + public string FacebookId; + /// + /// Facebook full name + /// + public string FullName; + } + + [Serializable] + public class UserFacebookInstantGamesIdInfo : PlayFabBaseModel + { + /// + /// Facebook Instant Games ID + /// + public string FacebookInstantGamesId; + } + + [Serializable] + public class UserGameCenterInfo : PlayFabBaseModel + { + /// + /// Gamecenter identifier + /// + public string GameCenterId; + } + + [Serializable] + public class UserGoogleInfo : PlayFabBaseModel + { + /// + /// Email address of the Google account + /// + public string GoogleEmail; + /// + /// Gender information of the Google account + /// + public string GoogleGender; + /// + /// Google ID + /// + public string GoogleId; + /// + /// Locale of the Google account + /// + public string GoogleLocale; + /// + /// Name of the Google account user + /// + public string GoogleName; + } + + [Serializable] + public class UserGooglePlayGamesInfo : PlayFabBaseModel + { + /// + /// Avatar image url of the Google Play Games player + /// + public string GooglePlayGamesPlayerAvatarImageUrl; + /// + /// Display name of the Google Play Games player + /// + public string GooglePlayGamesPlayerDisplayName; + /// + /// Google Play Games player ID + /// + public string GooglePlayGamesPlayerId; + } + + [Serializable] + public class UserIosDeviceInfo : PlayFabBaseModel + { + /// + /// iOS device ID + /// + public string IosDeviceId; + } + + [Serializable] + public class UserKongregateInfo : PlayFabBaseModel + { + /// + /// Kongregate ID + /// + public string KongregateId; + /// + /// Kongregate Username + /// + public string KongregateName; + } + + [Serializable] + public class UserNintendoSwitchAccountIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch account subject ID + /// + public string NintendoSwitchAccountSubjectId; + } + + [Serializable] + public class UserNintendoSwitchDeviceIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch Device ID + /// + public string NintendoSwitchDeviceId; + } + + [Serializable] + public class UserOpenIdInfo : PlayFabBaseModel + { + /// + /// OpenID Connection ID + /// + public string ConnectionId; + /// + /// OpenID Issuer + /// + public string Issuer; + /// + /// OpenID Subject + /// + public string Subject; + } + + public enum UserOrigination + { + Organic, + Steam, + Google, + Amazon, + Facebook, + Kongregate, + GamersFirst, + Unknown, + IOS, + LoadTest, + Android, + PSN, + GameCenter, + CustomId, + XboxLive, + Parse, + Twitch, + ServerCustomId, + NintendoSwitchDeviceId, + FacebookInstantGamesId, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + [Serializable] + public class UserPrivateAccountInfo : PlayFabBaseModel + { + /// + /// user email address + /// + public string Email; + } + + [Serializable] + public class UserPsnInfo : PlayFabBaseModel + { + /// + /// PlayStation :tm: Network account ID + /// + public string PsnAccountId; + /// + /// PlayStation :tm: Network online ID + /// + public string PsnOnlineId; + } + + [Serializable] + public class UserServerCustomIdInfo : PlayFabBaseModel + { + /// + /// Custom ID + /// + public string CustomId; + } + + [Serializable] + public class UserSettings : PlayFabBaseModel + { + /// + /// Boolean for whether this player is eligible for gathering device info. + /// + public bool GatherDeviceInfo; + /// + /// Boolean for whether this player should report OnFocus play-time tracking. + /// + public bool GatherFocusInfo; + /// + /// Boolean for whether this player is eligible for ad tracking. + /// + public bool NeedsAttribution; + } + + [Serializable] + public class UserSteamInfo : PlayFabBaseModel + { + /// + /// what stage of game ownership the user is listed as being in, from Steam + /// + public TitleActivationStatus? SteamActivationStatus; + /// + /// the country in which the player resides, from Steam data + /// + public string SteamCountry; + /// + /// currency type set in the user Steam account + /// + public Currency? SteamCurrency; + /// + /// Steam identifier + /// + public string SteamId; + /// + /// Steam display name + /// + public string SteamName; + } + + [Serializable] + public class UserTitleInfo : PlayFabBaseModel + { + /// + /// URL to the player's avatar. + /// + public string AvatarUrl; + /// + /// timestamp indicating when the user was first associated with this game (this can differ significantly from when the user + /// first registered with PlayFab) + /// + public DateTime Created; + /// + /// name of the user, as it is displayed in-game + /// + public string DisplayName; + /// + /// timestamp indicating when the user first signed into this game (this can differ from the Created timestamp, as other + /// events, such as issuing a beta key to the user, can associate the title to the user) + /// + public DateTime? FirstLogin; + /// + /// boolean indicating whether or not the user is currently banned for a title + /// + public bool? isBanned; + /// + /// timestamp for the last user login for this title + /// + public DateTime? LastLogin; + /// + /// source by which the user first joined the game, if known + /// + public UserOrigination? Origination; + /// + /// Title player account entity for this user + /// + public EntityKey TitlePlayerAccount; + } + + [Serializable] + public class UserTwitchInfo : PlayFabBaseModel + { + /// + /// Twitch ID + /// + public string TwitchId; + /// + /// Twitch Username + /// + public string TwitchUserName; + } + + [Serializable] + public class UserXboxInfo : PlayFabBaseModel + { + /// + /// XBox user ID + /// + public string XboxUserId; + /// + /// XBox user sandbox + /// + public string XboxUserSandbox; + } + + [Serializable] + public class ValidateAmazonReceiptRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the fulfilled items. If null, defaults to the primary catalog. + /// + public string CatalogVersion; + /// + /// Currency used to pay for the purchase (ISO 4217 currency code). + /// + public string CurrencyCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Amount of the stated currency paid, in centesimal units. + /// + public int PurchasePrice; + /// + /// ReceiptId returned by the Amazon App Store in-app purchase API + /// + public string ReceiptId; + /// + /// AmazonId of the user making the purchase as returned by the Amazon App Store in-app purchase API + /// + public string UserId; + } + + /// + /// Once verified, the catalog item matching the Amazon item name will be added to the user's inventory. This result should + /// be used for immediate updates to the local client game state as opposed to the GetUserInventory API which can have an up + /// to half second delay. + /// + [Serializable] + public class ValidateAmazonReceiptResult : PlayFabResultCommon + { + /// + /// Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. + /// + public List Fulfillments; + } + + /// + /// The packageName and productId are defined in the GooglePlay store. The productId must match the ItemId of the inventory + /// item in the PlayFab catalog for the title. This enables the PlayFab service to securely validate that the purchase is + /// for the correct item, in order to prevent uses from passing valid receipts as being for more expensive items (passing a + /// receipt for a 99-cent purchase as being for a $19.99 purchase, for example). Each receipt may be validated only once to + /// avoid granting the same item over and over from a single purchase. + /// + [Serializable] + public class ValidateGooglePlayPurchaseRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the fulfilled items. If null, defaults to the primary catalog. + /// + public string CatalogVersion; + /// + /// Currency used to pay for the purchase (ISO 4217 currency code). + /// + public string CurrencyCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Amount of the stated currency paid, in centesimal units. + /// + public uint? PurchasePrice; + /// + /// Original JSON string returned by the Google Play IAB API. + /// + public string ReceiptJson; + /// + /// Signature returned by the Google Play IAB API. + /// + public string Signature; + } + + /// + /// Once verified, the catalog item (ItemId) matching the GooglePlay store item (productId) will be added to the user's + /// inventory. This result should be used for immediate updates to the local client game state as opposed to the + /// GetUserInventory API which can have an up to half second delay. + /// + [Serializable] + public class ValidateGooglePlayPurchaseResult : PlayFabResultCommon + { + /// + /// Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. + /// + public List Fulfillments; + } + + /// + /// The CurrencyCode and PurchasePrice must match the price which was set up for the item in the Apple store. In addition, + /// The ItemId of the inventory in the PlayFab Catalog must match the Product ID as it was set up in the Apple store. This + /// enables the PlayFab service to securely validate that the purchase is for the correct item, in order to prevent uses + /// from passing valid receipts as being for more expensive items (passing a receipt for a 99-cent purchase as being for a + /// $19.99 purchase, for example). + /// + [Serializable] + public class ValidateIOSReceiptRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the fulfilled items. If null, defaults to the primary catalog. + /// + public string CatalogVersion; + /// + /// Currency used to pay for the purchase (ISO 4217 currency code). + /// + public string CurrencyCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Amount of the stated currency paid, in centesimal units. + /// + public int PurchasePrice; + /// + /// Base64 encoded receipt data, passed back by the App Store as a result of a successful purchase. + /// + public string ReceiptData; + } + + /// + /// Once verified, the catalog item matching the iTunes item name will be added to the user's inventory. This result should + /// be used for immediate updates to the local client game state as opposed to the GetUserInventory API which can have an up + /// to half second delay. + /// + [Serializable] + public class ValidateIOSReceiptResult : PlayFabResultCommon + { + /// + /// Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. + /// + public List Fulfillments; + } + + [Serializable] + public class ValidateWindowsReceiptRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the fulfilled items. If null, defaults to the primary catalog. + /// + public string CatalogVersion; + /// + /// Currency used to pay for the purchase (ISO 4217 currency code). + /// + public string CurrencyCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Amount of the stated currency paid, in centesimal units. + /// + public uint PurchasePrice; + /// + /// XML Receipt returned by the Windows App Store in-app purchase API + /// + public string Receipt; + } + + /// + /// Once verified, the catalog item matching the Product name will be added to the user's inventory. This result should be + /// used for immediate updates to the local client game state as opposed to the GetUserInventory API which can have an up to + /// half second delay. + /// + [Serializable] + public class ValidateWindowsReceiptResult : PlayFabResultCommon + { + /// + /// Fulfilled inventory items and recorded purchases in fulfillment of the validated receipt transactions. + /// + public List Fulfillments; + } + + [Serializable] + public class ValueToDateModel : PlayFabBaseModel + { + /// + /// ISO 4217 code of the currency used in the purchases + /// + public string Currency; + /// + /// Total value of the purchases in a whole number of 1/100 monetary units. For example, 999 indicates nine dollars and + /// ninety-nine cents when Currency is 'USD') + /// + public uint TotalValue; + /// + /// Total value of the purchases in a string representation of decimal monetary units. For example, '9.99' indicates nine + /// dollars and ninety-nine cents when Currency is 'USD'. + /// + public string TotalValueAsDecimal; + } + + [Serializable] + public class Variable : PlayFabBaseModel + { + /// + /// Name of the variable. + /// + public string Name; + /// + /// Value of the variable. + /// + public string Value; + } + + [Serializable] + public class VirtualCurrencyRechargeTime : PlayFabBaseModel + { + /// + /// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value + /// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen + /// below this value. + /// + public int RechargeMax; + /// + /// Server timestamp in UTC indicating the next time the virtual currency will be incremented. + /// + public DateTime RechargeTime; + /// + /// Time remaining (in seconds) before the next recharge increment of the virtual currency. + /// + public int SecondsToRecharge; + } + + /// + /// This API is designed to write a multitude of different client-defined events into PlayStream. It supports a flexible + /// JSON schema, which allowsfor arbitrary key-value pairs to describe any character-based event. The created event will be + /// locked to the authenticated title and player. + /// + [Serializable] + public class WriteClientCharacterEventRequest : PlayFabRequestCommon + { + /// + /// Custom event properties. Each property consists of a name (string) and a value (JSON object). + /// + public Dictionary Body; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it + /// commonly follows the subject_verb_object pattern (e.g. player_logged_in). + /// + public string EventName; + /// + /// The time (in UTC) associated with this event. The value defaults to the current time. + /// + public DateTime? Timestamp; + } + + /// + /// This API is designed to write a multitude of different event types into PlayStream. It supports a flexible JSON schema, + /// which allowsfor arbitrary key-value pairs to describe any player-based event. The created event will be locked to the + /// authenticated title and player. + /// + [Serializable] + public class WriteClientPlayerEventRequest : PlayFabRequestCommon + { + /// + /// Custom data properties associated with the event. Each property consists of a name (string) and a value (JSON object). + /// + public Dictionary Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it + /// commonly follows the subject_verb_object pattern (e.g. player_logged_in). + /// + public string EventName; + /// + /// The time (in UTC) associated with this event. The value defaults to the current time. + /// + public DateTime? Timestamp; + } + + [Serializable] + public class WriteEventResponse : PlayFabResultCommon + { + /// + /// The unique identifier of the event. The values of this identifier consist of ASCII characters and are not constrained to + /// any particular format. + /// + public string EventId; + } + + /// + /// This API is designed to write a multitude of different client-defined events into PlayStream. It supports a flexible + /// JSON schema, which allowsfor arbitrary key-value pairs to describe any title-based event. The created event will be + /// locked to the authenticated title. + /// + [Serializable] + public class WriteTitleEventRequest : PlayFabRequestCommon + { + /// + /// Custom event properties. Each property consists of a name (string) and a value (JSON object). + /// + public Dictionary Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it + /// commonly follows the subject_verb_object pattern (e.g. player_logged_in). + /// + public string EventName; + /// + /// The time (in UTC) associated with this event. The value defaults to the current time. + /// + public DateTime? Timestamp; + } + + [Serializable] + public class XboxLiveAccountPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Xbox Live identifier. + /// + public string PlayFabId; + /// + /// Unique Xbox Live identifier for a user. + /// + public string XboxLiveAccountId; + } +} +#endif diff --git a/Assets/PlayFabSDK/Client/PlayFabClientModels.cs.meta b/Assets/PlayFabSDK/Client/PlayFabClientModels.cs.meta new file mode 100644 index 00000000..e89f150a --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabClientModels.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3a0a4ef9b600e6540b14561880293235 +timeCreated: 1468524875 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client/PlayFabDeviceUtil.cs b/Assets/PlayFabSDK/Client/PlayFabDeviceUtil.cs new file mode 100644 index 00000000..0c073966 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabDeviceUtil.cs @@ -0,0 +1,109 @@ +#if !DISABLE_PLAYFABCLIENT_API +using System.Collections.Generic; +using PlayFab.SharedModels; +using UnityEngine; + +namespace PlayFab.Internal +{ + public static class PlayFabDeviceUtil + { + private static bool _needsAttribution, _gatherDeviceInfo, _gatherScreenTime; + + #region Scrape Device Info + private static void SendDeviceInfoToPlayFab(PlayFabApiSettings settings, IPlayFabInstanceApi instanceApi) + { + if (settings.DisableDeviceInfo || !_gatherDeviceInfo) return; + + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var request = new ClientModels.DeviceInfoRequest + { + Info = serializer.DeserializeObject>(serializer.SerializeObject(new PlayFabDataGatherer())) + }; + var clientInstanceApi = instanceApi as PlayFabClientInstanceAPI; + if (clientInstanceApi != null) + clientInstanceApi.ReportDeviceInfo(request, null, OnGatherFail, settings); +#if !DISABLE_PLAYFAB_STATIC_API + else + PlayFabClientAPI.ReportDeviceInfo(request, null, OnGatherFail, settings); +#endif + } + private static void OnGatherFail(PlayFabError error) + { + Debug.Log("OnGatherFail: " + error.GenerateErrorReport()); + } + #endregion + + /// + /// When a PlayFab login occurs, check the result information, and + /// relay it to _OnPlayFabLogin where the information is used + /// + /// + public static void OnPlayFabLogin(PlayFabResultCommon result, PlayFabApiSettings settings, IPlayFabInstanceApi instanceApi) + { + var loginResult = result as ClientModels.LoginResult; + var registerResult = result as ClientModels.RegisterPlayFabUserResult; + if (loginResult == null && registerResult == null) + return; + + // Gather things common to the result types + ClientModels.UserSettings settingsForUser = null; + string playFabId = null; + string entityId = null; + string entityType = null; + + if (loginResult != null) + { + settingsForUser = loginResult.SettingsForUser; + playFabId = loginResult.PlayFabId; + if (loginResult.EntityToken != null) + { + entityId = loginResult.EntityToken.Entity.Id; + entityType = loginResult.EntityToken.Entity.Type; + } + } + else if (registerResult != null) + { + settingsForUser = registerResult.SettingsForUser; + playFabId = registerResult.PlayFabId; + if (registerResult.EntityToken != null) + { + entityId = registerResult.EntityToken.Entity.Id; + entityType = registerResult.EntityToken.Entity.Type; + } + } + + _OnPlayFabLogin(settingsForUser, playFabId, entityId, entityType, settings, instanceApi); + } + + /// + /// Separated from OnPlayFabLogin, to explicitly lose the refs to loginResult and registerResult, because + /// only one will be defined, but both usually have all the information we REALLY need here. + /// But the result signatures are different and clunky, so do the separation above, and processing here + /// + private static void _OnPlayFabLogin(ClientModels.UserSettings settingsForUser, string playFabId, string entityId, string entityType, PlayFabApiSettings settings, IPlayFabInstanceApi instanceApi) + { + _needsAttribution = _gatherDeviceInfo = _gatherScreenTime = false; + if (settingsForUser != null) + { + _needsAttribution = settingsForUser.NeedsAttribution; + _gatherDeviceInfo = settingsForUser.GatherDeviceInfo; + _gatherScreenTime = settingsForUser.GatherFocusInfo; + } + + // Device information gathering + SendDeviceInfoToPlayFab(settings, instanceApi); + +#if !DISABLE_PLAYFABENTITY_API + if (!string.IsNullOrEmpty(entityId) && !string.IsNullOrEmpty(entityType) && _gatherScreenTime) + { + PlayFabHttp.InitializeScreenTimeTracker(entityId, entityType, playFabId); + } + else + { + settings.DisableFocusTimeCollection = true; + } +#endif + } + } +} +#endif diff --git a/Assets/PlayFabSDK/Client/PlayFabDeviceUtil.cs.meta b/Assets/PlayFabSDK/Client/PlayFabDeviceUtil.cs.meta new file mode 100644 index 00000000..c17526e9 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabDeviceUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd4190ddf909a304eb43068a0caea903 +timeCreated: 1494526811 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Client/PlayFabEvents.cs b/Assets/PlayFabSDK/Client/PlayFabEvents.cs new file mode 100644 index 00000000..49048a3c --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabEvents.cs @@ -0,0 +1,321 @@ +#if !DISABLE_PLAYFABCLIENT_API +using PlayFab.ClientModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabResultEvent OnLoginResultEvent; + + public event PlayFabRequestEvent OnAcceptTradeRequestEvent; + public event PlayFabResultEvent OnAcceptTradeResultEvent; + public event PlayFabRequestEvent OnAddFriendRequestEvent; + public event PlayFabResultEvent OnAddFriendResultEvent; + public event PlayFabRequestEvent OnAddGenericIDRequestEvent; + public event PlayFabResultEvent OnAddGenericIDResultEvent; + public event PlayFabRequestEvent OnAddOrUpdateContactEmailRequestEvent; + public event PlayFabResultEvent OnAddOrUpdateContactEmailResultEvent; + public event PlayFabRequestEvent OnAddSharedGroupMembersRequestEvent; + public event PlayFabResultEvent OnAddSharedGroupMembersResultEvent; + public event PlayFabRequestEvent OnAddUsernamePasswordRequestEvent; + public event PlayFabResultEvent OnAddUsernamePasswordResultEvent; + public event PlayFabRequestEvent OnAddUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnAddUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnAndroidDevicePushNotificationRegistrationRequestEvent; + public event PlayFabResultEvent OnAndroidDevicePushNotificationRegistrationResultEvent; + public event PlayFabRequestEvent OnAttributeInstallRequestEvent; + public event PlayFabResultEvent OnAttributeInstallResultEvent; + public event PlayFabRequestEvent OnCancelTradeRequestEvent; + public event PlayFabResultEvent OnCancelTradeResultEvent; + public event PlayFabRequestEvent OnConfirmPurchaseRequestEvent; + public event PlayFabResultEvent OnConfirmPurchaseResultEvent; + public event PlayFabRequestEvent OnConsumeItemRequestEvent; + public event PlayFabResultEvent OnConsumeItemResultEvent; + public event PlayFabRequestEvent OnConsumeMicrosoftStoreEntitlementsRequestEvent; + public event PlayFabResultEvent OnConsumeMicrosoftStoreEntitlementsResultEvent; + public event PlayFabRequestEvent OnConsumePS5EntitlementsRequestEvent; + public event PlayFabResultEvent OnConsumePS5EntitlementsResultEvent; + public event PlayFabRequestEvent OnConsumePSNEntitlementsRequestEvent; + public event PlayFabResultEvent OnConsumePSNEntitlementsResultEvent; + public event PlayFabRequestEvent OnConsumeXboxEntitlementsRequestEvent; + public event PlayFabResultEvent OnConsumeXboxEntitlementsResultEvent; + public event PlayFabRequestEvent OnCreateSharedGroupRequestEvent; + public event PlayFabResultEvent OnCreateSharedGroupResultEvent; + public event PlayFabRequestEvent OnExecuteCloudScriptRequestEvent; + public event PlayFabResultEvent OnExecuteCloudScriptResultEvent; + public event PlayFabRequestEvent OnGetAccountInfoRequestEvent; + public event PlayFabResultEvent OnGetAccountInfoResultEvent; + public event PlayFabRequestEvent OnGetAdPlacementsRequestEvent; + public event PlayFabResultEvent OnGetAdPlacementsResultEvent; + public event PlayFabRequestEvent OnGetAllUsersCharactersRequestEvent; + public event PlayFabResultEvent OnGetAllUsersCharactersResultEvent; + public event PlayFabRequestEvent OnGetCatalogItemsRequestEvent; + public event PlayFabResultEvent OnGetCatalogItemsResultEvent; + public event PlayFabRequestEvent OnGetCharacterDataRequestEvent; + public event PlayFabResultEvent OnGetCharacterDataResultEvent; + public event PlayFabRequestEvent OnGetCharacterInventoryRequestEvent; + public event PlayFabResultEvent OnGetCharacterInventoryResultEvent; + public event PlayFabRequestEvent OnGetCharacterLeaderboardRequestEvent; + public event PlayFabResultEvent OnGetCharacterLeaderboardResultEvent; + public event PlayFabRequestEvent OnGetCharacterReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnGetCharacterReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnGetCharacterStatisticsRequestEvent; + public event PlayFabResultEvent OnGetCharacterStatisticsResultEvent; + public event PlayFabRequestEvent OnGetContentDownloadUrlRequestEvent; + public event PlayFabResultEvent OnGetContentDownloadUrlResultEvent; + public event PlayFabRequestEvent OnGetFriendLeaderboardRequestEvent; + public event PlayFabResultEvent OnGetFriendLeaderboardResultEvent; + public event PlayFabRequestEvent OnGetFriendLeaderboardAroundPlayerRequestEvent; + public event PlayFabResultEvent OnGetFriendLeaderboardAroundPlayerResultEvent; + public event PlayFabRequestEvent OnGetFriendsListRequestEvent; + public event PlayFabResultEvent OnGetFriendsListResultEvent; + public event PlayFabRequestEvent OnGetLeaderboardRequestEvent; + public event PlayFabResultEvent OnGetLeaderboardResultEvent; + public event PlayFabRequestEvent OnGetLeaderboardAroundCharacterRequestEvent; + public event PlayFabResultEvent OnGetLeaderboardAroundCharacterResultEvent; + public event PlayFabRequestEvent OnGetLeaderboardAroundPlayerRequestEvent; + public event PlayFabResultEvent OnGetLeaderboardAroundPlayerResultEvent; + public event PlayFabRequestEvent OnGetLeaderboardForUserCharactersRequestEvent; + public event PlayFabResultEvent OnGetLeaderboardForUserCharactersResultEvent; + public event PlayFabRequestEvent OnGetPaymentTokenRequestEvent; + public event PlayFabResultEvent OnGetPaymentTokenResultEvent; + public event PlayFabRequestEvent OnGetPhotonAuthenticationTokenRequestEvent; + public event PlayFabResultEvent OnGetPhotonAuthenticationTokenResultEvent; + public event PlayFabRequestEvent OnGetPlayerCombinedInfoRequestEvent; + public event PlayFabResultEvent OnGetPlayerCombinedInfoResultEvent; + public event PlayFabRequestEvent OnGetPlayerProfileRequestEvent; + public event PlayFabResultEvent OnGetPlayerProfileResultEvent; + public event PlayFabRequestEvent OnGetPlayerSegmentsRequestEvent; + public event PlayFabResultEvent OnGetPlayerSegmentsResultEvent; + public event PlayFabRequestEvent OnGetPlayerStatisticsRequestEvent; + public event PlayFabResultEvent OnGetPlayerStatisticsResultEvent; + public event PlayFabRequestEvent OnGetPlayerStatisticVersionsRequestEvent; + public event PlayFabResultEvent OnGetPlayerStatisticVersionsResultEvent; + public event PlayFabRequestEvent OnGetPlayerTagsRequestEvent; + public event PlayFabResultEvent OnGetPlayerTagsResultEvent; + public event PlayFabRequestEvent OnGetPlayerTradesRequestEvent; + public event PlayFabResultEvent OnGetPlayerTradesResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromFacebookIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromFacebookIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromGameCenterIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromGameCenterIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromGenericIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromGenericIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromGoogleIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromGoogleIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromKongregateIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromKongregateIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromPSNAccountIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromPSNAccountIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromPSNOnlineIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromPSNOnlineIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromSteamIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromSteamIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromTwitchIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromTwitchIDsResultEvent; + public event PlayFabRequestEvent OnGetPlayFabIDsFromXboxLiveIDsRequestEvent; + public event PlayFabResultEvent OnGetPlayFabIDsFromXboxLiveIDsResultEvent; + public event PlayFabRequestEvent OnGetPublisherDataRequestEvent; + public event PlayFabResultEvent OnGetPublisherDataResultEvent; + public event PlayFabRequestEvent OnGetPurchaseRequestEvent; + public event PlayFabResultEvent OnGetPurchaseResultEvent; + public event PlayFabRequestEvent OnGetSharedGroupDataRequestEvent; + public event PlayFabResultEvent OnGetSharedGroupDataResultEvent; + public event PlayFabRequestEvent OnGetStoreItemsRequestEvent; + public event PlayFabResultEvent OnGetStoreItemsResultEvent; + public event PlayFabRequestEvent OnGetTimeRequestEvent; + public event PlayFabResultEvent OnGetTimeResultEvent; + public event PlayFabRequestEvent OnGetTitleDataRequestEvent; + public event PlayFabResultEvent OnGetTitleDataResultEvent; + public event PlayFabRequestEvent OnGetTitleNewsRequestEvent; + public event PlayFabResultEvent OnGetTitleNewsResultEvent; + public event PlayFabRequestEvent OnGetTitlePublicKeyRequestEvent; + public event PlayFabResultEvent OnGetTitlePublicKeyResultEvent; + public event PlayFabRequestEvent OnGetTradeStatusRequestEvent; + public event PlayFabResultEvent OnGetTradeStatusResultEvent; + public event PlayFabRequestEvent OnGetUserDataRequestEvent; + public event PlayFabResultEvent OnGetUserDataResultEvent; + public event PlayFabRequestEvent OnGetUserInventoryRequestEvent; + public event PlayFabResultEvent OnGetUserInventoryResultEvent; + public event PlayFabRequestEvent OnGetUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnGetUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnGetUserPublisherReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnGetUserPublisherReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnGetUserReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnGetUserReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnGrantCharacterToUserRequestEvent; + public event PlayFabResultEvent OnGrantCharacterToUserResultEvent; + public event PlayFabRequestEvent OnLinkAndroidDeviceIDRequestEvent; + public event PlayFabResultEvent OnLinkAndroidDeviceIDResultEvent; + public event PlayFabRequestEvent OnLinkAppleRequestEvent; + public event PlayFabResultEvent OnLinkAppleResultEvent; + public event PlayFabRequestEvent OnLinkCustomIDRequestEvent; + public event PlayFabResultEvent OnLinkCustomIDResultEvent; + public event PlayFabRequestEvent OnLinkFacebookAccountRequestEvent; + public event PlayFabResultEvent OnLinkFacebookAccountResultEvent; + public event PlayFabRequestEvent OnLinkFacebookInstantGamesIdRequestEvent; + public event PlayFabResultEvent OnLinkFacebookInstantGamesIdResultEvent; + public event PlayFabRequestEvent OnLinkGameCenterAccountRequestEvent; + public event PlayFabResultEvent OnLinkGameCenterAccountResultEvent; + public event PlayFabRequestEvent OnLinkGoogleAccountRequestEvent; + public event PlayFabResultEvent OnLinkGoogleAccountResultEvent; + public event PlayFabRequestEvent OnLinkGooglePlayGamesServicesAccountRequestEvent; + public event PlayFabResultEvent OnLinkGooglePlayGamesServicesAccountResultEvent; + public event PlayFabRequestEvent OnLinkIOSDeviceIDRequestEvent; + public event PlayFabResultEvent OnLinkIOSDeviceIDResultEvent; + public event PlayFabRequestEvent OnLinkKongregateRequestEvent; + public event PlayFabResultEvent OnLinkKongregateResultEvent; + public event PlayFabRequestEvent OnLinkNintendoServiceAccountRequestEvent; + public event PlayFabResultEvent OnLinkNintendoServiceAccountResultEvent; + public event PlayFabRequestEvent OnLinkNintendoSwitchDeviceIdRequestEvent; + public event PlayFabResultEvent OnLinkNintendoSwitchDeviceIdResultEvent; + public event PlayFabRequestEvent OnLinkOpenIdConnectRequestEvent; + public event PlayFabResultEvent OnLinkOpenIdConnectResultEvent; + public event PlayFabRequestEvent OnLinkPSNAccountRequestEvent; + public event PlayFabResultEvent OnLinkPSNAccountResultEvent; + public event PlayFabRequestEvent OnLinkSteamAccountRequestEvent; + public event PlayFabResultEvent OnLinkSteamAccountResultEvent; + public event PlayFabRequestEvent OnLinkTwitchRequestEvent; + public event PlayFabResultEvent OnLinkTwitchResultEvent; + public event PlayFabRequestEvent OnLinkXboxAccountRequestEvent; + public event PlayFabResultEvent OnLinkXboxAccountResultEvent; + public event PlayFabRequestEvent OnLoginWithAndroidDeviceIDRequestEvent; + public event PlayFabRequestEvent OnLoginWithAppleRequestEvent; + public event PlayFabRequestEvent OnLoginWithCustomIDRequestEvent; + public event PlayFabRequestEvent OnLoginWithEmailAddressRequestEvent; + public event PlayFabRequestEvent OnLoginWithFacebookRequestEvent; + public event PlayFabRequestEvent OnLoginWithFacebookInstantGamesIdRequestEvent; + public event PlayFabRequestEvent OnLoginWithGameCenterRequestEvent; + public event PlayFabRequestEvent OnLoginWithGoogleAccountRequestEvent; + public event PlayFabRequestEvent OnLoginWithGooglePlayGamesServicesRequestEvent; + public event PlayFabRequestEvent OnLoginWithIOSDeviceIDRequestEvent; + public event PlayFabRequestEvent OnLoginWithKongregateRequestEvent; + public event PlayFabRequestEvent OnLoginWithNintendoServiceAccountRequestEvent; + public event PlayFabRequestEvent OnLoginWithNintendoSwitchDeviceIdRequestEvent; + public event PlayFabRequestEvent OnLoginWithOpenIdConnectRequestEvent; + public event PlayFabRequestEvent OnLoginWithPlayFabRequestEvent; + public event PlayFabRequestEvent OnLoginWithPSNRequestEvent; + public event PlayFabRequestEvent OnLoginWithSteamRequestEvent; + public event PlayFabRequestEvent OnLoginWithTwitchRequestEvent; + public event PlayFabRequestEvent OnLoginWithXboxRequestEvent; + public event PlayFabRequestEvent OnOpenTradeRequestEvent; + public event PlayFabResultEvent OnOpenTradeResultEvent; + public event PlayFabRequestEvent OnPayForPurchaseRequestEvent; + public event PlayFabResultEvent OnPayForPurchaseResultEvent; + public event PlayFabRequestEvent OnPurchaseItemRequestEvent; + public event PlayFabResultEvent OnPurchaseItemResultEvent; + public event PlayFabRequestEvent OnRedeemCouponRequestEvent; + public event PlayFabResultEvent OnRedeemCouponResultEvent; + public event PlayFabRequestEvent OnRefreshPSNAuthTokenRequestEvent; + public event PlayFabResultEvent OnRefreshPSNAuthTokenResultEvent; + public event PlayFabRequestEvent OnRegisterForIOSPushNotificationRequestEvent; + public event PlayFabResultEvent OnRegisterForIOSPushNotificationResultEvent; + public event PlayFabRequestEvent OnRegisterPlayFabUserRequestEvent; + public event PlayFabResultEvent OnRegisterPlayFabUserResultEvent; + public event PlayFabRequestEvent OnRemoveContactEmailRequestEvent; + public event PlayFabResultEvent OnRemoveContactEmailResultEvent; + public event PlayFabRequestEvent OnRemoveFriendRequestEvent; + public event PlayFabResultEvent OnRemoveFriendResultEvent; + public event PlayFabRequestEvent OnRemoveGenericIDRequestEvent; + public event PlayFabResultEvent OnRemoveGenericIDResultEvent; + public event PlayFabRequestEvent OnRemoveSharedGroupMembersRequestEvent; + public event PlayFabResultEvent OnRemoveSharedGroupMembersResultEvent; + public event PlayFabRequestEvent OnReportAdActivityRequestEvent; + public event PlayFabResultEvent OnReportAdActivityResultEvent; + public event PlayFabRequestEvent OnReportDeviceInfoRequestEvent; + public event PlayFabResultEvent OnReportDeviceInfoResultEvent; + public event PlayFabRequestEvent OnReportPlayerRequestEvent; + public event PlayFabResultEvent OnReportPlayerResultEvent; + public event PlayFabRequestEvent OnRestoreIOSPurchasesRequestEvent; + public event PlayFabResultEvent OnRestoreIOSPurchasesResultEvent; + public event PlayFabRequestEvent OnRewardAdActivityRequestEvent; + public event PlayFabResultEvent OnRewardAdActivityResultEvent; + public event PlayFabRequestEvent OnSendAccountRecoveryEmailRequestEvent; + public event PlayFabResultEvent OnSendAccountRecoveryEmailResultEvent; + public event PlayFabRequestEvent OnSetFriendTagsRequestEvent; + public event PlayFabResultEvent OnSetFriendTagsResultEvent; + public event PlayFabRequestEvent OnSetPlayerSecretRequestEvent; + public event PlayFabResultEvent OnSetPlayerSecretResultEvent; + public event PlayFabRequestEvent OnStartPurchaseRequestEvent; + public event PlayFabResultEvent OnStartPurchaseResultEvent; + public event PlayFabRequestEvent OnSubtractUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnSubtractUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnUnlinkAndroidDeviceIDRequestEvent; + public event PlayFabResultEvent OnUnlinkAndroidDeviceIDResultEvent; + public event PlayFabRequestEvent OnUnlinkAppleRequestEvent; + public event PlayFabResultEvent OnUnlinkAppleResultEvent; + public event PlayFabRequestEvent OnUnlinkCustomIDRequestEvent; + public event PlayFabResultEvent OnUnlinkCustomIDResultEvent; + public event PlayFabRequestEvent OnUnlinkFacebookAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkFacebookAccountResultEvent; + public event PlayFabRequestEvent OnUnlinkFacebookInstantGamesIdRequestEvent; + public event PlayFabResultEvent OnUnlinkFacebookInstantGamesIdResultEvent; + public event PlayFabRequestEvent OnUnlinkGameCenterAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkGameCenterAccountResultEvent; + public event PlayFabRequestEvent OnUnlinkGoogleAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkGoogleAccountResultEvent; + public event PlayFabRequestEvent OnUnlinkGooglePlayGamesServicesAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkGooglePlayGamesServicesAccountResultEvent; + public event PlayFabRequestEvent OnUnlinkIOSDeviceIDRequestEvent; + public event PlayFabResultEvent OnUnlinkIOSDeviceIDResultEvent; + public event PlayFabRequestEvent OnUnlinkKongregateRequestEvent; + public event PlayFabResultEvent OnUnlinkKongregateResultEvent; + public event PlayFabRequestEvent OnUnlinkNintendoServiceAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkNintendoServiceAccountResultEvent; + public event PlayFabRequestEvent OnUnlinkNintendoSwitchDeviceIdRequestEvent; + public event PlayFabResultEvent OnUnlinkNintendoSwitchDeviceIdResultEvent; + public event PlayFabRequestEvent OnUnlinkOpenIdConnectRequestEvent; + public event PlayFabResultEvent OnUnlinkOpenIdConnectResultEvent; + public event PlayFabRequestEvent OnUnlinkPSNAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkPSNAccountResultEvent; + public event PlayFabRequestEvent OnUnlinkSteamAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkSteamAccountResultEvent; + public event PlayFabRequestEvent OnUnlinkTwitchRequestEvent; + public event PlayFabResultEvent OnUnlinkTwitchResultEvent; + public event PlayFabRequestEvent OnUnlinkXboxAccountRequestEvent; + public event PlayFabResultEvent OnUnlinkXboxAccountResultEvent; + public event PlayFabRequestEvent OnUnlockContainerInstanceRequestEvent; + public event PlayFabResultEvent OnUnlockContainerInstanceResultEvent; + public event PlayFabRequestEvent OnUnlockContainerItemRequestEvent; + public event PlayFabResultEvent OnUnlockContainerItemResultEvent; + public event PlayFabRequestEvent OnUpdateAvatarUrlRequestEvent; + public event PlayFabResultEvent OnUpdateAvatarUrlResultEvent; + public event PlayFabRequestEvent OnUpdateCharacterDataRequestEvent; + public event PlayFabResultEvent OnUpdateCharacterDataResultEvent; + public event PlayFabRequestEvent OnUpdateCharacterStatisticsRequestEvent; + public event PlayFabResultEvent OnUpdateCharacterStatisticsResultEvent; + public event PlayFabRequestEvent OnUpdatePlayerStatisticsRequestEvent; + public event PlayFabResultEvent OnUpdatePlayerStatisticsResultEvent; + public event PlayFabRequestEvent OnUpdateSharedGroupDataRequestEvent; + public event PlayFabResultEvent OnUpdateSharedGroupDataResultEvent; + public event PlayFabRequestEvent OnUpdateUserDataRequestEvent; + public event PlayFabResultEvent OnUpdateUserDataResultEvent; + public event PlayFabRequestEvent OnUpdateUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnUpdateUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnUpdateUserTitleDisplayNameRequestEvent; + public event PlayFabResultEvent OnUpdateUserTitleDisplayNameResultEvent; + public event PlayFabRequestEvent OnValidateAmazonIAPReceiptRequestEvent; + public event PlayFabResultEvent OnValidateAmazonIAPReceiptResultEvent; + public event PlayFabRequestEvent OnValidateGooglePlayPurchaseRequestEvent; + public event PlayFabResultEvent OnValidateGooglePlayPurchaseResultEvent; + public event PlayFabRequestEvent OnValidateIOSReceiptRequestEvent; + public event PlayFabResultEvent OnValidateIOSReceiptResultEvent; + public event PlayFabRequestEvent OnValidateWindowsStoreReceiptRequestEvent; + public event PlayFabResultEvent OnValidateWindowsStoreReceiptResultEvent; + public event PlayFabRequestEvent OnWriteCharacterEventRequestEvent; + public event PlayFabResultEvent OnWriteCharacterEventResultEvent; + public event PlayFabRequestEvent OnWritePlayerEventRequestEvent; + public event PlayFabResultEvent OnWritePlayerEventResultEvent; + public event PlayFabRequestEvent OnWriteTitleEventRequestEvent; + public event PlayFabResultEvent OnWriteTitleEventResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Client/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Client/PlayFabEvents.cs.meta new file mode 100644 index 00000000..e06d2d97 --- /dev/null +++ b/Assets/PlayFabSDK/Client/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: da33df462ae2fa04cb401398dc2b8a5d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/CloudScript.meta b/Assets/PlayFabSDK/CloudScript.meta new file mode 100644 index 00000000..a8493465 --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 02094465bfb2b7541a0a06763843a2ee +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptAPI.cs b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptAPI.cs new file mode 100644 index 00000000..d5c2bd35 --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptAPI.cs @@ -0,0 +1,244 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.CloudScriptModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// API methods for executing CloudScript using an Entity Profile + /// + public static class PlayFabCloudScriptAPI + { + static PlayFabCloudScriptAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of + /// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything. + /// + public static void ExecuteEntityCloudScript(ExecuteEntityCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/ExecuteEntityCloudScript", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of + /// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything. + /// + public static void ExecuteFunction(ExecuteFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + var localApiServerString = PlayFabSettings.LocalApiServer; + if (!string.IsNullOrEmpty(localApiServerString)) + { + var baseUri = new Uri(localApiServerString); + var fullUri = new Uri(baseUri, "/CloudScript/ExecuteFunction".TrimStart('/')); + PlayFabHttp.MakeApiCallWithFullUri(fullUri.AbsoluteUri, request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + return; + } + + PlayFabHttp.MakeApiCall("/CloudScript/ExecuteFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets registered Azure Functions for a given title id and function name. + /// + public static void GetFunction(GetFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/GetFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all currently registered Event Hub triggered Azure Functions for a given title. + /// + public static void ListEventHubFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/ListEventHubFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all currently registered Azure Functions for a given title. + /// + public static void ListFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/ListFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all currently registered HTTP triggered Azure Functions for a given title. + /// + public static void ListHttpFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/ListHttpFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all currently registered Queue triggered Azure Functions for a given title. + /// + public static void ListQueuedFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/ListQueuedFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Generate an entity PlayStream event for the provided function result. + /// + public static void PostFunctionResultForEntityTriggeredAction(PostFunctionResultForEntityTriggeredActionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForEntityTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Generate an entity PlayStream event for the provided function result. + /// + public static void PostFunctionResultForFunctionExecution(PostFunctionResultForFunctionExecutionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForFunctionExecution", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Generate a player PlayStream event for the provided function result. + /// + public static void PostFunctionResultForPlayerTriggeredAction(PostFunctionResultForPlayerTriggeredActionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForPlayerTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Generate a PlayStream event for the provided function result. + /// + public static void PostFunctionResultForScheduledTask(PostFunctionResultForScheduledTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForScheduledTask", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers an event hub triggered Azure Function with a title. + /// + public static void RegisterEventHubFunction(RegisterEventHubFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/RegisterEventHubFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers an HTTP triggered Azure function with a title. + /// + public static void RegisterHttpFunction(RegisterHttpFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/RegisterHttpFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Registers a queue triggered Azure Function with a title. + /// + public static void RegisterQueuedFunction(RegisterQueuedFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/RegisterQueuedFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unregisters an Azure Function with a title. + /// + public static void UnregisterFunction(UnregisterFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/CloudScript/UnregisterFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptAPI.cs.meta b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptAPI.cs.meta new file mode 100644 index 00000000..833b2998 --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e9b8ec61c6ab7d2438b7b65a4dd9ef59 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptInstanceAPI.cs b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptInstanceAPI.cs new file mode 100644 index 00000000..5025b801 --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptInstanceAPI.cs @@ -0,0 +1,224 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.CloudScriptModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// API methods for executing CloudScript using an Entity Profile + /// + public class PlayFabCloudScriptInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabCloudScriptInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabCloudScriptInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of + /// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything. + /// + public void ExecuteEntityCloudScript(ExecuteEntityCloudScriptRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/ExecuteEntityCloudScript", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of + /// custom server-side functionality you can implement, and it can be used in conjunction with virtually anything. + /// + public void ExecuteFunction(ExecuteFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/ExecuteFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets registered Azure Functions for a given title id and function name. + /// + public void GetFunction(GetFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/GetFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all currently registered Event Hub triggered Azure Functions for a given title. + /// + public void ListEventHubFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/ListEventHubFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all currently registered Azure Functions for a given title. + /// + public void ListFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/ListFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all currently registered HTTP triggered Azure Functions for a given title. + /// + public void ListHttpFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/ListHttpFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all currently registered Queue triggered Azure Functions for a given title. + /// + public void ListQueuedFunctions(ListFunctionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/ListQueuedFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Generate an entity PlayStream event for the provided function result. + /// + public void PostFunctionResultForEntityTriggeredAction(PostFunctionResultForEntityTriggeredActionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForEntityTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Generate an entity PlayStream event for the provided function result. + /// + public void PostFunctionResultForFunctionExecution(PostFunctionResultForFunctionExecutionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForFunctionExecution", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Generate a player PlayStream event for the provided function result. + /// + public void PostFunctionResultForPlayerTriggeredAction(PostFunctionResultForPlayerTriggeredActionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForPlayerTriggeredAction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Generate a PlayStream event for the provided function result. + /// + public void PostFunctionResultForScheduledTask(PostFunctionResultForScheduledTaskRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForScheduledTask", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers an event hub triggered Azure Function with a title. + /// + public void RegisterEventHubFunction(RegisterEventHubFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/RegisterEventHubFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers an HTTP triggered Azure function with a title. + /// + public void RegisterHttpFunction(RegisterHttpFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/RegisterHttpFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Registers a queue triggered Azure Function with a title. + /// + public void RegisterQueuedFunction(RegisterQueuedFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/RegisterQueuedFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unregisters an Azure Function with a title. + /// + public void UnregisterFunction(UnregisterFunctionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/CloudScript/UnregisterFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptInstanceAPI.cs.meta b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptInstanceAPI.cs.meta new file mode 100644 index 00000000..e8e15c2f --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ac313c777a2b7054e9632c96829e1f7d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptModels.cs b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptModels.cs new file mode 100644 index 00000000..1eab23cc --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptModels.cs @@ -0,0 +1,1186 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.CloudScriptModels +{ + [Serializable] + public class AdCampaignAttributionModel : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + public enum CloudScriptRevisionOption + { + Live, + Latest, + Specific + } + + [Serializable] + public class ContactEmailInfoModel : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + public enum ContinentCode + { + AF, + AN, + AS, + EU, + NA, + OC, + SA, + Unknown + } + + public enum CountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW, + Unknown + } + + public enum EmailVerificationStatus + { + Unverified, + Pending, + Confirmed + } + + [Serializable] + public class EmptyResult : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EventHubFunctionModel : PlayFabBaseModel + { + /// + /// The connection string for the event hub. + /// + public string ConnectionString; + /// + /// The name of the event hub that triggers the Azure Function. + /// + public string EventHubName; + /// + /// The name the function was registered under. + /// + public string FunctionName; + } + + [Serializable] + public class ExecuteCloudScriptResult : PlayFabResultCommon + { + /// + /// Number of PlayFab API requests issued by the CloudScript function + /// + public int APIRequestsIssued; + /// + /// Information about the error, if any, that occurred during execution + /// + public ScriptExecutionError Error; + public double ExecutionTimeSeconds; + /// + /// The name of the function that executed + /// + public string FunctionName; + /// + /// The object returned from the CloudScript function, if any + /// + public object FunctionResult; + /// + /// Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if + /// the total event size is larger than 350KB. + /// + public bool? FunctionResultTooLarge; + /// + /// Number of external HTTP requests issued by the CloudScript function + /// + public int HttpRequestsIssued; + /// + /// Entries logged during the function execution. These include both entries logged in the function code using log.info() + /// and log.error() and error entries for API and HTTP request failures. + /// + public List Logs; + /// + /// Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total + /// event size is larger than 350KB after the FunctionResult was removed. + /// + public bool? LogsTooLarge; + public uint MemoryConsumedBytes; + /// + /// Processor time consumed while executing the function. This does not include time spent waiting on API calls or HTTP + /// requests. + /// + public double ProcessorTimeSeconds; + /// + /// The revision of the CloudScript that executed + /// + public int Revision; + } + + /// + /// Executes CloudScript with the entity profile that is defined in the request. + /// + [Serializable] + public class ExecuteEntityCloudScriptRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The name of the CloudScript function to execute + /// + public string FunctionName; + /// + /// Object that is passed in to the function as the first argument + /// + public object FunctionParameter; + /// + /// Generate a 'entity_executed_cloudscript' PlayStream event containing the results of the function execution and other + /// contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager. + /// + public bool? GeneratePlayStreamEvent; + /// + /// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' + /// executes the current live, published revision, and 'Specific' executes the specified revision. The default value is + /// 'Specific', if the SpecificRevision parameter is specified, otherwise it is 'Live'. + /// + public CloudScriptRevisionOption? RevisionSelection; + /// + /// The specific revision to execute, when RevisionSelection is set to 'Specific' + /// + public int? SpecificRevision; + } + + /// + /// Executes an Azure Function with the profile of the entity that is defined in the request. + /// + [Serializable] + public class ExecuteFunctionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The name of the CloudScript function to execute + /// + public string FunctionName; + /// + /// Object that is passed in to the function as the FunctionArgument field of the FunctionExecutionContext data structure + /// + public object FunctionParameter; + /// + /// Generate a 'entity_executed_cloudscript_function' PlayStream event containing the results of the function execution and + /// other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager. + /// + public bool? GeneratePlayStreamEvent; + } + + [Serializable] + public class ExecuteFunctionResult : PlayFabResultCommon + { + /// + /// Error from the CloudScript Azure Function. + /// + public FunctionExecutionError Error; + /// + /// The amount of time the function took to execute + /// + public int ExecutionTimeMilliseconds; + /// + /// The name of the function that executed + /// + public string FunctionName; + /// + /// The object returned from the function, if any + /// + public object FunctionResult; + /// + /// Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. + /// + public bool? FunctionResultTooLarge; + } + + [Serializable] + public class FunctionExecutionError : PlayFabBaseModel + { + /// + /// Error code, such as CloudScriptAzureFunctionsExecutionTimeLimitExceeded, CloudScriptAzureFunctionsArgumentSizeExceeded, + /// CloudScriptAzureFunctionsReturnSizeExceeded or CloudScriptAzureFunctionsHTTPRequestError + /// + public string Error; + /// + /// Details about the error + /// + public string Message; + /// + /// Point during the execution of the function at which the error occurred, if any + /// + public string StackTrace; + } + + [Serializable] + public class FunctionModel : PlayFabBaseModel + { + /// + /// The address of the function. + /// + public string FunctionAddress; + /// + /// The name the function was registered under. + /// + public string FunctionName; + /// + /// The trigger type for the function. + /// + public string TriggerType; + } + + [Serializable] + public class GetFunctionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the function to register + /// + public string FunctionName; + } + + [Serializable] + public class GetFunctionResult : PlayFabResultCommon + { + /// + /// The connection string for the storage account containing the queue for a queue trigger Azure Function. + /// + public string ConnectionString; + /// + /// The URL to be invoked to execute an HTTP triggered function. + /// + public string FunctionUrl; + /// + /// The name of the queue for a queue trigger Azure Function. + /// + public string QueueName; + /// + /// The trigger type for the function. + /// + public string TriggerType; + } + + [Serializable] + public class HttpFunctionModel : PlayFabBaseModel + { + /// + /// The name the function was registered under. + /// + public string FunctionName; + /// + /// The URL of the function. + /// + public string FunctionUrl; + } + + [Serializable] + public class LinkedPlatformAccountModel : PlayFabBaseModel + { + /// + /// Linked account email of the user on the platform, if available + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Unique account identifier of the user on the platform + /// + public string PlatformUserId; + /// + /// Linked account username of the user on the platform, if available + /// + public string Username; + } + + [Serializable] + public class ListEventHubFunctionsResult : PlayFabResultCommon + { + /// + /// The list of EventHub triggered functions that are currently registered for the title. + /// + public List Functions; + } + + /// + /// A title can have many functions, ListHttpFunctions will return a list of all the currently registered HTTP triggered + /// functions for a given title. + /// + [Serializable] + public class ListFunctionsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class ListFunctionsResult : PlayFabResultCommon + { + /// + /// The list of functions that are currently registered for the title. + /// + public List Functions; + } + + [Serializable] + public class ListHttpFunctionsResult : PlayFabResultCommon + { + /// + /// The list of HTTP triggered functions that are currently registered for the title. + /// + public List Functions; + } + + [Serializable] + public class ListQueuedFunctionsResult : PlayFabResultCommon + { + /// + /// The list of Queue triggered functions that are currently registered for the title. + /// + public List Functions; + } + + [Serializable] + public class LocationModel : PlayFabBaseModel + { + /// + /// City name. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode? ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode? CountryCode; + /// + /// Latitude coordinate of the geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the geographic location. + /// + public double? Longitude; + } + + public enum LoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + [Serializable] + public class LogStatement : PlayFabBaseModel + { + /// + /// Optional object accompanying the message as contextual information + /// + public object Data; + /// + /// 'Debug', 'Info', or 'Error' + /// + public string Level; + public string Message; + } + + [Serializable] + public class MembershipModel : PlayFabBaseModel + { + /// + /// Whether this membership is active. That is, whether the MembershipExpiration time has been reached. + /// + public bool IsActive; + /// + /// The time this membership expires + /// + public DateTime MembershipExpiration; + /// + /// The id of the membership + /// + public string MembershipId; + /// + /// Membership expirations can be explicitly overridden (via game manager or the admin api). If this membership has been + /// overridden, this will be the new expiration time. + /// + public DateTime? OverrideExpiration; + /// + /// The list of subscriptions that this player has for this membership + /// + public List Subscriptions; + } + + /// + /// Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is + /// immutable and unique. + /// + [Serializable] + public class NameIdentifier : PlayFabBaseModel + { + /// + /// Id Identifier, if present + /// + public string Id; + /// + /// Name Identifier, if present + /// + public string Name; + } + + [Serializable] + public class PlayerProfileModel : PlayFabBaseModel + { + /// + /// List of advertising campaigns the player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// URL of the player's avatar image + /// + public string AvatarUrl; + /// + /// If the player is currently banned, the UTC Date when the ban expires + /// + public DateTime? BannedUntil; + /// + /// List of all contact email info associated with the player account + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player display name + /// + public string DisplayName; + /// + /// List of experiment variants for the player. Note that these variants are not guaranteed to be up-to-date when returned + /// during login because the player profile is updated only after login. Instead, use the LoginResult.TreatmentAssignment + /// property during login to get the correct variants and variables. + /// + public List ExperimentVariants; + /// + /// UTC time when the player most recently logged in to the title + /// + public DateTime? LastLogin; + /// + /// List of all authentication systems linked to this player account + /// + public List LinkedAccounts; + /// + /// List of geographic locations from which the player has logged in to the title + /// + public List Locations; + /// + /// List of memberships for the player, along with whether are expired. + /// + public List Memberships; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// PlayFab player account unique identifier + /// + public string PlayerId; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// List of configured end points registered for sending the player push notifications + /// + public List PushNotificationRegistrations; + /// + /// List of leaderboard statistic values for the player + /// + public List Statistics; + /// + /// List of player's tags for segmentation + /// + public List Tags; + /// + /// Title ID this player profile applies to + /// + public string TitleId; + /// + /// Sum of the player's purchases made with real-money currencies, converted to US dollars equivalent and represented as a + /// whole number of cents (1/100 USD). For example, 999 indicates nine dollars and ninety-nine cents. + /// + public uint? TotalValueToDateInUSD; + /// + /// List of the player's lifetime purchase totals, summed by real-money currency + /// + public List ValuesToDate; + } + + [Serializable] + public class PlayStreamEventEnvelopeModel : PlayFabBaseModel + { + /// + /// The ID of the entity the event is about. + /// + public string EntityId; + /// + /// The type of the entity the event is about. + /// + public string EntityType; + /// + /// Data specific to this event. + /// + public string EventData; + /// + /// The name of the event. + /// + public string EventName; + /// + /// The namespace of the event. + /// + public string EventNamespace; + /// + /// Settings for the event. + /// + public string EventSettings; + } + + [Serializable] + public class PostFunctionResultForEntityTriggeredActionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The result of the function execution. + /// + public ExecuteFunctionResult FunctionResult; + } + + [Serializable] + public class PostFunctionResultForFunctionExecutionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The result of the function execution. + /// + public ExecuteFunctionResult FunctionResult; + } + + [Serializable] + public class PostFunctionResultForPlayerTriggeredActionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The result of the function execution. + /// + public ExecuteFunctionResult FunctionResult; + /// + /// The player profile the function was invoked with. + /// + public PlayerProfileModel PlayerProfile; + /// + /// The triggering PlayStream event, if any, that caused the function to be invoked. + /// + public PlayStreamEventEnvelopeModel PlayStreamEventEnvelope; + } + + [Serializable] + public class PostFunctionResultForScheduledTaskRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The result of the function execution + /// + public ExecuteFunctionResult FunctionResult; + /// + /// The id of the scheduled task that invoked the function. + /// + public NameIdentifier ScheduledTaskId; + } + + public enum PushNotificationPlatform + { + ApplePushNotificationService, + GoogleCloudMessaging + } + + [Serializable] + public class PushNotificationRegistrationModel : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + [Serializable] + public class QueuedFunctionModel : PlayFabBaseModel + { + /// + /// The connection string for the Azure Storage Account that hosts the queue. + /// + public string ConnectionString; + /// + /// The name the function was registered under. + /// + public string FunctionName; + /// + /// The name of the queue that triggers the Azure Function. + /// + public string QueueName; + } + + /// + /// A title can have many functions, RegisterEventHubFunction associates a function name with an event hub name and + /// connection string. + /// + [Serializable] + public class RegisterEventHubFunctionRequest : PlayFabRequestCommon + { + /// + /// A connection string for the namespace of the event hub for the Azure Function. + /// + public string ConnectionString; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the event hub for the Azure Function. + /// + public string EventHubName; + /// + /// The name of the function to register + /// + public string FunctionName; + } + + [Serializable] + public class RegisterHttpFunctionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the function to register + /// + public string FunctionName; + /// + /// Full URL for Azure Function that implements the function. + /// + public string FunctionUrl; + } + + /// + /// A title can have many functions, RegisterQueuedFunction associates a function name with a queue name and connection + /// string. + /// + [Serializable] + public class RegisterQueuedFunctionRequest : PlayFabRequestCommon + { + /// + /// A connection string for the storage account that hosts the queue for the Azure Function. + /// + public string ConnectionString; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the function to register + /// + public string FunctionName; + /// + /// The name of the queue for the Azure Function. + /// + public string QueueName; + } + + [Serializable] + public class ScriptExecutionError : PlayFabBaseModel + { + /// + /// Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, + /// CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError + /// + public string Error; + /// + /// Details about the error + /// + public string Message; + /// + /// Point during the execution of the script at which the error occurred, if any + /// + public string StackTrace; + } + + [Serializable] + public class StatisticModel : PlayFabBaseModel + { + /// + /// Statistic name + /// + public string Name; + /// + /// Statistic value + /// + public int Value; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int Version; + } + + [Serializable] + public class SubscriptionModel : PlayFabBaseModel + { + /// + /// When this subscription expires. + /// + public DateTime Expiration; + /// + /// The time the subscription was orignially purchased + /// + public DateTime InitialSubscriptionTime; + /// + /// Whether this subscription is currently active. That is, if Expiration > now. + /// + public bool IsActive; + /// + /// The status of this subscription, according to the subscription provider. + /// + public SubscriptionProviderStatus? Status; + /// + /// The id for this subscription + /// + public string SubscriptionId; + /// + /// The item id for this subscription from the primary catalog + /// + public string SubscriptionItemId; + /// + /// The provider for this subscription. Apple or Google Play are supported today. + /// + public string SubscriptionProvider; + } + + public enum SubscriptionProviderStatus + { + NoError, + Cancelled, + UnknownError, + BillingError, + ProductUnavailable, + CustomerDidNotAcceptPriceChange, + FreeTrial, + PaymentPending + } + + [Serializable] + public class TagModel : PlayFabBaseModel + { + /// + /// Full value of the tag, including namespace + /// + public string TagValue; + } + + public enum TriggerType + { + HTTP, + Queue, + EventHub + } + + [Serializable] + public class UnregisterFunctionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the function to register + /// + public string FunctionName; + } + + [Serializable] + public class ValueToDateModel : PlayFabBaseModel + { + /// + /// ISO 4217 code of the currency used in the purchases + /// + public string Currency; + /// + /// Total value of the purchases in a whole number of 1/100 monetary units. For example, 999 indicates nine dollars and + /// ninety-nine cents when Currency is 'USD') + /// + public uint TotalValue; + /// + /// Total value of the purchases in a string representation of decimal monetary units. For example, '9.99' indicates nine + /// dollars and ninety-nine cents when Currency is 'USD'. + /// + public string TotalValueAsDecimal; + } +} +#endif diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptModels.cs.meta b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptModels.cs.meta new file mode 100644 index 00000000..d4e812ca --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabCloudScriptModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e51e70743e2edab4f88b8de52466db7d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabEvents.cs b/Assets/PlayFabSDK/CloudScript/PlayFabEvents.cs new file mode 100644 index 00000000..bec3ba15 --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabEvents.cs @@ -0,0 +1,40 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.CloudScriptModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnCloudScriptExecuteEntityCloudScriptRequestEvent; + public event PlayFabResultEvent OnCloudScriptExecuteEntityCloudScriptResultEvent; + public event PlayFabRequestEvent OnCloudScriptExecuteFunctionRequestEvent; + public event PlayFabResultEvent OnCloudScriptExecuteFunctionResultEvent; + public event PlayFabRequestEvent OnCloudScriptGetFunctionRequestEvent; + public event PlayFabResultEvent OnCloudScriptGetFunctionResultEvent; + public event PlayFabRequestEvent OnCloudScriptListEventHubFunctionsRequestEvent; + public event PlayFabResultEvent OnCloudScriptListEventHubFunctionsResultEvent; + public event PlayFabRequestEvent OnCloudScriptListFunctionsRequestEvent; + public event PlayFabResultEvent OnCloudScriptListFunctionsResultEvent; + public event PlayFabRequestEvent OnCloudScriptListHttpFunctionsRequestEvent; + public event PlayFabResultEvent OnCloudScriptListHttpFunctionsResultEvent; + public event PlayFabRequestEvent OnCloudScriptListQueuedFunctionsRequestEvent; + public event PlayFabResultEvent OnCloudScriptListQueuedFunctionsResultEvent; + public event PlayFabRequestEvent OnCloudScriptPostFunctionResultForEntityTriggeredActionRequestEvent; + public event PlayFabResultEvent OnCloudScriptPostFunctionResultForEntityTriggeredActionResultEvent; + public event PlayFabRequestEvent OnCloudScriptPostFunctionResultForFunctionExecutionRequestEvent; + public event PlayFabResultEvent OnCloudScriptPostFunctionResultForFunctionExecutionResultEvent; + public event PlayFabRequestEvent OnCloudScriptPostFunctionResultForPlayerTriggeredActionRequestEvent; + public event PlayFabResultEvent OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent; + public event PlayFabRequestEvent OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent; + public event PlayFabResultEvent OnCloudScriptPostFunctionResultForScheduledTaskResultEvent; + public event PlayFabRequestEvent OnCloudScriptRegisterEventHubFunctionRequestEvent; + public event PlayFabResultEvent OnCloudScriptRegisterEventHubFunctionResultEvent; + public event PlayFabRequestEvent OnCloudScriptRegisterHttpFunctionRequestEvent; + public event PlayFabResultEvent OnCloudScriptRegisterHttpFunctionResultEvent; + public event PlayFabRequestEvent OnCloudScriptRegisterQueuedFunctionRequestEvent; + public event PlayFabResultEvent OnCloudScriptRegisterQueuedFunctionResultEvent; + public event PlayFabRequestEvent OnCloudScriptUnregisterFunctionRequestEvent; + public event PlayFabResultEvent OnCloudScriptUnregisterFunctionResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/CloudScript/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/CloudScript/PlayFabEvents.cs.meta new file mode 100644 index 00000000..d80817e0 --- /dev/null +++ b/Assets/PlayFabSDK/CloudScript/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ea444771567a8e747be86eb07cdef93a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Data.meta b/Assets/PlayFabSDK/Data.meta new file mode 100644 index 00000000..c82ab9d8 --- /dev/null +++ b/Assets/PlayFabSDK/Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f754faf8b4b186c438c8419bed778294 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Data/PlayFabDataAPI.cs b/Assets/PlayFabSDK/Data/PlayFabDataAPI.cs new file mode 100644 index 00000000..8ef399bb --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabDataAPI.cs @@ -0,0 +1,133 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.DataModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// Store arbitrary data associated with an entity. Objects are small (~1KB) JSON-compatible objects which are stored + /// directly on the entity profile. Objects are made available for use in other PlayFab contexts, such as PlayStream events + /// and CloudScript functions. Files can efficiently store data of any size or format. Both objects and files support a + /// flexible permissions system to control read and write access by other entities. + /// + public static class PlayFabDataAPI + { + static PlayFabDataAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Abort pending file uploads to an entity's profile. + /// + public static void AbortFileUploads(AbortFileUploadsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/File/AbortFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete files on an entity's profile. + /// + public static void DeleteFiles(DeleteFilesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/File/DeleteFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Finalize file uploads to an entity's profile. + /// + public static void FinalizeFileUploads(FinalizeFileUploadsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/File/FinalizeFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves file metadata from an entity's profile. + /// + public static void GetFiles(GetFilesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/File/GetFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves objects from an entity's profile. + /// + public static void GetObjects(GetObjectsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Object/GetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Initiates file uploads to an entity's profile. + /// + public static void InitiateFileUploads(InitiateFileUploadsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/File/InitiateFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets objects on an entity's profile. + /// + public static void SetObjects(SetObjectsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Object/SetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Data/PlayFabDataAPI.cs.meta b/Assets/PlayFabSDK/Data/PlayFabDataAPI.cs.meta new file mode 100644 index 00000000..df22d502 --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabDataAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1cb3cb06f2399ca44ad3395fed658494 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Data/PlayFabDataInstanceAPI.cs b/Assets/PlayFabSDK/Data/PlayFabDataInstanceAPI.cs new file mode 100644 index 00000000..f13c4535 --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabDataInstanceAPI.cs @@ -0,0 +1,137 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.DataModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// Store arbitrary data associated with an entity. Objects are small (~1KB) JSON-compatible objects which are stored + /// directly on the entity profile. Objects are made available for use in other PlayFab contexts, such as PlayStream events + /// and CloudScript functions. Files can efficiently store data of any size or format. Both objects and files support a + /// flexible permissions system to control read and write access by other entities. + /// + public class PlayFabDataInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabDataInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabDataInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Abort pending file uploads to an entity's profile. + /// + public void AbortFileUploads(AbortFileUploadsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/File/AbortFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete files on an entity's profile. + /// + public void DeleteFiles(DeleteFilesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/File/DeleteFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Finalize file uploads to an entity's profile. + /// + public void FinalizeFileUploads(FinalizeFileUploadsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/File/FinalizeFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves file metadata from an entity's profile. + /// + public void GetFiles(GetFilesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/File/GetFiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves objects from an entity's profile. + /// + public void GetObjects(GetObjectsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Object/GetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Initiates file uploads to an entity's profile. + /// + public void InitiateFileUploads(InitiateFileUploadsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/File/InitiateFileUploads", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets objects on an entity's profile. + /// + public void SetObjects(SetObjectsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Object/SetObjects", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Data/PlayFabDataInstanceAPI.cs.meta b/Assets/PlayFabSDK/Data/PlayFabDataInstanceAPI.cs.meta new file mode 100644 index 00000000..f843ea55 --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabDataInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c754c6db47f4d943954121319b071d6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Data/PlayFabDataModels.cs b/Assets/PlayFabSDK/Data/PlayFabDataModels.cs new file mode 100644 index 00000000..f4b3ac2f --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabDataModels.cs @@ -0,0 +1,404 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.DataModels +{ + /// + /// Aborts the pending upload of the requested files. + /// + [Serializable] + public class AbortFileUploadsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Names of the files to have their pending uploads aborted. + /// + public List FileNames; + /// + /// The expected version of the profile, if set and doesn't match the current version of the profile the operation will not + /// be performed. + /// + public int? ProfileVersion; + } + + [Serializable] + public class AbortFileUploadsResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + } + + /// + /// Deletes the requested files from the entity's profile. + /// + [Serializable] + public class DeleteFilesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Names of the files to be deleted. + /// + public List FileNames; + /// + /// The expected version of the profile, if set and doesn't match the current version of the profile the operation will not + /// be performed. + /// + public int? ProfileVersion; + } + + [Serializable] + public class DeleteFilesResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + /// + /// Finalizes the upload of the requested files. Verifies that the files have been successfully uploaded and moves the file + /// pointers from pending to live. + /// + [Serializable] + public class FinalizeFileUploadsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Names of the files to be finalized. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.' + /// + public List FileNames; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + } + + [Serializable] + public class FinalizeFileUploadsResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// Collection of metadata for the entity's files + /// + public Dictionary Metadata; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + } + + [Serializable] + public class GetFileMetadata : PlayFabBaseModel + { + /// + /// Checksum value for the file, can be used to check if the file on the server has changed. + /// + public string Checksum; + /// + /// Download URL where the file can be retrieved + /// + public string DownloadUrl; + /// + /// Name of the file + /// + public string FileName; + /// + /// Last UTC time the file was modified + /// + public DateTime LastModified; + /// + /// Storage service's reported byte count + /// + public int Size; + } + + /// + /// Returns URLs that may be used to download the files for a profile for a limited length of time. Only returns files that + /// have been successfully uploaded, files that are still pending will either return the old value, if it exists, or + /// nothing. + /// + [Serializable] + public class GetFilesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetFilesResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// Collection of metadata for the entity's files + /// + public Dictionary Metadata; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + } + + /// + /// Gets JSON objects from an entity profile and returns it. + /// + [Serializable] + public class GetObjectsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Determines whether the object will be returned as an escaped JSON string or as a un-escaped JSON object. Default is JSON + /// object. + /// + public bool? EscapeObject; + } + + [Serializable] + public class GetObjectsResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// Requested objects that the calling entity has access to + /// + public Dictionary Objects; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + } + + [Serializable] + public class InitiateFileUploadMetadata : PlayFabBaseModel + { + /// + /// Name of the file. + /// + public string FileName; + /// + /// Location the data should be sent to via an HTTP PUT operation. + /// + public string UploadUrl; + } + + /// + /// Returns URLs that may be used to upload the files for a profile 5 minutes. After using the upload calls + /// FinalizeFileUploads must be called to move the file status from pending to live. + /// + [Serializable] + public class InitiateFileUploadsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Names of the files to be set. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.' + /// + public List FileNames; + /// + /// The expected version of the profile, if set and doesn't match the current version of the profile the operation will not + /// be performed. + /// + public int? ProfileVersion; + } + + [Serializable] + public class InitiateFileUploadsResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + /// + /// Collection of file names and upload urls + /// + public List UploadDetails; + } + + [Serializable] + public class ObjectResult : PlayFabBaseModel + { + /// + /// Un-escaped JSON object, if EscapeObject false or default. + /// + public object DataObject; + /// + /// Escaped string JSON body of the object, if EscapeObject is true. + /// + public string EscapedDataObject; + /// + /// Name of the object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.' + /// + public string ObjectName; + } + + public enum OperationTypes + { + Created, + Updated, + Deleted, + None + } + + [Serializable] + public class SetObject : PlayFabBaseModel + { + /// + /// Body of the object to be saved. If empty and DeleteObject is true object will be deleted if it exists, or no operation + /// will occur if it does not exist. Only one of Object or EscapedDataObject fields may be used. + /// + public object DataObject; + /// + /// Flag to indicate that this object should be deleted. Both DataObject and EscapedDataObject must not be set as well. + /// + public bool? DeleteObject; + /// + /// Body of the object to be saved as an escaped JSON string. If empty and DeleteObject is true object will be deleted if it + /// exists, or no operation will occur if it does not exist. Only one of DataObject or EscapedDataObject fields may be used. + /// + public string EscapedDataObject; + /// + /// Name of object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'. + /// + public string ObjectName; + } + + [Serializable] + public class SetObjectInfo : PlayFabBaseModel + { + /// + /// Name of the object + /// + public string ObjectName; + /// + /// Optional reason to explain why the operation was the result that it was. + /// + public string OperationReason; + /// + /// Indicates which operation was completed, either Created, Updated, Deleted or None. + /// + public OperationTypes? SetResult; + } + + /// + /// Sets JSON objects on the requested entity profile. May include a version number to be used to perform optimistic + /// concurrency operations during update. If the current version differs from the version in the request the request will be + /// ignored. If no version is set on the request then the value will always be updated if the values differ. Using the + /// version value does not guarantee a write though, ConcurrentEditError may still occur if multiple clients are attempting + /// to update the same profile. + /// + [Serializable] + public class SetObjectsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from + /// GetProfile API, you can ensure that the object set will only be performed if the profile has not been updated by any + /// other clients since the version you last loaded. + /// + public int? ExpectedProfileVersion; + /// + /// Collection of objects to set on the profile. + /// + public List Objects; + } + + [Serializable] + public class SetObjectsResponse : PlayFabResultCommon + { + /// + /// New version of the entity profile. + /// + public int ProfileVersion; + /// + /// New version of the entity profile. + /// + public List SetResults; + } +} +#endif diff --git a/Assets/PlayFabSDK/Data/PlayFabDataModels.cs.meta b/Assets/PlayFabSDK/Data/PlayFabDataModels.cs.meta new file mode 100644 index 00000000..a4423ea5 --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabDataModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ab3048b1bd63d747b28b2fe0b181743 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Data/PlayFabEvents.cs b/Assets/PlayFabSDK/Data/PlayFabEvents.cs new file mode 100644 index 00000000..39393df7 --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabEvents.cs @@ -0,0 +1,24 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.DataModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnDataAbortFileUploadsRequestEvent; + public event PlayFabResultEvent OnDataAbortFileUploadsResultEvent; + public event PlayFabRequestEvent OnDataDeleteFilesRequestEvent; + public event PlayFabResultEvent OnDataDeleteFilesResultEvent; + public event PlayFabRequestEvent OnDataFinalizeFileUploadsRequestEvent; + public event PlayFabResultEvent OnDataFinalizeFileUploadsResultEvent; + public event PlayFabRequestEvent OnDataGetFilesRequestEvent; + public event PlayFabResultEvent OnDataGetFilesResultEvent; + public event PlayFabRequestEvent OnDataGetObjectsRequestEvent; + public event PlayFabResultEvent OnDataGetObjectsResultEvent; + public event PlayFabRequestEvent OnDataInitiateFileUploadsRequestEvent; + public event PlayFabResultEvent OnDataInitiateFileUploadsResultEvent; + public event PlayFabRequestEvent OnDataSetObjectsRequestEvent; + public event PlayFabResultEvent OnDataSetObjectsResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Data/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Data/PlayFabEvents.cs.meta new file mode 100644 index 00000000..f8e51ea5 --- /dev/null +++ b/Assets/PlayFabSDK/Data/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: deeaf7c863e34d24591edc6c7cf96650 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Economy.meta b/Assets/PlayFabSDK/Economy.meta new file mode 100644 index 00000000..e3b5f19c --- /dev/null +++ b/Assets/PlayFabSDK/Economy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ecd0b4fece474db4098610599e27e9af +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Economy/PlayFabEconomyAPI.cs b/Assets/PlayFabSDK/Economy/PlayFabEconomyAPI.cs new file mode 100644 index 00000000..6f57f151 --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEconomyAPI.cs @@ -0,0 +1,685 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.EconomyModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// API methods for managing the catalog. Inventory manages in-game assets for any given entity. + /// + public static class PlayFabEconomyAPI + { + static PlayFabEconomyAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Add inventory items. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is uncapped. + /// + public static void AddInventoryItems(AddInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/AddInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new item in the working catalog using provided metadata. + /// + public static void CreateDraftItem(CreateDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/CreateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates one or more upload URLs which can be used by the client to upload raw file data. Content URls and uploaded + /// content will be garbage collected after 24 hours if not attached to a draft or published item. Detailed pricing info + /// around uploading content can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/pricing/meters/catalog-meters + /// + public static void CreateUploadUrls(CreateUploadUrlsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/CreateUploadUrls", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes all reviews, helpfulness votes, and ratings submitted by the entity specified. + /// + public static void DeleteEntityItemReviews(DeleteEntityItemReviewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/DeleteEntityItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete an Inventory Collection. More information about Inventory Collections can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/collections + /// + public static void DeleteInventoryCollection(DeleteInventoryCollectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/DeleteInventoryCollection", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete inventory items + /// + public static void DeleteInventoryItems(DeleteInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/DeleteInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes an item from working catalog and all published versions from the public catalog. + /// + public static void DeleteItem(DeleteItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/DeleteItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Execute a list of Inventory Operations. A maximum list of 50 operations can be performed by a single request. There is + /// also a limit to 300 items that can be modified/added in a single request. For example, adding a bundle with 50 items + /// counts as 50 items modified. All operations must be done within a single inventory collection. This API has a reduced + /// RPS compared to an individual inventory operation with Player Entities limited to 60 requests in 90 seconds. + /// + public static void ExecuteInventoryOperations(ExecuteInventoryOperationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/ExecuteInventoryOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Transfer a list of inventory items. A maximum list of 50 operations can be performed by a single request. When the + /// response code is 202, one or more operations did not complete within the timeframe of the request. You can identify the + /// pending operations by looking for OperationStatus = 'InProgress'. You can check on the operation status at anytime + /// within 1 day of the request by passing the TransactionToken to the GetInventoryOperationStatus API. + /// + public static void ExecuteTransferOperations(ExecuteTransferOperationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/ExecuteTransferOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the configuration for the catalog. Only Title Entities can call this API. There is a limit of 100 requests in 10 + /// seconds for this API. More information about the Catalog Config can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings + /// + public static void GetCatalogConfig(GetCatalogConfigRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves an item from the working catalog. This item represents the current working state of the item. GetDraftItem + /// does not work off a cache of the Catalog and should be used when trying to get recent item updates. However, please note + /// that item references data is cached and may take a few moments for changes to propagate. + /// + public static void GetDraftItem(GetDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a paginated list of the items from the draft catalog. Up to 50 IDs can be retrieved in a single request. + /// GetDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates. + /// + public static void GetDraftItems(GetDraftItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a paginated list of the items from the draft catalog created by the Entity. Up to 50 items can be returned at + /// once. You can use continuation tokens to paginate through results that return greater than the limit. + /// GetEntityDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates. + /// + public static void GetEntityDraftItems(GetEntityDraftItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetEntityDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the submitted review for the specified item by the authenticated entity. Individual ratings and reviews data update + /// in near real time with delays within a few seconds. + /// + public static void GetEntityItemReview(GetEntityItemReviewRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetEntityItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get Inventory Collection Ids. Up to 50 Ids can be returned at once (or 250 with response compression enabled). You can + /// use continuation tokens to paginate through results that return greater than the limit. It can take a few seconds for + /// new collection Ids to show up. + /// + public static void GetInventoryCollectionIds(GetInventoryCollectionIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/GetInventoryCollectionIds", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get current inventory items. + /// + public static void GetInventoryItems(GetInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/GetInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the status of an inventory operation using an OperationToken. You can check on the operation status at anytime + /// within 1 day of the request by passing the TransactionToken to the this API. + /// + public static void GetInventoryOperationStatus(GetInventoryOperationStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/GetInventoryOperationStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves an item from the public catalog. GetItem does not work off a cache of the Catalog and should be used when + /// trying to get recent item updates. However, please note that item references data is cached and may take a few moments + /// for changes to propagate. + /// + public static void GetItem(GetItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Search for a given item and return a set of bundles and stores containing the item. Up to 50 items can be returned at + /// once. You can use continuation tokens to paginate through results that return greater than the limit. This API is + /// intended for tooling/automation scenarios and has a reduced RPS with Player Entities limited to 30 requests in 300 + /// seconds and Title Entities limited to 100 requests in 10 seconds. + /// + public static void GetItemContainers(GetItemContainersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetItemContainers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the moderation state for an item, including the concern category and string reason. More information about + /// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation + /// + public static void GetItemModerationState(GetItemModerationStateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the status of a publish of an item. + /// + public static void GetItemPublishStatus(GetItemPublishStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetItemPublishStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get a paginated set of reviews associated with the specified item. Individual ratings and reviews data update in near + /// real time with delays within a few seconds. + /// + public static void GetItemReviews(GetItemReviewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get a summary of all ratings and reviews associated with the specified item. Summary ratings data is cached with update + /// data coming within 15 minutes. + /// + public static void GetItemReviewSummary(GetItemReviewSummaryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetItemReviewSummary", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves items from the public catalog. Up to 50 items can be returned at once. GetItems does not work off a cache of + /// the Catalog and should be used when trying to get recent item updates. However, please note that item references data is + /// cached and may take a few moments for changes to propagate. + /// + public static void GetItems(GetItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/GetItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the access tokens. + /// + public static void GetMicrosoftStoreAccessTokens(GetMicrosoftStoreAccessTokensRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/GetMicrosoftStoreAccessTokens", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get transaction history for a player. Up to 250 Events can be returned at once. You can use continuation tokens to + /// paginate through results that return greater than the limit. Getting transaction history has a lower RPS limit than + /// getting a Player's inventory with Player Entities having a limit of 30 requests in 300 seconds. + /// + public static void GetTransactionHistory(GetTransactionHistoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/GetTransactionHistory", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Initiates a publish of an item from the working catalog to the public catalog. You can use the GetItemPublishStatus API + /// to track the state of the item publish. + /// + public static void PublishDraftItem(PublishDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/PublishDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Purchase an item or bundle. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is + /// uncapped. + /// + public static void PurchaseInventoryItems(PurchaseInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/PurchaseInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Redeem items. + /// + public static void RedeemAppleAppStoreInventoryItems(RedeemAppleAppStoreInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/RedeemAppleAppStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Redeem items. + /// + public static void RedeemGooglePlayInventoryItems(RedeemGooglePlayInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/RedeemGooglePlayInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Redeem items. + /// + public static void RedeemMicrosoftStoreInventoryItems(RedeemMicrosoftStoreInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/RedeemMicrosoftStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Redeem items. + /// + public static void RedeemNintendoEShopInventoryItems(RedeemNintendoEShopInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/RedeemNintendoEShopInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Redeem items. + /// + public static void RedeemPlayStationStoreInventoryItems(RedeemPlayStationStoreInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/RedeemPlayStationStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Redeem items. + /// + public static void RedeemSteamInventoryItems(RedeemSteamInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/RedeemSteamInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Submit a report for an item, indicating in what way the item is inappropriate. + /// + public static void ReportItem(ReportItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/ReportItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Submit a report for a review + /// + public static void ReportItemReview(ReportItemReviewRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/ReportItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates or updates a review for the specified item. More information around the caching surrounding item ratings and + /// reviews can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/ratings#ratings-design-and-caching + /// + public static void ReviewItem(ReviewItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/ReviewItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Executes a search against the public catalog using the provided search parameters and returns a set of paginated + /// results. SearchItems uses a cache of the catalog with item updates taking up to a few minutes to propagate. You should + /// use the GetItem API for when trying to immediately get recent item updates. More information about the Search API can be + /// found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/search + /// + public static void SearchItems(SearchItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/SearchItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the moderation state for an item, including the concern category and string reason. More information about + /// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation + /// + public static void SetItemModerationState(SetItemModerationStateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/SetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Submit a vote for a review, indicating whether the review was helpful or unhelpful. + /// + public static void SubmitItemReviewVote(SubmitItemReviewVoteRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/SubmitItemReviewVote", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Subtract inventory items. + /// + public static void SubtractInventoryItems(SubtractInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/SubtractInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Submit a request to takedown one or more reviews. + /// + public static void TakedownItemReviews(TakedownItemReviewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/TakedownItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Transfer inventory items. When transferring across collections, a 202 response indicates that the transfer did not + /// complete within the timeframe of the request. You can identify the pending operations by looking for OperationStatus = + /// 'InProgress'. You can check on the operation status at anytime within 1 day of the request by passing the + /// TransactionToken to the GetInventoryOperationStatus API. More information about item transfer scenarios can be found + /// here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/?tabs=inventory-game-manager#transfer-inventory-items + /// + public static void TransferInventoryItems(TransferInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/TransferInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the configuration for the catalog. Only Title Entities can call this API. There is a limit of 10 requests in 10 + /// seconds for this API. More information about the Catalog Config can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings + /// + public static void UpdateCatalogConfig(UpdateCatalogConfigRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/UpdateCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update the metadata for an item in the working catalog. + /// + public static void UpdateDraftItem(UpdateDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Catalog/UpdateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update inventory items + /// + public static void UpdateInventoryItems(UpdateInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Inventory/UpdateInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Economy/PlayFabEconomyAPI.cs.meta b/Assets/PlayFabSDK/Economy/PlayFabEconomyAPI.cs.meta new file mode 100644 index 00000000..29018c9e --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEconomyAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 56036e5215ab72544b38afa65f5684e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Economy/PlayFabEconomyInstanceAPI.cs b/Assets/PlayFabSDK/Economy/PlayFabEconomyInstanceAPI.cs new file mode 100644 index 00000000..ec404901 --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEconomyInstanceAPI.cs @@ -0,0 +1,611 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.EconomyModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// API methods for managing the catalog. Inventory manages in-game assets for any given entity. + /// + public class PlayFabEconomyInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabEconomyInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabEconomyInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Add inventory items. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is uncapped. + /// + public void AddInventoryItems(AddInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/AddInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new item in the working catalog using provided metadata. + /// + public void CreateDraftItem(CreateDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/CreateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates one or more upload URLs which can be used by the client to upload raw file data. Content URls and uploaded + /// content will be garbage collected after 24 hours if not attached to a draft or published item. Detailed pricing info + /// around uploading content can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/pricing/meters/catalog-meters + /// + public void CreateUploadUrls(CreateUploadUrlsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/CreateUploadUrls", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes all reviews, helpfulness votes, and ratings submitted by the entity specified. + /// + public void DeleteEntityItemReviews(DeleteEntityItemReviewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/DeleteEntityItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete an Inventory Collection. More information about Inventory Collections can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/collections + /// + public void DeleteInventoryCollection(DeleteInventoryCollectionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/DeleteInventoryCollection", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete inventory items + /// + public void DeleteInventoryItems(DeleteInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/DeleteInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes an item from working catalog and all published versions from the public catalog. + /// + public void DeleteItem(DeleteItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/DeleteItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Execute a list of Inventory Operations. A maximum list of 50 operations can be performed by a single request. There is + /// also a limit to 300 items that can be modified/added in a single request. For example, adding a bundle with 50 items + /// counts as 50 items modified. All operations must be done within a single inventory collection. This API has a reduced + /// RPS compared to an individual inventory operation with Player Entities limited to 60 requests in 90 seconds. + /// + public void ExecuteInventoryOperations(ExecuteInventoryOperationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/ExecuteInventoryOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Transfer a list of inventory items. A maximum list of 50 operations can be performed by a single request. When the + /// response code is 202, one or more operations did not complete within the timeframe of the request. You can identify the + /// pending operations by looking for OperationStatus = 'InProgress'. You can check on the operation status at anytime + /// within 1 day of the request by passing the TransactionToken to the GetInventoryOperationStatus API. + /// + public void ExecuteTransferOperations(ExecuteTransferOperationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/ExecuteTransferOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the configuration for the catalog. Only Title Entities can call this API. There is a limit of 100 requests in 10 + /// seconds for this API. More information about the Catalog Config can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings + /// + public void GetCatalogConfig(GetCatalogConfigRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves an item from the working catalog. This item represents the current working state of the item. GetDraftItem + /// does not work off a cache of the Catalog and should be used when trying to get recent item updates. However, please note + /// that item references data is cached and may take a few moments for changes to propagate. + /// + public void GetDraftItem(GetDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a paginated list of the items from the draft catalog. Up to 50 IDs can be retrieved in a single request. + /// GetDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates. + /// + public void GetDraftItems(GetDraftItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a paginated list of the items from the draft catalog created by the Entity. Up to 50 items can be returned at + /// once. You can use continuation tokens to paginate through results that return greater than the limit. + /// GetEntityDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates. + /// + public void GetEntityDraftItems(GetEntityDraftItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetEntityDraftItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the submitted review for the specified item by the authenticated entity. Individual ratings and reviews data update + /// in near real time with delays within a few seconds. + /// + public void GetEntityItemReview(GetEntityItemReviewRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetEntityItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get Inventory Collection Ids. Up to 50 Ids can be returned at once (or 250 with response compression enabled). You can + /// use continuation tokens to paginate through results that return greater than the limit. It can take a few seconds for + /// new collection Ids to show up. + /// + public void GetInventoryCollectionIds(GetInventoryCollectionIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/GetInventoryCollectionIds", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get current inventory items. + /// + public void GetInventoryItems(GetInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/GetInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the status of an inventory operation using an OperationToken. You can check on the operation status at anytime + /// within 1 day of the request by passing the TransactionToken to the this API. + /// + public void GetInventoryOperationStatus(GetInventoryOperationStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/GetInventoryOperationStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves an item from the public catalog. GetItem does not work off a cache of the Catalog and should be used when + /// trying to get recent item updates. However, please note that item references data is cached and may take a few moments + /// for changes to propagate. + /// + public void GetItem(GetItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Search for a given item and return a set of bundles and stores containing the item. Up to 50 items can be returned at + /// once. You can use continuation tokens to paginate through results that return greater than the limit. This API is + /// intended for tooling/automation scenarios and has a reduced RPS with Player Entities limited to 30 requests in 300 + /// seconds and Title Entities limited to 100 requests in 10 seconds. + /// + public void GetItemContainers(GetItemContainersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetItemContainers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the moderation state for an item, including the concern category and string reason. More information about + /// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation + /// + public void GetItemModerationState(GetItemModerationStateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the status of a publish of an item. + /// + public void GetItemPublishStatus(GetItemPublishStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetItemPublishStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get a paginated set of reviews associated with the specified item. Individual ratings and reviews data update in near + /// real time with delays within a few seconds. + /// + public void GetItemReviews(GetItemReviewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get a summary of all ratings and reviews associated with the specified item. Summary ratings data is cached with update + /// data coming within 15 minutes. + /// + public void GetItemReviewSummary(GetItemReviewSummaryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetItemReviewSummary", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves items from the public catalog. Up to 50 items can be returned at once. GetItems does not work off a cache of + /// the Catalog and should be used when trying to get recent item updates. However, please note that item references data is + /// cached and may take a few moments for changes to propagate. + /// + public void GetItems(GetItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/GetItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the access tokens. + /// + public void GetMicrosoftStoreAccessTokens(GetMicrosoftStoreAccessTokensRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/GetMicrosoftStoreAccessTokens", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get transaction history for a player. Up to 250 Events can be returned at once. You can use continuation tokens to + /// paginate through results that return greater than the limit. Getting transaction history has a lower RPS limit than + /// getting a Player's inventory with Player Entities having a limit of 30 requests in 300 seconds. + /// + public void GetTransactionHistory(GetTransactionHistoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/GetTransactionHistory", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Initiates a publish of an item from the working catalog to the public catalog. You can use the GetItemPublishStatus API + /// to track the state of the item publish. + /// + public void PublishDraftItem(PublishDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/PublishDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Purchase an item or bundle. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is + /// uncapped. + /// + public void PurchaseInventoryItems(PurchaseInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/PurchaseInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Redeem items. + /// + public void RedeemAppleAppStoreInventoryItems(RedeemAppleAppStoreInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/RedeemAppleAppStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Redeem items. + /// + public void RedeemGooglePlayInventoryItems(RedeemGooglePlayInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/RedeemGooglePlayInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Redeem items. + /// + public void RedeemMicrosoftStoreInventoryItems(RedeemMicrosoftStoreInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/RedeemMicrosoftStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Redeem items. + /// + public void RedeemNintendoEShopInventoryItems(RedeemNintendoEShopInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/RedeemNintendoEShopInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Redeem items. + /// + public void RedeemPlayStationStoreInventoryItems(RedeemPlayStationStoreInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/RedeemPlayStationStoreInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Redeem items. + /// + public void RedeemSteamInventoryItems(RedeemSteamInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/RedeemSteamInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Submit a report for an item, indicating in what way the item is inappropriate. + /// + public void ReportItem(ReportItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/ReportItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Submit a report for a review + /// + public void ReportItemReview(ReportItemReviewRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/ReportItemReview", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates or updates a review for the specified item. More information around the caching surrounding item ratings and + /// reviews can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/ratings#ratings-design-and-caching + /// + public void ReviewItem(ReviewItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/ReviewItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Executes a search against the public catalog using the provided search parameters and returns a set of paginated + /// results. SearchItems uses a cache of the catalog with item updates taking up to a few minutes to propagate. You should + /// use the GetItem API for when trying to immediately get recent item updates. More information about the Search API can be + /// found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/search + /// + public void SearchItems(SearchItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/SearchItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the moderation state for an item, including the concern category and string reason. More information about + /// moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation + /// + public void SetItemModerationState(SetItemModerationStateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/SetItemModerationState", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Submit a vote for a review, indicating whether the review was helpful or unhelpful. + /// + public void SubmitItemReviewVote(SubmitItemReviewVoteRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/SubmitItemReviewVote", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Subtract inventory items. + /// + public void SubtractInventoryItems(SubtractInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/SubtractInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Submit a request to takedown one or more reviews. + /// + public void TakedownItemReviews(TakedownItemReviewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/TakedownItemReviews", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Transfer inventory items. When transferring across collections, a 202 response indicates that the transfer did not + /// complete within the timeframe of the request. You can identify the pending operations by looking for OperationStatus = + /// 'InProgress'. You can check on the operation status at anytime within 1 day of the request by passing the + /// TransactionToken to the GetInventoryOperationStatus API. More information about item transfer scenarios can be found + /// here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/?tabs=inventory-game-manager#transfer-inventory-items + /// + public void TransferInventoryItems(TransferInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/TransferInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the configuration for the catalog. Only Title Entities can call this API. There is a limit of 10 requests in 10 + /// seconds for this API. More information about the Catalog Config can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings + /// + public void UpdateCatalogConfig(UpdateCatalogConfigRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/UpdateCatalogConfig", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update the metadata for an item in the working catalog. + /// + public void UpdateDraftItem(UpdateDraftItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Catalog/UpdateDraftItem", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update inventory items + /// + public void UpdateInventoryItems(UpdateInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Inventory/UpdateInventoryItems", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Economy/PlayFabEconomyInstanceAPI.cs.meta b/Assets/PlayFabSDK/Economy/PlayFabEconomyInstanceAPI.cs.meta new file mode 100644 index 00000000..448fa564 --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEconomyInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57229903c0965c74b90bc2ef8ccbc31c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Economy/PlayFabEconomyModels.cs b/Assets/PlayFabSDK/Economy/PlayFabEconomyModels.cs new file mode 100644 index 00000000..6c73d349 --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEconomyModels.cs @@ -0,0 +1,3301 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.EconomyModels +{ + [Serializable] + public class AddInventoryItemsOperation : PlayFabBaseModel + { + /// + /// The amount to add to the current item amount. + /// + public int? Amount; + /// + /// The duration to add to the current item expiration date. + /// + public double? DurationInSeconds; + /// + /// The inventory item the operation applies to. + /// + public InventoryItemReference Item; + /// + /// The values to apply to a stack newly created by this operation. + /// + public InitialValues NewStackValues; + } + + /// + /// Given an entity type, entity identifier and container details, will add the specified inventory items. + /// + [Serializable] + public class AddInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The amount to add for the current item. + /// + public int? Amount; + /// + /// The id of the entity's collection to perform this action on. (Default="default"). The number of inventory collections is + /// unlimited. + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The duration to add to the current item expiration date. + /// + public double? DurationInSeconds; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will + /// be garbage collected eventually. + /// + public string IdempotencyId; + /// + /// The inventory item the request applies to. + /// + public InventoryItemReference Item; + /// + /// The values to apply to a stack newly created by this request. + /// + public InitialValues NewStackValues; + } + + [Serializable] + public class AddInventoryItemsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The idempotency id used in the request. + /// + public string IdempotencyId; + /// + /// The ids of transactions that occurred as a result of the request. + /// + public List TransactionIds; + } + + [Serializable] + public class AlternateId : PlayFabBaseModel + { + /// + /// Type of the alternate ID. + /// + public string Type; + /// + /// Value of the alternate ID. + /// + public string Value; + } + + [Serializable] + public class CatalogAlternateId : PlayFabBaseModel + { + /// + /// Type of the alternate ID. + /// + public string Type; + /// + /// Value of the alternate ID. + /// + public string Value; + } + + [Serializable] + public class CatalogConfig : PlayFabBaseModel + { + /// + /// A list of player entity keys that will have admin permissions. There is a maximum of 64 entities that can be added. + /// + public List AdminEntities; + /// + /// The set of configuration that only applies to catalog items. + /// + public CatalogSpecificConfig Catalog; + /// + /// A list of deep link formats. Up to 10 can be added. + /// + public List DeepLinkFormats; + /// + /// A list of display properties to index. Up to 5 mappings can be added per Display Property Type. More info on display + /// properties can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/content-types-tags-and-properties#displayproperties + /// + public List DisplayPropertyIndexInfos; + /// + /// The set of configuration that only applies to Files. + /// + public FileConfig File; + /// + /// The set of configuration that only applies to Images. + /// + public ImageConfig Image; + /// + /// Flag defining whether catalog is enabled. + /// + public bool IsCatalogEnabled; + /// + /// A list of Platforms that can be applied to catalog items. Each platform can have a maximum character length of 40 and up + /// to 128 platforms can be listed. + /// + public List Platforms; + /// + /// The set of configuration that only applies to Ratings and Reviews. + /// + public ReviewConfig Review; + /// + /// A set of player entity keys that are allowed to review content. There is a maximum of 128 entities that can be added. + /// + public List ReviewerEntities; + /// + /// The set of configuration that only applies to user generated contents. + /// + public UserGeneratedContentSpecificConfig UserGeneratedContent; + } + + [Serializable] + public class CatalogItem : PlayFabBaseModel + { + /// + /// The alternate IDs associated with this item. An alternate ID can be set to 'FriendlyId' or any of the supported + /// marketplace names. + /// + public List AlternateIds; + /// + /// The set of content/files associated with this item. Up to 100 files can be added to an item. + /// + public List Contents; + /// + /// The client-defined type of the item. + /// + public string ContentType; + /// + /// The date and time when this item was created. + /// + public DateTime? CreationDate; + /// + /// The ID of the creator of this catalog item. + /// + public EntityKey CreatorEntity; + /// + /// The set of platform specific deep links for this item. + /// + public List DeepLinks; + /// + /// The Stack Id that will be used as default for this item in Inventory when an explicit one is not provided. This + /// DefaultStackId can be a static stack id or '{guid}', which will generate a unique stack id for the item. If null, + /// Inventory's default stack id will be used. + /// + public string DefaultStackId; + /// + /// A dictionary of localized descriptions. Key is language code and localized string is the value. The NEUTRAL locale is + /// required. Descriptions have a 10000 character limit per country code. + /// + public Dictionary Description; + /// + /// Game specific properties for display purposes. This is an arbitrary JSON blob. The Display Properties field has a 10000 + /// byte limit per item. + /// + public object DisplayProperties; + /// + /// The user provided version of the item for display purposes. Maximum character length of 50. + /// + public string DisplayVersion; + /// + /// The date of when the item will cease to be available. If not provided then the product will be available indefinitely. + /// + public DateTime? EndDate; + /// + /// The current ETag value that can be used for optimistic concurrency in the If-None-Match header. + /// + public string ETag; + /// + /// The unique ID of the item. + /// + public string Id; + /// + /// The images associated with this item. Images can be thumbnails or screenshots. Up to 100 images can be added to an item. + /// Only .png, .jpg, .gif, and .bmp file types can be uploaded + /// + public List Images; + /// + /// Indicates if the item is hidden. + /// + public bool? IsHidden; + /// + /// The item references associated with this item. For example, the items in a Bundle/Store/Subscription. Every item can + /// have up to 50 item references. + /// + public List ItemReferences; + /// + /// A dictionary of localized keywords. Key is language code and localized list of keywords is the value. Keywords have a 50 + /// character limit per keyword and up to 32 keywords can be added per country code. + /// + public Dictionary Keywords; + /// + /// The date and time this item was last updated. + /// + public DateTime? LastModifiedDate; + /// + /// The moderation state for this item. + /// + public ModerationState Moderation; + /// + /// The platforms supported by this item. + /// + public List Platforms; + /// + /// The prices the item can be purchased for. + /// + public CatalogPriceOptions PriceOptions; + /// + /// Rating summary for this item. + /// + public Rating Rating; + /// + /// The date of when the item will be available. If not provided then the product will appear immediately. + /// + public DateTime? StartDate; + /// + /// Optional details for stores items. + /// + public StoreDetails StoreDetails; + /// + /// The list of tags that are associated with this item. Up to 32 tags can be added to an item. + /// + public List Tags; + /// + /// A dictionary of localized titles. Key is language code and localized string is the value. The NEUTRAL locale is + /// required. Titles have a 512 character limit per country code. + /// + public Dictionary Title; + /// + /// The high-level type of the item. The following item types are supported: bundle, catalogItem, currency, store, ugc, + /// subscription. + /// + public string Type; + } + + [Serializable] + public class CatalogItemReference : PlayFabBaseModel + { + /// + /// The amount of the catalog item. + /// + public int? Amount; + /// + /// The unique ID of the catalog item. + /// + public string Id; + /// + /// The prices the catalog item can be purchased for. + /// + public CatalogPriceOptions PriceOptions; + } + + [Serializable] + public class CatalogPrice : PlayFabBaseModel + { + /// + /// The amounts of the catalog item price. Each price can have up to 15 item amounts. + /// + public List Amounts; + /// + /// The per-unit amount this price can be used to purchase. + /// + public int? UnitAmount; + /// + /// The per-unit duration this price can be used to purchase. The maximum duration is 100 years. + /// + public double? UnitDurationInSeconds; + } + + [Serializable] + public class CatalogPriceAmount : PlayFabBaseModel + { + /// + /// The amount of the price. + /// + public int Amount; + /// + /// The Item Id of the price. + /// + public string ItemId; + } + + [Serializable] + public class CatalogPriceAmountOverride : PlayFabBaseModel + { + /// + /// The exact value that should be utilized in the override. + /// + public int? FixedValue; + /// + /// The id of the item this override should utilize. + /// + public string ItemId; + /// + /// The multiplier that will be applied to the base Catalog value to determine what value should be utilized in the + /// override. + /// + public double? Multiplier; + } + + [Serializable] + public class CatalogPriceOptions : PlayFabBaseModel + { + /// + /// Prices of the catalog item. An item can have up to 15 prices + /// + public List Prices; + } + + [Serializable] + public class CatalogPriceOptionsOverride : PlayFabBaseModel + { + /// + /// The prices utilized in the override. + /// + public List Prices; + } + + [Serializable] + public class CatalogPriceOverride : PlayFabBaseModel + { + /// + /// The currency amounts utilized in the override for a singular price. + /// + public List Amounts; + } + + [Serializable] + public class CatalogSpecificConfig : PlayFabBaseModel + { + /// + /// The set of content types that will be used for validation. Each content type can have a maximum character length of 40 + /// and up to 128 types can be listed. + /// + public List ContentTypes; + /// + /// The set of tags that will be used for validation. Each tag can have a maximum character length of 32 and up to 1024 tags + /// can be listed. + /// + public List Tags; + } + + [Serializable] + public class CategoryRatingConfig : PlayFabBaseModel + { + /// + /// Name of the category. + /// + public string Name; + } + + public enum ConcernCategory + { + None, + OffensiveContent, + ChildExploitation, + MalwareOrVirus, + PrivacyConcerns, + MisleadingApp, + PoorPerformance, + ReviewResponse, + SpamAdvertising, + Profanity + } + + [Serializable] + public class Content : PlayFabBaseModel + { + /// + /// The content unique ID. + /// + public string Id; + /// + /// The maximum client version that this content is compatible with. Client Versions can be up to 3 segments separated by + /// periods(.) and each segment can have a maximum value of 65535. + /// + public string MaxClientVersion; + /// + /// The minimum client version that this content is compatible with. Client Versions can be up to 3 segments separated by + /// periods(.) and each segment can have a maximum value of 65535. + /// + public string MinClientVersion; + /// + /// The list of tags that are associated with this content. Tags must be defined in the Catalog Config before being used in + /// content. + /// + public List Tags; + /// + /// The client-defined type of the content. Content Types must be defined in the Catalog Config before being used. + /// + public string Type; + /// + /// The Azure CDN URL for retrieval of the catalog item binary content. + /// + public string Url; + } + + [Serializable] + public class ContentFeed : PlayFabBaseModel + { + } + + public enum CountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW, + Unknown + } + + /// + /// The item will not be published to the public catalog until the PublishItem API is called for the item. + /// + [Serializable] + public class CreateDraftItemRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Metadata describing the new catalog item to be created. + /// + public CatalogItem Item; + /// + /// Whether the item should be published immediately. This value is optional, defaults to false. + /// + public bool Publish; + } + + [Serializable] + public class CreateDraftItemResponse : PlayFabResultCommon + { + /// + /// Updated metadata describing the catalog item just created. + /// + public CatalogItem Item; + } + + /// + /// Upload URLs point to Azure Blobs; clients must follow the Microsoft Azure Storage Blob Service REST API pattern for + /// uploading content. The response contains upload URLs and IDs for each file. The IDs and URLs returned must be added to + /// the item metadata and committed using the CreateDraftItem or UpdateDraftItem Item APIs. + /// + [Serializable] + public class CreateUploadUrlsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description of the files to be uploaded by the client. + /// + public List Files; + } + + [Serializable] + public class CreateUploadUrlsResponse : PlayFabResultCommon + { + /// + /// List of URLs metadata for the files to be uploaded by the client. + /// + public List UploadUrls; + } + + [Serializable] + public class DeepLink : PlayFabBaseModel + { + /// + /// Target platform for this deep link. + /// + public string Platform; + /// + /// The deep link for this platform. + /// + public string Url; + } + + [Serializable] + public class DeepLinkFormat : PlayFabBaseModel + { + /// + /// The format of the deep link to return. The format should contain '{id}' to represent where the item ID should be placed. + /// + public string Format; + /// + /// The target platform for the deep link. + /// + public string Platform; + } + + [Serializable] + public class DeleteEntityItemReviewsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + } + + [Serializable] + public class DeleteEntityItemReviewsResponse : PlayFabResultCommon + { + } + + /// + /// Delete an Inventory Collection by the specified Id for an Entity + /// + [Serializable] + public class DeleteInventoryCollectionRequest : PlayFabRequestCommon + { + /// + /// The inventory collection id the request applies to. + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity the request is about. Set to the caller by default. + /// + public EntityKey Entity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + } + + [Serializable] + public class DeleteInventoryCollectionResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteInventoryItemsOperation : PlayFabBaseModel + { + /// + /// The inventory item the operation applies to. + /// + public InventoryItemReference Item; + } + + /// + /// Given an entity type, entity identifier and container details, will delete the entity's inventory items + /// + [Serializable] + public class DeleteInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default"). The number of inventory collections is + /// unlimited. + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will + /// be garbage collected eventually. + /// + public string IdempotencyId; + /// + /// The inventory item the request applies to. + /// + public InventoryItemReference Item; + } + + [Serializable] + public class DeleteInventoryItemsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources. + /// + public string ETag; + /// + /// The idempotency id used in the request. + /// + public string IdempotencyId; + /// + /// The ids of transactions that occurred as a result of the request. + /// + public List TransactionIds; + } + + [Serializable] + public class DeleteItemRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class DeleteItemResponse : PlayFabResultCommon + { + } + + [Serializable] + public class DisplayPropertyIndexInfo : PlayFabBaseModel + { + /// + /// The property name in the 'DisplayProperties' property to be indexed. + /// + public string Name; + /// + /// The type of the property to be indexed. + /// + public DisplayPropertyType? Type; + } + + public enum DisplayPropertyType + { + None, + QueryDateTime, + QueryDouble, + QueryString, + SearchString + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + /// + /// Execute a list of Inventory Operations for an Entity + /// + [Serializable] + public class ExecuteInventoryOperationsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default"). The number of inventory collections is + /// unlimited. + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will + /// be garbage collected eventually. + /// + public string IdempotencyId; + /// + /// The operations to run transactionally. The operations will be executed in-order sequentially and will succeed or fail as + /// a batch. Up to 50 operations can be added. + /// + public List Operations; + } + + [Serializable] + public class ExecuteInventoryOperationsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The idempotency id used in the request. + /// + public string IdempotencyId; + /// + /// The ids of the transactions that occurred as a result of the request. + /// + public List TransactionIds; + } + + /// + /// Transfer the specified list of inventory items of an entity's container Id to another entity's container Id. + /// + [Serializable] + public class ExecuteTransferOperationsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The inventory collection id the request is transferring from. (Default="default") + /// + public string GivingCollectionId; + /// + /// The entity the request is transferring from. Set to the caller by default. + /// + public EntityKey GivingEntity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string GivingETag; + /// + /// The idempotency id for the request. + /// + public string IdempotencyId; + /// + /// The transfer operations to run transactionally. The operations will be executed in-order sequentially and will succeed + /// or fail as a batch. Up to 50 operations can be added. + /// + public List Operations; + /// + /// The inventory collection id the request is transferring to. (Default="default") + /// + public string ReceivingCollectionId; + /// + /// The entity the request is transferring to. Set to the caller by default. + /// + public EntityKey ReceivingEntity; + } + + [Serializable] + public class ExecuteTransferOperationsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources (before transferring from). This value will be empty if + /// the operation has not completed yet. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string GivingETag; + /// + /// The ids of transactions that occurred as a result of the request's giving action. + /// + public List GivingTransactionIds; + /// + /// The Idempotency ID for this request. + /// + public string IdempotencyId; + /// + /// The transfer operation status. Possible values are 'InProgress' or 'Completed'. If the operation has completed, the + /// response code will be 200. Otherwise, it will be 202. + /// + public string OperationStatus; + /// + /// The token that can be used to get the status of the transfer operation. This will only have a value if OperationStatus + /// is 'InProgress'. + /// + public string OperationToken; + /// + /// ETags are used for concurrency checking when updating resources (before transferring to). This value will be empty if + /// the operation has not completed yet. + /// + public string ReceivingETag; + /// + /// The ids of transactions that occurred as a result of the request's receiving action. + /// + public List ReceivingTransactionIds; + } + + [Serializable] + public class FileConfig : PlayFabBaseModel + { + /// + /// The set of content types that will be used for validation. Each content type can have a maximum character length of 40 + /// and up to 128 types can be listed. + /// + public List ContentTypes; + /// + /// The set of tags that will be used for validation. Each tag can have a maximum character length of 32 and up to 1024 tags + /// can be listed. + /// + public List Tags; + } + + [Serializable] + public class FilterOptions : PlayFabBaseModel + { + /// + /// The OData filter utilized. Mutually exclusive with 'IncludeAllItems'. More info about Filter Complexity limits can be + /// found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/search#limits + /// + public string Filter; + /// + /// The flag that overrides the filter and allows for returning all catalog items. Mutually exclusive with 'Filter'. + /// + public bool? IncludeAllItems; + } + + [Serializable] + public class GetCatalogConfigRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetCatalogConfigResponse : PlayFabResultCommon + { + /// + /// The catalog configuration. + /// + public CatalogConfig Config; + } + + [Serializable] + public class GetDraftItemRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class GetDraftItemResponse : PlayFabResultCommon + { + /// + /// Full metadata of the catalog item requested. + /// + public CatalogItem Item; + } + + [Serializable] + public class GetDraftItemsRequest : PlayFabRequestCommon + { + /// + /// List of item alternate IDs. + /// + public List AlternateIds; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// List of Item Ids. + /// + public List Ids; + } + + [Serializable] + public class GetDraftItemsResponse : PlayFabResultCommon + { + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + /// + /// A set of items created by the entity. + /// + public List Items; + } + + [Serializable] + public class GetEntityDraftItemsRequest : PlayFabRequestCommon + { + /// + /// An opaque token used to retrieve the next page of items created by the caller, if any are available. Should be null on + /// initial request. + /// + public string ContinuationToken; + /// + /// Number of items to retrieve. This value is optional. Default value is 10. + /// + public int Count; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// OData Filter to refine the items returned. CatalogItem properties 'type' can be used in the filter. For example: "type + /// eq 'ugc'" + /// + public string Filter; + } + + [Serializable] + public class GetEntityDraftItemsResponse : PlayFabResultCommon + { + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + /// + /// A set of items created by the entity. + /// + public List Items; + } + + [Serializable] + public class GetEntityItemReviewRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class GetEntityItemReviewResponse : PlayFabResultCommon + { + /// + /// The review the entity submitted for the requested item. + /// + public Review Review; + } + + /// + /// Get a list of Inventory Collection Ids for the specified Entity + /// + [Serializable] + public class GetInventoryCollectionIdsRequest : PlayFabRequestCommon + { + /// + /// An opaque token used to retrieve the next page of collection ids, if any are available. + /// + public string ContinuationToken; + /// + /// Number of items to retrieve. This value is optional. The default value is 10 + /// + public int Count; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity the request is about. Set to the caller by default. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetInventoryCollectionIdsResponse : PlayFabResultCommon + { + /// + /// The requested inventory collection ids. + /// + public List CollectionIds; + /// + /// An opaque token used to retrieve the next page of collection ids, if any are available. + /// + public string ContinuationToken; + } + + /// + /// Given an entity type, entity identifier and container details, will get the entity's inventory items. + /// + [Serializable] + public class GetInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// An opaque token used to retrieve the next page of items in the inventory, if any are available. Should be null on + /// initial request. + /// + public string ContinuationToken; + /// + /// Number of items to retrieve. This value is optional. Maximum page size is 50. The default value is 10 + /// + public int Count; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// OData Filter to refine the items returned. InventoryItem properties 'type', 'id', and 'stackId' can be used in the + /// filter. For example: "type eq 'currency'" + /// + public string Filter; + } + + [Serializable] + public class GetInventoryItemsResponse : PlayFabResultCommon + { + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The requested inventory items. + /// + public List Items; + } + + /// + /// Get the status of an Inventory Operation using an OperationToken. + /// + [Serializable] + public class GetInventoryOperationStatusRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetInventoryOperationStatusResponse : PlayFabResultCommon + { + /// + /// The inventory operation status. + /// + public string OperationStatus; + } + + /// + /// Given an item, return a set of bundles and stores containing the item. + /// + [Serializable] + public class GetItemContainersRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// An opaque token used to retrieve the next page of items in the inventory, if any are available. Should be null on + /// initial request. + /// + public string ContinuationToken; + /// + /// Number of items to retrieve. This value is optional. Default value is 10. + /// + public int Count; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class GetItemContainersResponse : PlayFabResultCommon + { + /// + /// List of Bundles and Stores containing the requested items. + /// + public List Containers; + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + } + + [Serializable] + public class GetItemModerationStateRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class GetItemModerationStateResponse : PlayFabResultCommon + { + /// + /// The current moderation state for the requested item. + /// + public ModerationState State; + } + + [Serializable] + public class GetItemPublishStatusRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class GetItemPublishStatusResponse : PlayFabResultCommon + { + /// + /// High level status of the published item. + /// + public PublishResult? Result; + /// + /// Descriptive message about the current status of the publish. + /// + public string StatusMessage; + } + + [Serializable] + public class GetItemRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + } + + /// + /// Get item result. + /// + [Serializable] + public class GetItemResponse : PlayFabResultCommon + { + /// + /// The item result. + /// + public CatalogItem Item; + } + + [Serializable] + public class GetItemReviewsRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + /// + /// Number of items to retrieve. This value is optional. Default value is 10. + /// + public int Count; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The unique ID of the item. + /// + public string Id; + /// + /// An OData orderBy used to order the results of the query. Possible values are Helpfulness, Rating, and Submitted (For + /// example: "Submitted desc") + /// + public string OrderBy; + } + + [Serializable] + public class GetItemReviewsResponse : PlayFabResultCommon + { + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + /// + /// The paginated set of results. + /// + public List Reviews; + } + + [Serializable] + public class GetItemReviewSummaryRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class GetItemReviewSummaryResponse : PlayFabResultCommon + { + /// + /// The least favorable review for this item. + /// + public Review LeastFavorableReview; + /// + /// The most favorable review for this item. + /// + public Review MostFavorableReview; + /// + /// The summary of ratings associated with this item. + /// + public Rating Rating; + /// + /// The total number of reviews associated with this item. + /// + public int ReviewsCount; + } + + [Serializable] + public class GetItemsRequest : PlayFabRequestCommon + { + /// + /// List of item alternate IDs. + /// + public List AlternateIds; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// List of Item Ids. + /// + public List Ids; + } + + [Serializable] + public class GetItemsResponse : PlayFabResultCommon + { + /// + /// Metadata of set of items. + /// + public List Items; + } + + /// + /// Gets the access tokens for Microsoft Store authentication. + /// + [Serializable] + public class GetMicrosoftStoreAccessTokensRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetMicrosoftStoreAccessTokensResponse : PlayFabResultCommon + { + /// + /// The collections access token for calling https://onestore.microsoft.com/b2b/keys/create/collections to obtain a + /// CollectionsIdKey for the user + /// + public string CollectionsAccessToken; + /// + /// The date the collections access token expires + /// + public DateTime CollectionsAccessTokenExpirationDate; + } + + /// + /// Get transaction history for specified entity and collection. + /// + [Serializable] + public class GetTransactionHistoryRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// An opaque token used to retrieve the next page of items, if any are available. Should be null on initial request. + /// + public string ContinuationToken; + /// + /// Number of items to retrieve. This value is optional. The default value is 10 + /// + public int Count; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// An OData filter used to refine the TransactionHistory. Transaction properties 'timestamp', 'transactionid', 'apiname' + /// and 'operationtype' can be used in the filter. Properties 'transactionid', 'apiname', and 'operationtype' cannot be used + /// together in a single request. The 'timestamp' property can be combined with 'apiname' or 'operationtype' in a single + /// request. For example: "timestamp ge 2023-06-20T23:30Z" or "transactionid eq '10'" or "(timestamp ge 2023-06-20T23:30Z) + /// and (apiname eq 'AddInventoryItems')". By default, a 6 month timespan from the current date is used. + /// + public string Filter; + /// + /// An OData orderby to order TransactionHistory results. The only supported values are 'timestamp asc' or 'timestamp desc'. + /// Default orderby is 'timestamp asc' + /// + public string OrderBy; + } + + [Serializable] + public class GetTransactionHistoryResponse : PlayFabResultCommon + { + /// + /// An opaque token used to retrieve the next page of items, if any are available. Should be null on initial request. + /// + public string ContinuationToken; + /// + /// The requested inventory transactions. + /// + public List Transactions; + } + + [Serializable] + public class GooglePlayProductPurchase : PlayFabBaseModel + { + /// + /// The Product ID (SKU) of the InApp product purchased from the Google Play store. + /// + public string ProductId; + /// + /// The token provided to the player's device when the product was purchased + /// + public string Token; + } + + public enum HelpfulnessVote + { + None, + UnHelpful, + Helpful + } + + [Serializable] + public class Image : PlayFabBaseModel + { + /// + /// The image unique ID. + /// + public string Id; + /// + /// The client-defined tag associated with this image. Tags must be defined in the Catalog Config before being used in + /// images + /// + public string Tag; + /// + /// Images can be defined as either a "thumbnail" or "screenshot". There can only be one "thumbnail" image per item. + /// + public string Type; + /// + /// The URL for retrieval of the image. + /// + public string Url; + } + + [Serializable] + public class ImageConfig : PlayFabBaseModel + { + /// + /// The set of tags that will be used for validation. Each tag can have a maximum character length of 32 and up to 1024 tags + /// can be listed. + /// + public List Tags; + } + + [Serializable] + public class InitialValues : PlayFabBaseModel + { + /// + /// Game specific properties for display purposes. The Display Properties field has a 1000 byte limit. + /// + public object DisplayProperties; + } + + [Serializable] + public class InventoryItem : PlayFabBaseModel + { + /// + /// The amount of the item. + /// + public int? Amount; + /// + /// Game specific properties for display purposes. This is an arbitrary JSON blob. The Display Properties field has a 1000 + /// byte limit. + /// + public object DisplayProperties; + /// + /// Only used for subscriptions. The date of when the item will expire in UTC. + /// + public DateTime? ExpirationDate; + /// + /// The id of the item. This should correspond to the item id in the catalog. + /// + public string Id; + /// + /// The stack id of the item. + /// + public string StackId; + /// + /// The type of the item. This should correspond to the item type in the catalog. + /// + public string Type; + } + + [Serializable] + public class InventoryItemReference : PlayFabBaseModel + { + /// + /// The inventory item alternate id the request applies to. + /// + public AlternateId AlternateId; + /// + /// The inventory item id the request applies to. + /// + public string Id; + /// + /// The inventory stack id the request should redeem to. (Default="default") + /// + public string StackId; + } + + [Serializable] + public class InventoryOperation : PlayFabBaseModel + { + /// + /// The add operation. + /// + public AddInventoryItemsOperation Add; + /// + /// The delete operation. + /// + public DeleteInventoryItemsOperation Delete; + /// + /// The purchase operation. + /// + public PurchaseInventoryItemsOperation Purchase; + /// + /// The subtract operation. + /// + public SubtractInventoryItemsOperation Subtract; + /// + /// The transfer operation. + /// + public TransferInventoryItemsOperation Transfer; + /// + /// The update operation. + /// + public UpdateInventoryItemsOperation Update; + } + + [Serializable] + public class KeywordSet : PlayFabBaseModel + { + /// + /// A list of localized keywords. + /// + public List Values; + } + + [Serializable] + public class ModerationState : PlayFabBaseModel + { + /// + /// The date and time this moderation state was last updated. + /// + public DateTime? LastModifiedDate; + /// + /// The current stated reason for the associated item being moderated. + /// + public string Reason; + /// + /// The current moderation status for the associated item. + /// + public ModerationStatus? Status; + } + + public enum ModerationStatus + { + Unknown, + AwaitingModeration, + Approved, + Rejected + } + + [Serializable] + public class PayoutDetails : PlayFabBaseModel + { + } + + [Serializable] + public class Permissions : PlayFabBaseModel + { + /// + /// The list of ids of Segments that the a player can be in to purchase from the store. When a value is provided, the player + /// must be in at least one of the segments listed for the purchase to be allowed. + /// + public List SegmentIds; + } + + /// + /// The call kicks off a workflow to publish the item to the public catalog. The Publish Status API should be used to + /// monitor the publish job. + /// + [Serializable] + public class PublishDraftItemRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// ETag of the catalog item to published from the working catalog to the public catalog. Used for optimistic concurrency. + /// If the provided ETag does not match the ETag in the current working catalog, the request will be rejected. If not + /// provided, the current version of the document in the working catalog will be published. + /// + public string ETag; + /// + /// The unique ID of the item. + /// + public string Id; + } + + [Serializable] + public class PublishDraftItemResponse : PlayFabResultCommon + { + } + + public enum PublishResult + { + Unknown, + Pending, + Succeeded, + Failed, + Canceled + } + + [Serializable] + public class PurchaseInventoryItemsOperation : PlayFabBaseModel + { + /// + /// The amount to purchase. + /// + public int? Amount; + /// + /// Indicates whether stacks reduced to an amount of 0 during the operation should be deleted from the inventory. (Default = + /// false) + /// + public bool DeleteEmptyStacks; + /// + /// The duration to purchase. + /// + public double? DurationInSeconds; + /// + /// The inventory item the operation applies to. + /// + public InventoryItemReference Item; + /// + /// The values to apply to a stack newly created by this operation. + /// + public InitialValues NewStackValues; + /// + /// The per-item price the item is expected to be purchased at. This must match a value configured in the Catalog or + /// specified Store. + /// + public List PriceAmounts; + /// + /// The id of the Store to purchase the item from. + /// + public string StoreId; + } + + /// + /// Purchase a single item or bundle, paying the associated price. + /// + [Serializable] + public class PurchaseInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The amount to purchase. + /// + public int? Amount; + /// + /// The id of the entity's collection to perform this action on. (Default="default"). The number of inventory collections is + /// unlimited. + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates whether stacks reduced to an amount of 0 during the request should be deleted from the inventory. + /// (Default=false) + /// + public bool DeleteEmptyStacks; + /// + /// The duration to purchase. + /// + public double? DurationInSeconds; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will + /// be garbage collected eventually. + /// + public string IdempotencyId; + /// + /// The inventory item the request applies to. + /// + public InventoryItemReference Item; + /// + /// The values to apply to a stack newly created by this request. + /// + public InitialValues NewStackValues; + /// + /// The per-item price the item is expected to be purchased at. This must match a value configured in the Catalog or + /// specified Store. + /// + public List PriceAmounts; + /// + /// The id of the Store to purchase the item from. + /// + public string StoreId; + } + + [Serializable] + public class PurchaseInventoryItemsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The idempotency id used in the request. + /// + public string IdempotencyId; + /// + /// The ids of transactions that occurred as a result of the request. + /// + public List TransactionIds; + } + + [Serializable] + public class PurchaseOverride : PlayFabBaseModel + { + } + + [Serializable] + public class PurchaseOverridesInfo : PlayFabBaseModel + { + } + + [Serializable] + public class PurchasePriceAmount : PlayFabBaseModel + { + /// + /// The amount of the inventory item to use in the purchase . + /// + public int Amount; + /// + /// The inventory item id to use in the purchase . + /// + public string ItemId; + /// + /// The inventory stack id the to use in the purchase. Set to "default" by default + /// + public string StackId; + } + + [Serializable] + public class Rating : PlayFabBaseModel + { + /// + /// The average rating for this item. + /// + public float? Average; + /// + /// The total count of 1 star ratings for this item. + /// + public int? Count1Star; + /// + /// The total count of 2 star ratings for this item. + /// + public int? Count2Star; + /// + /// The total count of 3 star ratings for this item. + /// + public int? Count3Star; + /// + /// The total count of 4 star ratings for this item. + /// + public int? Count4Star; + /// + /// The total count of 5 star ratings for this item. + /// + public int? Count5Star; + /// + /// The total count of ratings for this item. + /// + public int? TotalCount; + } + + [Serializable] + public class RealMoneyPriceDetails : PlayFabBaseModel + { + } + + /// + /// Redeem items from the Apple App Store. + /// + [Serializable] + public class RedeemAppleAppStoreInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The receipt provided by the Apple marketplace upon successful purchase. + /// + public string Receipt; + } + + [Serializable] + public class RedeemAppleAppStoreInventoryItemsResponse : PlayFabResultCommon + { + /// + /// The list of failed redemptions from the external marketplace. + /// + public List Failed; + /// + /// The list of successful redemptions from the external marketplace. + /// + public List Succeeded; + /// + /// The Transaction IDs associated with the inventory modifications + /// + public List TransactionIds; + } + + /// + /// Redeem items from the Google Play Store. + /// + [Serializable] + public class RedeemGooglePlayInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The list of purchases to redeem + /// + public List Purchases; + } + + [Serializable] + public class RedeemGooglePlayInventoryItemsResponse : PlayFabResultCommon + { + /// + /// The list of failed redemptions from the external marketplace. + /// + public List Failed; + /// + /// The list of successful redemptions from the external marketplace. + /// + public List Succeeded; + /// + /// The Transaction IDs associated with the inventory modifications + /// + public List TransactionIds; + } + + /// + /// Redeem items from the Microsoft Store. + /// + [Serializable] + public class RedeemMicrosoftStoreInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// The OneStore Collections Id Key used for AAD authentication. + /// + public string CollectionsIdKey; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Xbox Token used for delegated business partner authentication. Token provided by the Xbox Live SDK method + /// GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). + /// + public string XboxToken; + } + + [Serializable] + public class RedeemMicrosoftStoreInventoryItemsResponse : PlayFabResultCommon + { + /// + /// The list of failed redemptions from the external marketplace. + /// + public List Failed; + /// + /// The list of successful redemptions from the external marketplace. + /// + public List Succeeded; + /// + /// The Transaction IDs associated with the inventory modifications + /// + public List TransactionIds; + } + + /// + /// Redeem items from the Nintendo EShop. + /// + [Serializable] + public class RedeemNintendoEShopInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The Nintendo provided token authorizing redemption + /// + public string NintendoServiceAccountIdToken; + } + + [Serializable] + public class RedeemNintendoEShopInventoryItemsResponse : PlayFabResultCommon + { + /// + /// The list of failed redemptions from the external marketplace. + /// + public List Failed; + /// + /// The list of successful redemptions from the external marketplace. + /// + public List Succeeded; + /// + /// The Transaction IDs associated with the inventory modifications + /// + public List TransactionIds; + } + + /// + /// Redeem items from the PlayStation Store. + /// + [Serializable] + public class RedeemPlayStationStoreInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// Auth code returned by PlayStation :tm: Network OAuth system. + /// + public string AuthorizationCode; + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code. + /// + public string RedirectUri; + /// + /// Optional Service Label to pass into the request. + /// + public string ServiceLabel; + } + + [Serializable] + public class RedeemPlayStationStoreInventoryItemsResponse : PlayFabResultCommon + { + /// + /// The list of failed redemptions from the external marketplace. + /// + public List Failed; + /// + /// The list of successful redemptions from the external marketplace. + /// + public List Succeeded; + /// + /// The Transaction IDs associated with the inventory modifications + /// + public List TransactionIds; + } + + /// + /// Redeem inventory items from Steam. + /// + [Serializable] + public class RedeemSteamInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default") + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + } + + [Serializable] + public class RedeemSteamInventoryItemsResponse : PlayFabResultCommon + { + /// + /// The list of failed redemptions from the external marketplace. + /// + public List Failed; + /// + /// The list of successful redemptions from the external marketplace. + /// + public List Succeeded; + /// + /// The Transaction IDs associated with the inventory modifications + /// + public List TransactionIds; + } + + [Serializable] + public class RedemptionFailure : PlayFabBaseModel + { + /// + /// The marketplace failure code. + /// + public string FailureCode; + /// + /// The marketplace error details explaining why the offer failed to redeem. + /// + public string FailureDetails; + /// + /// The Marketplace Alternate ID being redeemed. + /// + public string MarketplaceAlternateId; + /// + /// The transaction id in the external marketplace. + /// + public string MarketplaceTransactionId; + } + + [Serializable] + public class RedemptionSuccess : PlayFabBaseModel + { + /// + /// The Marketplace Alternate ID being redeemed. + /// + public string MarketplaceAlternateId; + /// + /// The transaction id in the external marketplace. + /// + public string MarketplaceTransactionId; + /// + /// The timestamp for when the redeem was completed. + /// + public DateTime SuccessTimestamp; + } + + [Serializable] + public class ReportItemRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// Category of concern for this report. + /// + public ConcernCategory? ConcernCategory; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + /// + /// The string reason for this report. + /// + public string Reason; + } + + [Serializable] + public class ReportItemResponse : PlayFabResultCommon + { + } + + /// + /// Submit a report for an inappropriate review, allowing the submitting user to specify their concern. + /// + [Serializable] + public class ReportItemReviewRequest : PlayFabRequestCommon + { + /// + /// An alternate ID of the item associated with the review. + /// + public CatalogAlternateId AlternateId; + /// + /// The reason this review is being reported. + /// + public ConcernCategory? ConcernCategory; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The string ID of the item associated with the review. + /// + public string ItemId; + /// + /// The string reason for this report. + /// + public string Reason; + /// + /// The ID of the review to submit a report for. + /// + public string ReviewId; + } + + [Serializable] + public class ReportItemReviewResponse : PlayFabResultCommon + { + } + + [Serializable] + public class Review : PlayFabBaseModel + { + /// + /// The star rating associated with each selected category in this review. + /// + public Dictionary CategoryRatings; + /// + /// The number of negative helpfulness votes for this review. + /// + public int HelpfulNegative; + /// + /// The number of positive helpfulness votes for this review. + /// + public int HelpfulPositive; + /// + /// Indicates whether the review author has the item installed. + /// + public bool IsInstalled; + /// + /// The ID of the item being reviewed. + /// + public string ItemId; + /// + /// The version of the item being reviewed. + /// + public string ItemVersion; + /// + /// The locale for which this review was submitted in. + /// + public string Locale; + /// + /// Star rating associated with this review. + /// + public int Rating; + /// + /// The ID of the author of the review. + /// + public EntityKey ReviewerEntity; + /// + /// Deprecated. Use ReviewerEntity instead. This property will be removed in a future release. + /// + public string ReviewerId; + /// + /// The ID of the review. + /// + public string ReviewId; + /// + /// The full text of this review. + /// + public string ReviewText; + /// + /// The date and time this review was last submitted. + /// + public DateTime Submitted; + /// + /// The title of this review. + /// + public string Title; + } + + [Serializable] + public class ReviewConfig : PlayFabBaseModel + { + /// + /// A set of categories that can be applied toward ratings and reviews. + /// + public List CategoryRatings; + } + + [Serializable] + public class ReviewItemRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The unique ID of the item. + /// + public string Id; + /// + /// The review to submit. + /// + public Review Review; + } + + [Serializable] + public class ReviewItemResponse : PlayFabResultCommon + { + } + + [Serializable] + public class ReviewTakedown : PlayFabBaseModel + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The ID of the item associated with the review to take down. + /// + public string ItemId; + /// + /// The ID of the review to take down. + /// + public string ReviewId; + } + + [Serializable] + public class ScanResult : PlayFabBaseModel + { + /// + /// The URL of the item which failed the scan. + /// + public string Url; + } + + [Serializable] + public class SearchItemsRequest : PlayFabRequestCommon + { + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + /// + /// Number of items to retrieve. This value is optional. Maximum page size is 50. Default value is 10. + /// + public int Count; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// An OData filter used to refine the search query (For example: "type eq 'ugc'"). More info about Filter Complexity limits + /// can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/search#limits + /// + public string Filter; + /// + /// The locale to be returned in the result. + /// + public string Language; + /// + /// An OData orderBy used to order the results of the search query. For example: "rating/average asc" + /// + public string OrderBy; + /// + /// The text to search for. + /// + public string Search; + /// + /// An OData select query option used to augment the search results. If not defined, the default search result metadata will + /// be returned. + /// + public string Select; + /// + /// The store to restrict the search request to. + /// + public StoreReference Store; + } + + [Serializable] + public class SearchItemsResponse : PlayFabResultCommon + { + /// + /// An opaque token used to retrieve the next page of items, if any are available. + /// + public string ContinuationToken; + /// + /// The paginated set of results for the search query. + /// + public List Items; + } + + [Serializable] + public class SetItemModerationStateRequest : PlayFabRequestCommon + { + /// + /// An alternate ID associated with this item. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The unique ID of the item. + /// + public string Id; + /// + /// The reason for the moderation state change for the associated item. + /// + public string Reason; + /// + /// The status to set for the associated item. + /// + public ModerationStatus? Status; + } + + [Serializable] + public class SetItemModerationStateResponse : PlayFabResultCommon + { + } + + [Serializable] + public class StoreDetails : PlayFabBaseModel + { + /// + /// The options for the filter in filter-based stores. These options are mutually exclusive with item references. + /// + public FilterOptions FilterOptions; + /// + /// The permissions that control which players can purchase from the store. + /// + public Permissions Permissions; + /// + /// The global prices utilized in the store. These options are mutually exclusive with price options in item references. + /// + public CatalogPriceOptionsOverride PriceOptionsOverride; + } + + [Serializable] + public class StoreReference : PlayFabBaseModel + { + /// + /// An alternate ID of the store. + /// + public CatalogAlternateId AlternateId; + /// + /// The unique ID of the store. + /// + public string Id; + } + + [Serializable] + public class SubmitItemReviewVoteRequest : PlayFabRequestCommon + { + /// + /// An alternate ID of the item associated with the review. + /// + public CatalogAlternateId AlternateId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The string ID of the item associated with the review. + /// + public string ItemId; + /// + /// The ID of the review to submit a helpfulness vote for. + /// + public string ReviewId; + /// + /// The helpfulness vote of the review. + /// + public HelpfulnessVote? Vote; + } + + [Serializable] + public class SubmitItemReviewVoteResponse : PlayFabResultCommon + { + } + + [Serializable] + public class SubscriptionDetails : PlayFabBaseModel + { + /// + /// The length of time that the subscription will last in seconds. + /// + public double DurationInSeconds; + } + + [Serializable] + public class SubtractInventoryItemsOperation : PlayFabBaseModel + { + /// + /// The amount to subtract from the current item amount. + /// + public int? Amount; + /// + /// Indicates whether stacks reduced to an amount of 0 during the request should be deleted from the inventory. (Default = + /// false). + /// + public bool DeleteEmptyStacks; + /// + /// The duration to subtract from the current item expiration date. + /// + public double? DurationInSeconds; + /// + /// The inventory item the operation applies to. + /// + public InventoryItemReference Item; + } + + /// + /// Given an entity type, entity identifier and container details, will subtract the specified inventory items. + /// + [Serializable] + public class SubtractInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The amount to subtract for the current item. + /// + public int? Amount; + /// + /// The id of the entity's collection to perform this action on. (Default="default"). The number of inventory collections is + /// unlimited. + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates whether stacks reduced to an amount of 0 during the request should be deleted from the inventory. + /// (Default=false) + /// + public bool DeleteEmptyStacks; + /// + /// The duration to subtract from the current item expiration date. + /// + public double? DurationInSeconds; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will + /// be garbage collected eventually. + /// + public string IdempotencyId; + /// + /// The inventory item the request applies to. + /// + public InventoryItemReference Item; + } + + [Serializable] + public class SubtractInventoryItemsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The idempotency id used in the request. + /// + public string IdempotencyId; + /// + /// The ids of transactions that occurred as a result of the request. + /// + public List TransactionIds; + } + + /// + /// Submit a request to takedown one or more reviews, removing them from public view. Authors will still be able to see + /// their reviews after being taken down. + /// + [Serializable] + public class TakedownItemReviewsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The set of reviews to take down. + /// + public List Reviews; + } + + [Serializable] + public class TakedownItemReviewsResponse : PlayFabResultCommon + { + } + + [Serializable] + public class Transaction : PlayFabBaseModel + { + /// + /// The API call that caused this transaction. + /// + public string ApiName; + /// + /// The type of item that the the operation occurred on. + /// + public string ItemType; + /// + /// The operations that occurred. + /// + public List Operations; + /// + /// The type of operation that was run. + /// + public string OperationType; + /// + /// Additional details about the transaction. Null if it was not a purchase operation. + /// + public TransactionPurchaseDetails PurchaseDetails; + /// + /// Additional details about the transaction. Null if it was not a redeem operation. + /// + public TransactionRedeemDetails RedeemDetails; + /// + /// The time this transaction occurred in UTC. + /// + public DateTime Timestamp; + /// + /// The id of the transaction. This should be treated like an opaque token. + /// + public string TransactionId; + /// + /// Additional details about the transaction. Null if it was not a transfer operation. + /// + public TransactionTransferDetails TransferDetails; + } + + [Serializable] + public class TransactionOperation : PlayFabBaseModel + { + /// + /// The amount of items in this transaction. + /// + public int? Amount; + /// + /// The duration modified in this transaction. + /// + public double? DurationInSeconds; + /// + /// The friendly id of the items in this transaction. + /// + public string ItemFriendlyId; + /// + /// The item id of the items in this transaction. + /// + public string ItemId; + /// + /// The type of item that the operation occurred on. + /// + public string ItemType; + /// + /// The stack id of the items in this transaction. + /// + public string StackId; + /// + /// The type of the operation that occurred. + /// + public string Type; + } + + [Serializable] + public class TransactionPurchaseDetails : PlayFabBaseModel + { + /// + /// The friendly id of the Store the item was purchased from or null. + /// + public string StoreFriendlyId; + /// + /// The id of the Store the item was purchased from or null. + /// + public string StoreId; + } + + [Serializable] + public class TransactionRedeemDetails : PlayFabBaseModel + { + /// + /// The marketplace that the offer is being redeemed from. + /// + public string Marketplace; + /// + /// The transaction Id returned from the marketplace. + /// + public string MarketplaceTransactionId; + /// + /// The offer Id of the item being redeemed. + /// + public string OfferId; + } + + [Serializable] + public class TransactionTransferDetails : PlayFabBaseModel + { + /// + /// The collection id the items were transferred from or null if it was the current collection. + /// + public string GivingCollectionId; + /// + /// The entity the items were transferred from or null if it was the current entity. + /// + public EntityKey GivingEntity; + /// + /// The collection id the items were transferred to or null if it was the current collection. + /// + public string ReceivingCollectionId; + /// + /// The entity the items were transferred to or null if it was the current entity. + /// + public EntityKey ReceivingEntity; + /// + /// The id of the transfer that occurred. + /// + public string TransferId; + } + + [Serializable] + public class TransferInventoryItemsOperation : PlayFabBaseModel + { + /// + /// The amount to transfer. + /// + public int? Amount; + /// + /// Indicates whether stacks reduced to an amount of 0 during the operation should be deleted from the inventory. (Default = + /// false) + /// + public bool DeleteEmptyStacks; + /// + /// The inventory item the operation is transferring from. + /// + public InventoryItemReference GivingItem; + /// + /// The values to apply to a stack newly created by this operation. + /// + public InitialValues NewStackValues; + /// + /// The inventory item the operation is transferring to. + /// + public InventoryItemReference ReceivingItem; + } + + /// + /// Transfer the specified inventory items of an entity's container Id to another entity's container Id. + /// + [Serializable] + public class TransferInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The amount to transfer . + /// + public int? Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates whether stacks reduced to an amount of 0 during the request should be deleted from the inventory. (Default = + /// false) + /// + public bool DeleteEmptyStacks; + /// + /// The inventory collection id the request is transferring from. (Default="default") + /// + public string GivingCollectionId; + /// + /// The entity the request is transferring from. Set to the caller by default. + /// + public EntityKey GivingEntity; + /// + /// ETags are used for concurrency checking when updating resources (before transferring from). More information about using + /// ETags can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string GivingETag; + /// + /// The inventory item the request is transferring from. + /// + public InventoryItemReference GivingItem; + /// + /// The idempotency id for the request. + /// + public string IdempotencyId; + /// + /// The values to apply to a stack newly created by this request. + /// + public InitialValues NewStackValues; + /// + /// The inventory collection id the request is transferring to. (Default="default") + /// + public string ReceivingCollectionId; + /// + /// The entity the request is transferring to. Set to the caller by default. + /// + public EntityKey ReceivingEntity; + /// + /// The inventory item the request is transferring to. + /// + public InventoryItemReference ReceivingItem; + } + + [Serializable] + public class TransferInventoryItemsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources (after transferring from). More information about using + /// ETags can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string GivingETag; + /// + /// The ids of transactions that occurred as a result of the request's giving action. + /// + public List GivingTransactionIds; + /// + /// The idempotency id for the request. + /// + public string IdempotencyId; + /// + /// The transfer operation status. Possible values are 'InProgress' or 'Completed'. If the operation has completed, the + /// response code will be 200. Otherwise, it will be 202. + /// + public string OperationStatus; + /// + /// The token that can be used to get the status of the transfer operation. This will only have a value if OperationStatus + /// is 'InProgress'. + /// + public string OperationToken; + /// + /// The ids of transactions that occurred as a result of the request's receiving action. + /// + public List ReceivingTransactionIds; + } + + [Serializable] + public class UpdateCatalogConfigRequest : PlayFabRequestCommon + { + /// + /// The updated catalog configuration. + /// + public CatalogConfig Config; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class UpdateCatalogConfigResponse : PlayFabResultCommon + { + } + + [Serializable] + public class UpdateDraftItemRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Updated metadata describing the catalog item to be updated. + /// + public CatalogItem Item; + /// + /// Whether the item should be published immediately. This value is optional, defaults to false. + /// + public bool Publish; + } + + [Serializable] + public class UpdateDraftItemResponse : PlayFabResultCommon + { + /// + /// Updated metadata describing the catalog item just updated. + /// + public CatalogItem Item; + } + + [Serializable] + public class UpdateInventoryItemsOperation : PlayFabBaseModel + { + /// + /// The inventory item to update with the specified values. + /// + public InventoryItem Item; + } + + /// + /// Given an entity type, entity identifier and container details, will update the entity's inventory items + /// + [Serializable] + public class UpdateInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// The id of the entity's collection to perform this action on. (Default="default"). The number of inventory collections is + /// unlimited. + /// + public string CollectionId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will + /// be garbage collected eventually. + /// + public string IdempotencyId; + /// + /// The inventory item to update with the specified values. + /// + public InventoryItem Item; + } + + [Serializable] + public class UpdateInventoryItemsResponse : PlayFabResultCommon + { + /// + /// ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: + /// https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags + /// + public string ETag; + /// + /// The idempotency id used in the request. + /// + public string IdempotencyId; + /// + /// The ids of transactions that occurred as a result of the request. + /// + public List TransactionIds; + } + + [Serializable] + public class UploadInfo : PlayFabBaseModel + { + /// + /// Name of the file to be uploaded. + /// + public string FileName; + } + + [Serializable] + public class UploadUrlMetadata : PlayFabBaseModel + { + /// + /// Name of the file for which this upload URL was requested. + /// + public string FileName; + /// + /// Unique ID for the binary content to be uploaded to the target URL. + /// + public string Id; + /// + /// URL for the binary content to be uploaded to. + /// + public string Url; + } + + [Serializable] + public class UserGeneratedContentSpecificConfig : PlayFabBaseModel + { + /// + /// The set of content types that will be used for validation. + /// + public List ContentTypes; + /// + /// The set of tags that will be used for validation. + /// + public List Tags; + } +} +#endif diff --git a/Assets/PlayFabSDK/Economy/PlayFabEconomyModels.cs.meta b/Assets/PlayFabSDK/Economy/PlayFabEconomyModels.cs.meta new file mode 100644 index 00000000..72068f41 --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEconomyModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9e420d6be63cf50498180c2df1199abc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Economy/PlayFabEvents.cs b/Assets/PlayFabSDK/Economy/PlayFabEvents.cs new file mode 100644 index 00000000..f9570519 --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEvents.cs @@ -0,0 +1,102 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.EconomyModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnEconomyAddInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyAddInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyCreateDraftItemRequestEvent; + public event PlayFabResultEvent OnEconomyCreateDraftItemResultEvent; + public event PlayFabRequestEvent OnEconomyCreateUploadUrlsRequestEvent; + public event PlayFabResultEvent OnEconomyCreateUploadUrlsResultEvent; + public event PlayFabRequestEvent OnEconomyDeleteEntityItemReviewsRequestEvent; + public event PlayFabResultEvent OnEconomyDeleteEntityItemReviewsResultEvent; + public event PlayFabRequestEvent OnEconomyDeleteInventoryCollectionRequestEvent; + public event PlayFabResultEvent OnEconomyDeleteInventoryCollectionResultEvent; + public event PlayFabRequestEvent OnEconomyDeleteInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyDeleteInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyDeleteItemRequestEvent; + public event PlayFabResultEvent OnEconomyDeleteItemResultEvent; + public event PlayFabRequestEvent OnEconomyExecuteInventoryOperationsRequestEvent; + public event PlayFabResultEvent OnEconomyExecuteInventoryOperationsResultEvent; + public event PlayFabRequestEvent OnEconomyExecuteTransferOperationsRequestEvent; + public event PlayFabResultEvent OnEconomyExecuteTransferOperationsResultEvent; + public event PlayFabRequestEvent OnEconomyGetCatalogConfigRequestEvent; + public event PlayFabResultEvent OnEconomyGetCatalogConfigResultEvent; + public event PlayFabRequestEvent OnEconomyGetDraftItemRequestEvent; + public event PlayFabResultEvent OnEconomyGetDraftItemResultEvent; + public event PlayFabRequestEvent OnEconomyGetDraftItemsRequestEvent; + public event PlayFabResultEvent OnEconomyGetDraftItemsResultEvent; + public event PlayFabRequestEvent OnEconomyGetEntityDraftItemsRequestEvent; + public event PlayFabResultEvent OnEconomyGetEntityDraftItemsResultEvent; + public event PlayFabRequestEvent OnEconomyGetEntityItemReviewRequestEvent; + public event PlayFabResultEvent OnEconomyGetEntityItemReviewResultEvent; + public event PlayFabRequestEvent OnEconomyGetInventoryCollectionIdsRequestEvent; + public event PlayFabResultEvent OnEconomyGetInventoryCollectionIdsResultEvent; + public event PlayFabRequestEvent OnEconomyGetInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyGetInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyGetInventoryOperationStatusRequestEvent; + public event PlayFabResultEvent OnEconomyGetInventoryOperationStatusResultEvent; + public event PlayFabRequestEvent OnEconomyGetItemRequestEvent; + public event PlayFabResultEvent OnEconomyGetItemResultEvent; + public event PlayFabRequestEvent OnEconomyGetItemContainersRequestEvent; + public event PlayFabResultEvent OnEconomyGetItemContainersResultEvent; + public event PlayFabRequestEvent OnEconomyGetItemModerationStateRequestEvent; + public event PlayFabResultEvent OnEconomyGetItemModerationStateResultEvent; + public event PlayFabRequestEvent OnEconomyGetItemPublishStatusRequestEvent; + public event PlayFabResultEvent OnEconomyGetItemPublishStatusResultEvent; + public event PlayFabRequestEvent OnEconomyGetItemReviewsRequestEvent; + public event PlayFabResultEvent OnEconomyGetItemReviewsResultEvent; + public event PlayFabRequestEvent OnEconomyGetItemReviewSummaryRequestEvent; + public event PlayFabResultEvent OnEconomyGetItemReviewSummaryResultEvent; + public event PlayFabRequestEvent OnEconomyGetItemsRequestEvent; + public event PlayFabResultEvent OnEconomyGetItemsResultEvent; + public event PlayFabRequestEvent OnEconomyGetMicrosoftStoreAccessTokensRequestEvent; + public event PlayFabResultEvent OnEconomyGetMicrosoftStoreAccessTokensResultEvent; + public event PlayFabRequestEvent OnEconomyGetTransactionHistoryRequestEvent; + public event PlayFabResultEvent OnEconomyGetTransactionHistoryResultEvent; + public event PlayFabRequestEvent OnEconomyPublishDraftItemRequestEvent; + public event PlayFabResultEvent OnEconomyPublishDraftItemResultEvent; + public event PlayFabRequestEvent OnEconomyPurchaseInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyPurchaseInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyRedeemAppleAppStoreInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyRedeemAppleAppStoreInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyRedeemGooglePlayInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyRedeemGooglePlayInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyRedeemMicrosoftStoreInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyRedeemMicrosoftStoreInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyRedeemNintendoEShopInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyRedeemNintendoEShopInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyRedeemPlayStationStoreInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyRedeemPlayStationStoreInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyRedeemSteamInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyRedeemSteamInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyReportItemRequestEvent; + public event PlayFabResultEvent OnEconomyReportItemResultEvent; + public event PlayFabRequestEvent OnEconomyReportItemReviewRequestEvent; + public event PlayFabResultEvent OnEconomyReportItemReviewResultEvent; + public event PlayFabRequestEvent OnEconomyReviewItemRequestEvent; + public event PlayFabResultEvent OnEconomyReviewItemResultEvent; + public event PlayFabRequestEvent OnEconomySearchItemsRequestEvent; + public event PlayFabResultEvent OnEconomySearchItemsResultEvent; + public event PlayFabRequestEvent OnEconomySetItemModerationStateRequestEvent; + public event PlayFabResultEvent OnEconomySetItemModerationStateResultEvent; + public event PlayFabRequestEvent OnEconomySubmitItemReviewVoteRequestEvent; + public event PlayFabResultEvent OnEconomySubmitItemReviewVoteResultEvent; + public event PlayFabRequestEvent OnEconomySubtractInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomySubtractInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyTakedownItemReviewsRequestEvent; + public event PlayFabResultEvent OnEconomyTakedownItemReviewsResultEvent; + public event PlayFabRequestEvent OnEconomyTransferInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyTransferInventoryItemsResultEvent; + public event PlayFabRequestEvent OnEconomyUpdateCatalogConfigRequestEvent; + public event PlayFabResultEvent OnEconomyUpdateCatalogConfigResultEvent; + public event PlayFabRequestEvent OnEconomyUpdateDraftItemRequestEvent; + public event PlayFabResultEvent OnEconomyUpdateDraftItemResultEvent; + public event PlayFabRequestEvent OnEconomyUpdateInventoryItemsRequestEvent; + public event PlayFabResultEvent OnEconomyUpdateInventoryItemsResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Economy/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Economy/PlayFabEvents.cs.meta new file mode 100644 index 00000000..db4b7ba1 --- /dev/null +++ b/Assets/PlayFabSDK/Economy/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2679e440c4893c4f9b6e5d5314c0465 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Entity.meta b/Assets/PlayFabSDK/Entity.meta new file mode 100644 index 00000000..004a68e2 --- /dev/null +++ b/Assets/PlayFabSDK/Entity.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 760e5091fc644574b9160901cc83b72b +folderAsset: yes +timeCreated: 1521234904 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Entity/ScreenTimeTracker.cs b/Assets/PlayFabSDK/Entity/ScreenTimeTracker.cs new file mode 100644 index 00000000..3ed9f1a8 --- /dev/null +++ b/Assets/PlayFabSDK/Entity/ScreenTimeTracker.cs @@ -0,0 +1,255 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace PlayFab.Public +{ + /// + /// Interface which can be used to implement class responsible for gathering and sending information about session. + /// + public interface IScreenTimeTracker + { + // Unity MonoBehaviour callbacks + void OnEnable(); + void OnDisable(); + void OnDestroy(); + void OnApplicationQuit(); + void OnApplicationFocus(bool isFocused); + + // Class specific methods + void ClientSessionStart(string entityId, string entityType, string playFabUserId); + void Send(); + } + + /// + /// Class responsible for gathering and sending information about session, for example: focus duration, device info, etc. + /// + public class ScreenTimeTracker : IScreenTimeTracker + { + private Guid focusId; + private Guid gameSessionID = Guid.NewGuid(); + private bool initialFocus = true; + private bool isSending = false; + private DateTime focusOffDateTime = DateTime.UtcNow; + private DateTime focusOnDateTime = DateTime.UtcNow; + + private Queue eventsRequests = new Queue(); + + private EventsModels.EntityKey entityKey = new EventsModels.EntityKey(); + private const string eventNamespace = "com.playfab.events.sessions"; + private const int maxBatchSizeInEvents = 10; + + private PlayFabEventsInstanceAPI eventApi; + + public ScreenTimeTracker() + { + eventApi = new PlayFabEventsInstanceAPI(PlayFabSettings.staticPlayer); + } + + private void EnsureSingleGameSessionId() + { + if (gameSessionID == Guid.Empty) + { + gameSessionID = Guid.NewGuid(); + } + } + + /// + /// Start session, the function responsible for creating SessionID and gathering information about user and device + /// + /// Result of the user's login, represent user ID + public void ClientSessionStart(string entityId, string entityType, string playFabUserId) + { + EnsureSingleGameSessionId(); + + entityKey.Id = entityId; + entityKey.Type = entityType; + + EventsModels.EventContents eventInfo = new EventsModels.EventContents(); + + eventInfo.Name = "client_session_start"; + eventInfo.EventNamespace = eventNamespace; + eventInfo.Entity = entityKey; + eventInfo.OriginalTimestamp = DateTime.UtcNow; + + var payload = new Dictionary + { + { "UserID", playFabUserId}, + { "DeviceType", SystemInfo.deviceType}, + { "DeviceModel", SystemInfo.deviceModel}, + { "OS", SystemInfo.operatingSystem }, + { "ClientSessionID", gameSessionID }, + }; + + eventInfo.Payload = payload; + eventsRequests.Enqueue(eventInfo); + + // Fake a focus-on event at the time of the first login: + OnApplicationFocus(true); + } + + /// + /// Gather information about user's focus. Calculates interaction durations. + /// Name mimics MonoBehaviour method, for ease of integration. + /// + /// State of focus + public void OnApplicationFocus(bool isFocused) + { + EnsureSingleGameSessionId(); + EventsModels.EventContents eventInfo = new EventsModels.EventContents(); + DateTime currentUtcDateTime = DateTime.UtcNow; + + eventInfo.Name = "client_focus_change"; + eventInfo.EventNamespace = eventNamespace; + eventInfo.Entity = entityKey; + + double focusStateDuration = 0.0; + + if (initialFocus) + { + focusId = Guid.NewGuid(); + } + + if (isFocused) + { + // start counting focus-on time + focusOnDateTime = currentUtcDateTime; + + // new id per focus + focusId = Guid.NewGuid(); + + if (!initialFocus) + { + focusStateDuration = (currentUtcDateTime - focusOffDateTime).TotalSeconds; + + // this check safeguards from manual time changes while app is running + if (focusStateDuration < 0) + { + focusStateDuration = 0; + } + } + } + else + { + focusStateDuration = (currentUtcDateTime - focusOnDateTime).TotalSeconds; + + // this check safeguards from manual time changes while app is running + if (focusStateDuration < 0) + { + focusStateDuration = 0; + } + + // start counting focus-off time + focusOffDateTime = currentUtcDateTime; + } + + var payload = new Dictionary { + { "FocusID", focusId }, + { "FocusState", isFocused }, + { "FocusStateDuration", focusStateDuration }, + { "EventTimestamp", currentUtcDateTime }, + { "ClientSessionID", gameSessionID }, + }; + + eventInfo.OriginalTimestamp = currentUtcDateTime; + eventInfo.Payload = payload; + eventsRequests.Enqueue(eventInfo); + + initialFocus = false; + + if (!isFocused) + { + // Force the eventsRequests queue to empty. + // If we are losing focus we should make an attempt to push out a focus lost event ASAP + Send(); + } + + } + + /// + /// Sends events to server. + /// + public void Send() + { + if (PlayFabSettings.staticPlayer.IsClientLoggedIn() && (isSending == false)) + { + isSending = true; + + EventsModels.WriteEventsRequest request = new EventsModels.WriteEventsRequest(); + request.Events = new List(); + + while ((eventsRequests.Count > 0) && (request.Events.Count < maxBatchSizeInEvents)) + { + EventsModels.EventContents eventInfo = eventsRequests.Dequeue(); + request.Events.Add(eventInfo); + } + + if (request.Events.Count > 0) + { + eventApi.WriteEvents(request, EventSentSuccessfulCallback, EventSentErrorCallback); + } + + isSending = false; + } + } + + /// + /// Callback to handle successful server interaction. + /// + /// Server response + private void EventSentSuccessfulCallback(EventsModels.WriteEventsResponse response) + { + // add code to work with successful callback + } + + /// + /// Callback to handle unsuccessful server interaction. + /// + /// Server response + private void EventSentErrorCallback(PlayFabError response) + { + Debug.LogWarning("Failed to send session data. Error: " + response.GenerateErrorReport()); + } + + #region Unused MonoBehaviour compatibility methods + /// + /// Unused + /// Name mimics MonoBehaviour method, for ease of integration. + /// + public void OnEnable() + { + // add code sending events on enable + } + + /// + /// Unused + /// Name mimics MonoBehaviour method, for ease of integration. + /// + public void OnDisable() + { + // add code sending events on disable + } + + /// + /// Unused + /// Name mimics MonoBehaviour method, for ease of integration. + /// + public void OnDestroy() + { + // add code sending events on destroy + } + #endregion + + /// + /// Trying to send event during game exit. Note: works only on certain platforms. + /// Name mimics MonoBehaviour method, for ease of integration. + /// + public void OnApplicationQuit() + { + // trying to send events during game exit + Send(); + } + } +} +#endif diff --git a/Assets/PlayFabSDK/Entity/ScreenTimeTracker.cs.meta b/Assets/PlayFabSDK/Entity/ScreenTimeTracker.cs.meta new file mode 100644 index 00000000..d44c5305 --- /dev/null +++ b/Assets/PlayFabSDK/Entity/ScreenTimeTracker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bb87bdc3f40216e419c8f1b76c4517d6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Events.meta b/Assets/PlayFabSDK/Events.meta new file mode 100644 index 00000000..043ec870 --- /dev/null +++ b/Assets/PlayFabSDK/Events.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 73a2eea4489bd9447a29c5114a2c0d7c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Events/PlayFabEvents.cs b/Assets/PlayFabSDK/Events/PlayFabEvents.cs new file mode 100644 index 00000000..ced12796 --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEvents.cs @@ -0,0 +1,24 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.EventsModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnEventsCreateTelemetryKeyRequestEvent; + public event PlayFabResultEvent OnEventsCreateTelemetryKeyResultEvent; + public event PlayFabRequestEvent OnEventsDeleteTelemetryKeyRequestEvent; + public event PlayFabResultEvent OnEventsDeleteTelemetryKeyResultEvent; + public event PlayFabRequestEvent OnEventsGetTelemetryKeyRequestEvent; + public event PlayFabResultEvent OnEventsGetTelemetryKeyResultEvent; + public event PlayFabRequestEvent OnEventsListTelemetryKeysRequestEvent; + public event PlayFabResultEvent OnEventsListTelemetryKeysResultEvent; + public event PlayFabRequestEvent OnEventsSetTelemetryKeyActiveRequestEvent; + public event PlayFabResultEvent OnEventsSetTelemetryKeyActiveResultEvent; + public event PlayFabRequestEvent OnEventsWriteEventsRequestEvent; + public event PlayFabResultEvent OnEventsWriteEventsResultEvent; + public event PlayFabRequestEvent OnEventsWriteTelemetryEventsRequestEvent; + public event PlayFabResultEvent OnEventsWriteTelemetryEventsResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Events/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Events/PlayFabEvents.cs.meta new file mode 100644 index 00000000..b3fa18a3 --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 816bf581b4b09c04bbf42adfea99a423 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Events/PlayFabEventsAPI.cs b/Assets/PlayFabSDK/Events/PlayFabEventsAPI.cs new file mode 100644 index 00000000..46ecbc6d --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEventsAPI.cs @@ -0,0 +1,144 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.EventsModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// Write custom PlayStream and Telemetry events for any PlayFab entity. Telemetry events can be used for analytic, + /// reporting, or debugging. PlayStream events can do all of that and also trigger custom actions in near real-time. + /// + public static class PlayFabEventsAPI + { + static PlayFabEventsAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Creates a new telemetry key for the title. + /// + public static void CreateTelemetryKey(CreateTelemetryKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Event/CreateTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a telemetry key configured for the title. + /// + public static void DeleteTelemetryKey(DeleteTelemetryKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Event/DeleteTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information about a telemetry key configured for the title. + /// + public static void GetTelemetryKey(GetTelemetryKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Event/GetTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all telemetry keys configured for the title. + /// + public static void ListTelemetryKeys(ListTelemetryKeysRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Event/ListTelemetryKeys", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets a telemetry key to the active or deactivated state. + /// + public static void SetTelemetryKeyActive(SetTelemetryKeyActiveRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Event/SetTelemetryKeyActive", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'. + /// + public static void WriteEvents(WriteEventsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Event/WriteEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start + /// with 'custom.' + /// + public static void WriteTelemetryEvents(WriteEventsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Event/WriteTelemetryEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start + /// with 'custom.' + /// + public static void WriteTelemetryEventsWithTelemetryKey(WriteEventsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsTelemetryKeyProvided()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must provide a telemetry key to call this method"); + + PlayFabHttp.MakeApiCall("/Event/WriteTelemetryEvents", request, AuthType.TelemetryKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Events/PlayFabEventsAPI.cs.meta b/Assets/PlayFabSDK/Events/PlayFabEventsAPI.cs.meta new file mode 100644 index 00000000..f41b3427 --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEventsAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6209aee5722aa2c46ba625e1944d6fa8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Events/PlayFabEventsInstanceAPI.cs b/Assets/PlayFabSDK/Events/PlayFabEventsInstanceAPI.cs new file mode 100644 index 00000000..63d0e104 --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEventsInstanceAPI.cs @@ -0,0 +1,148 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.EventsModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// Write custom PlayStream and Telemetry events for any PlayFab entity. Telemetry events can be used for analytic, + /// reporting, or debugging. PlayStream events can do all of that and also trigger custom actions in near real-time. + /// + public class PlayFabEventsInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabEventsInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabEventsInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Creates a new telemetry key for the title. + /// + public void CreateTelemetryKey(CreateTelemetryKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Event/CreateTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a telemetry key configured for the title. + /// + public void DeleteTelemetryKey(DeleteTelemetryKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Event/DeleteTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information about a telemetry key configured for the title. + /// + public void GetTelemetryKey(GetTelemetryKeyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Event/GetTelemetryKey", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all telemetry keys configured for the title. + /// + public void ListTelemetryKeys(ListTelemetryKeysRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Event/ListTelemetryKeys", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets a telemetry key to the active or deactivated state. + /// + public void SetTelemetryKeyActive(SetTelemetryKeyActiveRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Event/SetTelemetryKeyActive", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'. + /// + public void WriteEvents(WriteEventsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Event/WriteEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start + /// with 'custom.' + /// + public void WriteTelemetryEvents(WriteEventsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Event/WriteTelemetryEvents", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + /// + /// Write batches of entity based events to as Telemetry events (bypass PlayStream) using a Telemetry Key. The namespace must be 'custom' or start + /// with 'custom.' + /// + public void WriteTelemetryEventsWithTelemetryKey(WriteEventsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsTelemetryKeyProvided()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must provide a telemetry key to call this method"); + + PlayFabHttp.MakeApiCall("/Event/WriteTelemetryEvents", request, AuthType.TelemetryKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Events/PlayFabEventsInstanceAPI.cs.meta b/Assets/PlayFabSDK/Events/PlayFabEventsInstanceAPI.cs.meta new file mode 100644 index 00000000..38d0c3b7 --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEventsInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: efc8181560ecd0748a12a6df7137998e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Events/PlayFabEventsModels.cs b/Assets/PlayFabSDK/Events/PlayFabEventsModels.cs new file mode 100644 index 00000000..4375615e --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEventsModels.cs @@ -0,0 +1,248 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.EventsModels +{ + [Serializable] + public class CreateTelemetryKeyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The name of the new key. Telemetry key names must be unique within the scope of the title. + /// + public string KeyName; + } + + [Serializable] + public class CreateTelemetryKeyResponse : PlayFabResultCommon + { + /// + /// Details about the newly created telemetry key. + /// + public TelemetryKeyDetails NewKeyDetails; + } + + [Serializable] + public class DeleteTelemetryKeyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The name of the key to delete. + /// + public string KeyName; + } + + [Serializable] + public class DeleteTelemetryKeyResponse : PlayFabResultCommon + { + /// + /// Indicates whether or not the key was deleted. If false, no key with that name existed. + /// + public bool WasKeyDeleted; + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EventContents : PlayFabBaseModel + { + /// + /// The optional custom tags associated with the event (e.g. build number, external trace identifiers, etc.). Before an + /// event is written, this collection and the base request custom tags will be merged, but not overriden. This enables the + /// caller to specify static tags and per event tags. + /// + public Dictionary CustomTags; + /// + /// Entity associated with the event. If null, the event will apply to the calling entity. + /// + public EntityKey Entity; + /// + /// The namespace in which the event is defined. Allowed namespaces can vary by API. + /// + public string EventNamespace; + /// + /// The name of this event. + /// + public string Name; + /// + /// The original unique identifier associated with this event before it was posted to PlayFab. The value might differ from + /// the EventId value, which is assigned when the event is received by the server. + /// + public string OriginalId; + /// + /// The time (in UTC) associated with this event when it occurred. If specified, this value is stored in the + /// OriginalTimestamp property of the PlayStream event. + /// + public DateTime? OriginalTimestamp; + /// + /// Arbitrary data associated with the event. Only one of Payload or PayloadJSON is allowed. + /// + public object Payload; + /// + /// Arbitrary data associated with the event, represented as a JSON serialized string. Only one of Payload or PayloadJSON is + /// allowed. + /// + public string PayloadJSON; + } + + [Serializable] + public class GetTelemetryKeyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The name of the key to retrieve. + /// + public string KeyName; + } + + [Serializable] + public class GetTelemetryKeyResponse : PlayFabResultCommon + { + /// + /// Details about the requested telemetry key. + /// + public TelemetryKeyDetails KeyDetails; + } + + [Serializable] + public class ListTelemetryKeysRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class ListTelemetryKeysResponse : PlayFabResultCommon + { + /// + /// The telemetry keys configured for the title. + /// + public List KeyDetails; + } + + [Serializable] + public class SetTelemetryKeyActiveRequest : PlayFabRequestCommon + { + /// + /// Whether to set the key to active (true) or deactivated (false). + /// + public bool Active; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The name of the key to update. + /// + public string KeyName; + } + + [Serializable] + public class SetTelemetryKeyActiveResponse : PlayFabResultCommon + { + /// + /// The most current details about the telemetry key that was to be updated. + /// + public TelemetryKeyDetails KeyDetails; + /// + /// Indicates whether or not the key was updated. If false, the key was already in the desired state. + /// + public bool WasKeyUpdated; + } + + [Serializable] + public class TelemetryKeyDetails : PlayFabBaseModel + { + /// + /// When the key was created. + /// + public DateTime CreateTime; + /// + /// Whether or not the key is currently active. Deactivated keys cannot be used for telemetry ingestion. + /// + public bool IsActive; + /// + /// The key that can be distributed to clients for use during telemetry ingestion. + /// + public string KeyValue; + /// + /// When the key was last updated. + /// + public DateTime LastUpdateTime; + /// + /// The name of the key. Telemetry key names are unique within the scope of the title. + /// + public string Name; + } + + [Serializable] + public class WriteEventsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The collection of events to write. Up to 200 events can be written per request. + /// + public List Events; + } + + [Serializable] + public class WriteEventsResponse : PlayFabResultCommon + { + /// + /// The unique identifiers assigned by the server to the events, in the same order as the events in the request. Only + /// returned if FlushToPlayStream option is true. + /// + public List AssignedEventIds; + } +} +#endif diff --git a/Assets/PlayFabSDK/Events/PlayFabEventsModels.cs.meta b/Assets/PlayFabSDK/Events/PlayFabEventsModels.cs.meta new file mode 100644 index 00000000..4e6f8cc4 --- /dev/null +++ b/Assets/PlayFabSDK/Events/PlayFabEventsModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9ee524faa41ee444ca207259e58e70a1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Experimentation.meta b/Assets/PlayFabSDK/Experimentation.meta new file mode 100644 index 00000000..1cd58be0 --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f95f1281203327240a7f9f479dd781d9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabEvents.cs b/Assets/PlayFabSDK/Experimentation/PlayFabEvents.cs new file mode 100644 index 00000000..816314ab --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabEvents.cs @@ -0,0 +1,36 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.ExperimentationModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnExperimentationCreateExclusionGroupRequestEvent; + public event PlayFabResultEvent OnExperimentationCreateExclusionGroupResultEvent; + public event PlayFabRequestEvent OnExperimentationCreateExperimentRequestEvent; + public event PlayFabResultEvent OnExperimentationCreateExperimentResultEvent; + public event PlayFabRequestEvent OnExperimentationDeleteExclusionGroupRequestEvent; + public event PlayFabResultEvent OnExperimentationDeleteExclusionGroupResultEvent; + public event PlayFabRequestEvent OnExperimentationDeleteExperimentRequestEvent; + public event PlayFabResultEvent OnExperimentationDeleteExperimentResultEvent; + public event PlayFabRequestEvent OnExperimentationGetExclusionGroupsRequestEvent; + public event PlayFabResultEvent OnExperimentationGetExclusionGroupsResultEvent; + public event PlayFabRequestEvent OnExperimentationGetExclusionGroupTrafficRequestEvent; + public event PlayFabResultEvent OnExperimentationGetExclusionGroupTrafficResultEvent; + public event PlayFabRequestEvent OnExperimentationGetExperimentsRequestEvent; + public event PlayFabResultEvent OnExperimentationGetExperimentsResultEvent; + public event PlayFabRequestEvent OnExperimentationGetLatestScorecardRequestEvent; + public event PlayFabResultEvent OnExperimentationGetLatestScorecardResultEvent; + public event PlayFabRequestEvent OnExperimentationGetTreatmentAssignmentRequestEvent; + public event PlayFabResultEvent OnExperimentationGetTreatmentAssignmentResultEvent; + public event PlayFabRequestEvent OnExperimentationStartExperimentRequestEvent; + public event PlayFabResultEvent OnExperimentationStartExperimentResultEvent; + public event PlayFabRequestEvent OnExperimentationStopExperimentRequestEvent; + public event PlayFabResultEvent OnExperimentationStopExperimentResultEvent; + public event PlayFabRequestEvent OnExperimentationUpdateExclusionGroupRequestEvent; + public event PlayFabResultEvent OnExperimentationUpdateExclusionGroupResultEvent; + public event PlayFabRequestEvent OnExperimentationUpdateExperimentRequestEvent; + public event PlayFabResultEvent OnExperimentationUpdateExperimentResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Experimentation/PlayFabEvents.cs.meta new file mode 100644 index 00000000..c97ee632 --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ad18b9280bb1a7f4c926eba4c1086b6e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationAPI.cs b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationAPI.cs new file mode 100644 index 00000000..22e41945 --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationAPI.cs @@ -0,0 +1,208 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.ExperimentationModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// APIs for managing experiments. + /// + public static class PlayFabExperimentationAPI + { + static PlayFabExperimentationAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Creates a new experiment exclusion group for a title. + /// + public static void CreateExclusionGroup(CreateExclusionGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/CreateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new experiment for a title. + /// + public static void CreateExperiment(CreateExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/CreateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing exclusion group for a title. + /// + public static void DeleteExclusionGroup(DeleteExclusionGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/DeleteExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing experiment for a title. + /// + public static void DeleteExperiment(DeleteExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/DeleteExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the details of all exclusion groups for a title. + /// + public static void GetExclusionGroups(GetExclusionGroupsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/GetExclusionGroups", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the details of all exclusion groups for a title. + /// + public static void GetExclusionGroupTraffic(GetExclusionGroupTrafficRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/GetExclusionGroupTraffic", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the details of all experiments for a title. + /// + public static void GetExperiments(GetExperimentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/GetExperiments", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the latest scorecard of the experiment for the title. + /// + public static void GetLatestScorecard(GetLatestScorecardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/GetLatestScorecard", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the treatment assignments for a player for every running experiment in the title. + /// + public static void GetTreatmentAssignment(GetTreatmentAssignmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/GetTreatmentAssignment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Starts an existing experiment for a title. + /// + public static void StartExperiment(StartExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/StartExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Stops an existing experiment for a title. + /// + public static void StopExperiment(StopExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/StopExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates an existing exclusion group for a title. + /// + public static void UpdateExclusionGroup(UpdateExclusionGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/UpdateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates an existing experiment for a title. + /// + public static void UpdateExperiment(UpdateExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Experimentation/UpdateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationAPI.cs.meta b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationAPI.cs.meta new file mode 100644 index 00000000..c19eab74 --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9dbcafaa60e9f2a41930b9907fb0c133 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationInstanceAPI.cs b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationInstanceAPI.cs new file mode 100644 index 00000000..eab7baed --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationInstanceAPI.cs @@ -0,0 +1,200 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.ExperimentationModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// APIs for managing experiments. + /// + public class PlayFabExperimentationInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabExperimentationInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabExperimentationInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Creates a new experiment exclusion group for a title. + /// + public void CreateExclusionGroup(CreateExclusionGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/CreateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new experiment for a title. + /// + public void CreateExperiment(CreateExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/CreateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing exclusion group for a title. + /// + public void DeleteExclusionGroup(DeleteExclusionGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/DeleteExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing experiment for a title. + /// + public void DeleteExperiment(DeleteExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/DeleteExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the details of all exclusion groups for a title. + /// + public void GetExclusionGroups(GetExclusionGroupsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/GetExclusionGroups", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the details of all exclusion groups for a title. + /// + public void GetExclusionGroupTraffic(GetExclusionGroupTrafficRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/GetExclusionGroupTraffic", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the details of all experiments for a title. + /// + public void GetExperiments(GetExperimentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/GetExperiments", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the latest scorecard of the experiment for the title. + /// + public void GetLatestScorecard(GetLatestScorecardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/GetLatestScorecard", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the treatment assignments for a player for every running experiment in the title. + /// + public void GetTreatmentAssignment(GetTreatmentAssignmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/GetTreatmentAssignment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Starts an existing experiment for a title. + /// + public void StartExperiment(StartExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/StartExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Stops an existing experiment for a title. + /// + public void StopExperiment(StopExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/StopExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates an existing exclusion group for a title. + /// + public void UpdateExclusionGroup(UpdateExclusionGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/UpdateExclusionGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates an existing experiment for a title. + /// + public void UpdateExperiment(UpdateExperimentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Experimentation/UpdateExperiment", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationInstanceAPI.cs.meta b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationInstanceAPI.cs.meta new file mode 100644 index 00000000..26f07683 --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ecc5b8d11fae41b4daaaf638349fdc78 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationModels.cs b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationModels.cs new file mode 100644 index 00000000..84087e99 --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationModels.cs @@ -0,0 +1,670 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.ExperimentationModels +{ + public enum AnalysisTaskState + { + Waiting, + ReadyForSubmission, + SubmittingToPipeline, + Running, + Completed, + Failed, + Canceled + } + + /// + /// Given a title entity token and exclusion group details, will create a new exclusion group for the title. + /// + [Serializable] + public class CreateExclusionGroupRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description of the exclusion group. + /// + public string Description; + /// + /// Friendly name of the exclusion group. + /// + public string Name; + } + + [Serializable] + public class CreateExclusionGroupResult : PlayFabResultCommon + { + /// + /// Identifier of the exclusion group. + /// + public string ExclusionGroupId; + } + + /// + /// Given a title entity token and experiment details, will create a new experiment for the title. + /// + [Serializable] + public class CreateExperimentRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description of the experiment. + /// + public string Description; + /// + /// When experiment should end. + /// + public DateTime? EndDate; + /// + /// Id of the exclusion group. + /// + public string ExclusionGroupId; + /// + /// Percentage of exclusion group traffic that will see this experiment. + /// + public uint? ExclusionGroupTrafficAllocation; + /// + /// Type of experiment. + /// + public ExperimentType? ExperimentType; + /// + /// Friendly name of the experiment. + /// + public string Name; + /// + /// Id of the segment to which this experiment applies. Defaults to the 'All Players' segment. + /// + public string SegmentId; + /// + /// When experiment should start. + /// + public DateTime StartDate; + /// + /// List of title player account IDs that automatically receive treatments in the experiment, but are not included when + /// calculating experiment metrics. + /// + public List TitlePlayerAccountTestIds; + /// + /// List of variants for the experiment. + /// + public List Variants; + } + + [Serializable] + public class CreateExperimentResult : PlayFabResultCommon + { + /// + /// The ID of the new experiment. + /// + public string ExperimentId; + } + + /// + /// Given an entity token and an exclusion group ID this API deletes the exclusion group. + /// + [Serializable] + public class DeleteExclusionGroupRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The ID of the exclusion group to delete. + /// + public string ExclusionGroupId; + } + + /// + /// Given an entity token and an experiment ID this API deletes the experiment. A running experiment must be stopped before + /// it can be deleted. + /// + [Serializable] + public class DeleteExperimentRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The ID of the experiment to delete. + /// + public string ExperimentId; + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class ExclusionGroupTrafficAllocation : PlayFabBaseModel + { + /// + /// Id of the experiment. + /// + public string ExperimentId; + /// + /// Percentage of exclusion group traffic that will see this experiment. + /// + public uint TrafficAllocation; + } + + [Serializable] + public class Experiment : PlayFabBaseModel + { + /// + /// Description of the experiment. + /// + public string Description; + /// + /// When experiment should end/was ended. + /// + public DateTime? EndDate; + /// + /// Id of the exclusion group for this experiment. + /// + public string ExclusionGroupId; + /// + /// Percentage of exclusion group traffic that will see this experiment. + /// + public uint? ExclusionGroupTrafficAllocation; + /// + /// Type of experiment. + /// + public ExperimentType? ExperimentType; + /// + /// Id of the experiment. + /// + public string Id; + /// + /// Friendly name of the experiment. + /// + public string Name; + /// + /// Id of the segment to which this experiment applies. Defaults to the 'All Players' segment. + /// + public string SegmentId; + /// + /// When experiment should start/was started. + /// + public DateTime StartDate; + /// + /// State experiment is currently in. + /// + public ExperimentState? State; + /// + /// List of title player account IDs that automatically receive treatments in the experiment, but are not included when + /// calculating experiment metrics. + /// + public List TitlePlayerAccountTestIds; + /// + /// List of variants for the experiment. + /// + public List Variants; + } + + [Serializable] + public class ExperimentExclusionGroup : PlayFabBaseModel + { + /// + /// Description of the exclusion group. + /// + public string Description; + /// + /// Id of the exclusion group. + /// + public string ExclusionGroupId; + /// + /// Friendly name of the exclusion group. + /// + public string Name; + } + + public enum ExperimentState + { + New, + Started, + Stopped, + Deleted + } + + public enum ExperimentType + { + Active, + Snapshot + } + + /// + /// Given a title entity token will return the list of all exclusion groups for a title. + /// + [Serializable] + public class GetExclusionGroupsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetExclusionGroupsResult : PlayFabResultCommon + { + /// + /// List of exclusion groups for the title. + /// + public List ExclusionGroups; + } + + /// + /// Given a title entity token and an exclusion group ID, will return the list of traffic allocations for the exclusion + /// group. + /// + [Serializable] + public class GetExclusionGroupTrafficRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The ID of the exclusion group. + /// + public string ExclusionGroupId; + } + + [Serializable] + public class GetExclusionGroupTrafficResult : PlayFabResultCommon + { + /// + /// List of traffic allocations for the exclusion group. + /// + public List TrafficAllocations; + } + + /// + /// Given a title entity token will return the list of all experiments for a title, including scheduled, started, stopped or + /// completed experiments. + /// + [Serializable] + public class GetExperimentsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetExperimentsResult : PlayFabResultCommon + { + /// + /// List of experiments for the title. + /// + public List Experiments; + } + + /// + /// Given a title entity token and experiment details, will return the latest available scorecard. + /// + [Serializable] + public class GetLatestScorecardRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The ID of the experiment. + /// + public string ExperimentId; + } + + [Serializable] + public class GetLatestScorecardResult : PlayFabResultCommon + { + /// + /// Scorecard for the experiment of the title. + /// + public Scorecard Scorecard; + } + + /// + /// Given a title player or a title entity token, returns the treatment variants and variables assigned to the entity across + /// all running experiments + /// + [Serializable] + public class GetTreatmentAssignmentRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetTreatmentAssignmentResult : PlayFabResultCommon + { + /// + /// Treatment assignment for the entity. + /// + public TreatmentAssignment TreatmentAssignment; + } + + [Serializable] + public class MetricData : PlayFabBaseModel + { + /// + /// The upper bound of the confidence interval for the relative delta (Delta.RelativeValue). + /// + public double ConfidenceIntervalEnd; + /// + /// The lower bound of the confidence interval for the relative delta (Delta.RelativeValue). + /// + public double ConfidenceIntervalStart; + /// + /// The absolute delta between TreatmentStats.Average and ControlStats.Average. + /// + public float DeltaAbsoluteChange; + /// + /// The relative delta ratio between TreatmentStats.Average and ControlStats.Average. + /// + public float DeltaRelativeChange; + /// + /// The machine name of the metric. + /// + public string InternalName; + /// + /// Indicates if a movement was detected on that metric. + /// + public string Movement; + /// + /// The readable name of the metric. + /// + public string Name; + /// + /// The expectation that a movement is real + /// + public float PMove; + /// + /// The p-value resulting from the statistical test run for this metric + /// + public float PValue; + /// + /// The threshold for observing sample ratio mismatch. + /// + public float PValueThreshold; + /// + /// Indicates if the movement is statistically significant. + /// + public string StatSigLevel; + /// + /// Observed standard deviation value of the metric. + /// + public float StdDev; + /// + /// Observed average value of the metric. + /// + public float Value; + } + + [Serializable] + public class Scorecard : PlayFabBaseModel + { + /// + /// Represents the date the scorecard was generated. + /// + public string DateGenerated; + /// + /// Represents the duration of scorecard analysis. + /// + public string Duration; + /// + /// Represents the number of events processed for the generation of this scorecard + /// + public double EventsProcessed; + /// + /// Id of the experiment. + /// + public string ExperimentId; + /// + /// Friendly name of the experiment. + /// + public string ExperimentName; + /// + /// Represents the latest compute job status. + /// + public AnalysisTaskState? LatestJobStatus; + /// + /// Represents the presence of a sample ratio mismatch in the scorecard data. + /// + public bool SampleRatioMismatch; + /// + /// Scorecard containing list of analysis. + /// + public List ScorecardDataRows; + } + + [Serializable] + public class ScorecardDataRow : PlayFabBaseModel + { + /// + /// Represents whether the variant is control or not. + /// + public bool IsControl; + /// + /// Data of the analysis with the internal name of the metric as the key and an object of metric data as value. + /// + public Dictionary MetricDataRows; + /// + /// Represents the player count in the variant. + /// + public uint PlayerCount; + /// + /// Name of the variant of analysis. + /// + public string VariantName; + } + + /// + /// Given a title entity token and an experiment ID, this API starts the experiment. + /// + [Serializable] + public class StartExperimentRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The ID of the experiment to start. + /// + public string ExperimentId; + } + + /// + /// Given a title entity token and an experiment ID, this API stops the experiment if it is running. + /// + [Serializable] + public class StopExperimentRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The ID of the experiment to stop. + /// + public string ExperimentId; + } + + [Serializable] + public class TreatmentAssignment : PlayFabBaseModel + { + /// + /// List of the experiment variables. + /// + public List Variables; + /// + /// List of the experiment variants. + /// + public List Variants; + } + + /// + /// Given an entity token and exclusion group details this API updates the exclusion group. + /// + [Serializable] + public class UpdateExclusionGroupRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description of the exclusion group. + /// + public string Description; + /// + /// The ID of the exclusion group to update. + /// + public string ExclusionGroupId; + /// + /// Friendly name of the exclusion group. + /// + public string Name; + } + + /// + /// Given a title entity token and experiment details, this API updates the experiment. If an experiment is already running, + /// only the description and duration properties can be updated. + /// + [Serializable] + public class UpdateExperimentRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Description of the experiment. + /// + public string Description; + /// + /// When experiment should end. + /// + public DateTime? EndDate; + /// + /// Id of the exclusion group. + /// + public string ExclusionGroupId; + /// + /// Percentage of exclusion group traffic that will see this experiment. + /// + public uint? ExclusionGroupTrafficAllocation; + /// + /// Type of experiment. + /// + public ExperimentType? ExperimentType; + /// + /// Id of the experiment. + /// + public string Id; + /// + /// Friendly name of the experiment. + /// + public string Name; + /// + /// Id of the segment to which this experiment applies. Defaults to the 'All Players' segment. + /// + public string SegmentId; + /// + /// When experiment should start. + /// + public DateTime StartDate; + /// + /// List of title player account IDs that automatically receive treatments in the experiment, but are not included when + /// calculating experiment metrics. + /// + public List TitlePlayerAccountTestIds; + /// + /// List of variants for the experiment. + /// + public List Variants; + } + + [Serializable] + public class Variable : PlayFabBaseModel + { + /// + /// Name of the variable. + /// + public string Name; + /// + /// Value of the variable. + /// + public string Value; + } + + [Serializable] + public class Variant : PlayFabBaseModel + { + /// + /// Description of the variant. + /// + public string Description; + /// + /// Id of the variant. + /// + public string Id; + /// + /// Specifies if variant is control for experiment. + /// + public bool IsControl; + /// + /// Name of the variant. + /// + public string Name; + /// + /// Id of the TitleDataOverride to use with this variant. + /// + public string TitleDataOverrideLabel; + /// + /// Percentage of target audience traffic that will see this variant. + /// + public uint TrafficPercentage; + /// + /// Variables returned by this variant. + /// + public List Variables; + } +} +#endif diff --git a/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationModels.cs.meta b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationModels.cs.meta new file mode 100644 index 00000000..45da40ec --- /dev/null +++ b/Assets/PlayFabSDK/Experimentation/PlayFabExperimentationModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0804132d8066c1440a5cfdd0e56bf63c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Groups.meta b/Assets/PlayFabSDK/Groups.meta new file mode 100644 index 00000000..fc6db3ec --- /dev/null +++ b/Assets/PlayFabSDK/Groups.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 362835eaf7c8a5e47baa567500fe68b1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Groups/PlayFabEvents.cs b/Assets/PlayFabSDK/Groups/PlayFabEvents.cs new file mode 100644 index 00000000..90a7937c --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabEvents.cs @@ -0,0 +1,60 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.GroupsModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnGroupsAcceptGroupApplicationRequestEvent; + public event PlayFabResultEvent OnGroupsAcceptGroupApplicationResultEvent; + public event PlayFabRequestEvent OnGroupsAcceptGroupInvitationRequestEvent; + public event PlayFabResultEvent OnGroupsAcceptGroupInvitationResultEvent; + public event PlayFabRequestEvent OnGroupsAddMembersRequestEvent; + public event PlayFabResultEvent OnGroupsAddMembersResultEvent; + public event PlayFabRequestEvent OnGroupsApplyToGroupRequestEvent; + public event PlayFabResultEvent OnGroupsApplyToGroupResultEvent; + public event PlayFabRequestEvent OnGroupsBlockEntityRequestEvent; + public event PlayFabResultEvent OnGroupsBlockEntityResultEvent; + public event PlayFabRequestEvent OnGroupsChangeMemberRoleRequestEvent; + public event PlayFabResultEvent OnGroupsChangeMemberRoleResultEvent; + public event PlayFabRequestEvent OnGroupsCreateGroupRequestEvent; + public event PlayFabResultEvent OnGroupsCreateGroupResultEvent; + public event PlayFabRequestEvent OnGroupsCreateRoleRequestEvent; + public event PlayFabResultEvent OnGroupsCreateRoleResultEvent; + public event PlayFabRequestEvent OnGroupsDeleteGroupRequestEvent; + public event PlayFabResultEvent OnGroupsDeleteGroupResultEvent; + public event PlayFabRequestEvent OnGroupsDeleteRoleRequestEvent; + public event PlayFabResultEvent OnGroupsDeleteRoleResultEvent; + public event PlayFabRequestEvent OnGroupsGetGroupRequestEvent; + public event PlayFabResultEvent OnGroupsGetGroupResultEvent; + public event PlayFabRequestEvent OnGroupsInviteToGroupRequestEvent; + public event PlayFabResultEvent OnGroupsInviteToGroupResultEvent; + public event PlayFabRequestEvent OnGroupsIsMemberRequestEvent; + public event PlayFabResultEvent OnGroupsIsMemberResultEvent; + public event PlayFabRequestEvent OnGroupsListGroupApplicationsRequestEvent; + public event PlayFabResultEvent OnGroupsListGroupApplicationsResultEvent; + public event PlayFabRequestEvent OnGroupsListGroupBlocksRequestEvent; + public event PlayFabResultEvent OnGroupsListGroupBlocksResultEvent; + public event PlayFabRequestEvent OnGroupsListGroupInvitationsRequestEvent; + public event PlayFabResultEvent OnGroupsListGroupInvitationsResultEvent; + public event PlayFabRequestEvent OnGroupsListGroupMembersRequestEvent; + public event PlayFabResultEvent OnGroupsListGroupMembersResultEvent; + public event PlayFabRequestEvent OnGroupsListMembershipRequestEvent; + public event PlayFabResultEvent OnGroupsListMembershipResultEvent; + public event PlayFabRequestEvent OnGroupsListMembershipOpportunitiesRequestEvent; + public event PlayFabResultEvent OnGroupsListMembershipOpportunitiesResultEvent; + public event PlayFabRequestEvent OnGroupsRemoveGroupApplicationRequestEvent; + public event PlayFabResultEvent OnGroupsRemoveGroupApplicationResultEvent; + public event PlayFabRequestEvent OnGroupsRemoveGroupInvitationRequestEvent; + public event PlayFabResultEvent OnGroupsRemoveGroupInvitationResultEvent; + public event PlayFabRequestEvent OnGroupsRemoveMembersRequestEvent; + public event PlayFabResultEvent OnGroupsRemoveMembersResultEvent; + public event PlayFabRequestEvent OnGroupsUnblockEntityRequestEvent; + public event PlayFabResultEvent OnGroupsUnblockEntityResultEvent; + public event PlayFabRequestEvent OnGroupsUpdateGroupRequestEvent; + public event PlayFabResultEvent OnGroupsUpdateGroupResultEvent; + public event PlayFabRequestEvent OnGroupsUpdateRoleRequestEvent; + public event PlayFabResultEvent OnGroupsUpdateRoleResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Groups/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Groups/PlayFabEvents.cs.meta new file mode 100644 index 00000000..5d2b754c --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89aad6173ff54ed4092f14bd118f0652 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Groups/PlayFabGroupsAPI.cs b/Assets/PlayFabSDK/Groups/PlayFabGroupsAPI.cs new file mode 100644 index 00000000..82465f0d --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabGroupsAPI.cs @@ -0,0 +1,366 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.GroupsModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// The Groups API is designed for any permanent or semi-permanent collections of Entities (players, or non-players). If you + /// want to make Guilds/Clans/Corporations/etc., then you should use groups. Groups can also be used to make chatrooms, + /// parties, or any other persistent collection of entities. + /// + public static class PlayFabGroupsAPI + { + static PlayFabGroupsAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Accepts an outstanding invitation to to join a group + /// + public static void AcceptGroupApplication(AcceptGroupApplicationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/AcceptGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Accepts an invitation to join a group + /// + public static void AcceptGroupInvitation(AcceptGroupInvitationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/AcceptGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds members to a group or role. + /// + public static void AddMembers(AddMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/AddMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Applies to join a group + /// + public static void ApplyToGroup(ApplyToGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ApplyToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Blocks a list of entities from joining a group. + /// + public static void BlockEntity(BlockEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/BlockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Changes the role membership of a list of entities from one role to another. + /// + public static void ChangeMemberRole(ChangeMemberRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ChangeMemberRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new group. + /// + public static void CreateGroup(CreateGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/CreateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a new group role. + /// + public static void CreateRole(CreateGroupRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/CreateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a group and all roles, invitations, join requests, and blocks associated with it. + /// + public static void DeleteGroup(DeleteGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/DeleteGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes an existing role in a group. + /// + public static void DeleteRole(DeleteRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/DeleteRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets information about a group and its roles + /// + public static void GetGroup(GetGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/GetGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Invites a player to join a group + /// + public static void InviteToGroup(InviteToGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/InviteToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Checks to see if an entity is a member of a group or role within the group + /// + public static void IsMember(IsMemberRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/IsMember", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all outstanding requests to join a group + /// + public static void ListGroupApplications(ListGroupApplicationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ListGroupApplications", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all entities blocked from joining a group + /// + public static void ListGroupBlocks(ListGroupBlocksRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ListGroupBlocks", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all outstanding invitations for a group + /// + public static void ListGroupInvitations(ListGroupInvitationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ListGroupInvitations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all members for a group + /// + public static void ListGroupMembers(ListGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ListGroupMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all groups and roles for an entity + /// + public static void ListMembership(ListMembershipRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ListMembership", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all outstanding invitations and group applications for an entity + /// + public static void ListMembershipOpportunities(ListMembershipOpportunitiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/ListMembershipOpportunities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes an application to join a group + /// + public static void RemoveGroupApplication(RemoveGroupApplicationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/RemoveGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes an invitation join a group + /// + public static void RemoveGroupInvitation(RemoveGroupInvitationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/RemoveGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes members from a group. + /// + public static void RemoveMembers(RemoveMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/RemoveMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unblocks a list of entities from joining a group + /// + public static void UnblockEntity(UnblockEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/UnblockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates non-membership data about a group. + /// + public static void UpdateGroup(UpdateGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/UpdateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates metadata about a role. + /// + public static void UpdateRole(UpdateGroupRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Group/UpdateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Groups/PlayFabGroupsAPI.cs.meta b/Assets/PlayFabSDK/Groups/PlayFabGroupsAPI.cs.meta new file mode 100644 index 00000000..c4945c8f --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabGroupsAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 42170e999ab34f549ac03af203959176 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Groups/PlayFabGroupsInstanceAPI.cs b/Assets/PlayFabSDK/Groups/PlayFabGroupsInstanceAPI.cs new file mode 100644 index 00000000..2a6fe0bd --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabGroupsInstanceAPI.cs @@ -0,0 +1,334 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.GroupsModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// The Groups API is designed for any permanent or semi-permanent collections of Entities (players, or non-players). If you + /// want to make Guilds/Clans/Corporations/etc., then you should use groups. Groups can also be used to make chatrooms, + /// parties, or any other persistent collection of entities. + /// + public class PlayFabGroupsInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabGroupsInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabGroupsInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Accepts an outstanding invitation to to join a group + /// + public void AcceptGroupApplication(AcceptGroupApplicationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/AcceptGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Accepts an invitation to join a group + /// + public void AcceptGroupInvitation(AcceptGroupInvitationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/AcceptGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds members to a group or role. + /// + public void AddMembers(AddMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/AddMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Applies to join a group + /// + public void ApplyToGroup(ApplyToGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ApplyToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Blocks a list of entities from joining a group. + /// + public void BlockEntity(BlockEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/BlockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Changes the role membership of a list of entities from one role to another. + /// + public void ChangeMemberRole(ChangeMemberRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ChangeMemberRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new group. + /// + public void CreateGroup(CreateGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/CreateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a new group role. + /// + public void CreateRole(CreateGroupRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/CreateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a group and all roles, invitations, join requests, and blocks associated with it. + /// + public void DeleteGroup(DeleteGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/DeleteGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes an existing role in a group. + /// + public void DeleteRole(DeleteRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/DeleteRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets information about a group and its roles + /// + public void GetGroup(GetGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/GetGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Invites a player to join a group + /// + public void InviteToGroup(InviteToGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/InviteToGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Checks to see if an entity is a member of a group or role within the group + /// + public void IsMember(IsMemberRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/IsMember", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all outstanding requests to join a group + /// + public void ListGroupApplications(ListGroupApplicationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ListGroupApplications", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all entities blocked from joining a group + /// + public void ListGroupBlocks(ListGroupBlocksRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ListGroupBlocks", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all outstanding invitations for a group + /// + public void ListGroupInvitations(ListGroupInvitationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ListGroupInvitations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all members for a group + /// + public void ListGroupMembers(ListGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ListGroupMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all groups and roles for an entity + /// + public void ListMembership(ListMembershipRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ListMembership", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all outstanding invitations and group applications for an entity + /// + public void ListMembershipOpportunities(ListMembershipOpportunitiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/ListMembershipOpportunities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes an application to join a group + /// + public void RemoveGroupApplication(RemoveGroupApplicationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/RemoveGroupApplication", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes an invitation join a group + /// + public void RemoveGroupInvitation(RemoveGroupInvitationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/RemoveGroupInvitation", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes members from a group. + /// + public void RemoveMembers(RemoveMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/RemoveMembers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unblocks a list of entities from joining a group + /// + public void UnblockEntity(UnblockEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/UnblockEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates non-membership data about a group. + /// + public void UpdateGroup(UpdateGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/UpdateGroup", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates metadata about a role. + /// + public void UpdateRole(UpdateGroupRoleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Group/UpdateRole", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Groups/PlayFabGroupsInstanceAPI.cs.meta b/Assets/PlayFabSDK/Groups/PlayFabGroupsInstanceAPI.cs.meta new file mode 100644 index 00000000..2de4310f --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabGroupsInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e14b336d534f60f4e911c8db52e74a86 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Groups/PlayFabGroupsModels.cs b/Assets/PlayFabSDK/Groups/PlayFabGroupsModels.cs new file mode 100644 index 00000000..e2ce9b30 --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabGroupsModels.cs @@ -0,0 +1,985 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.GroupsModels +{ + /// + /// Accepts an outstanding invitation to to join a group if the invited entity is not blocked by the group. Nothing is + /// returned in the case of success. + /// + [Serializable] + public class AcceptGroupApplicationRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Type of the entity to accept as. Must be the same entity as the claimant or an entity that is a child of the claimant + /// entity. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + /// + /// Accepts an outstanding invitation to join the group if the invited entity is not blocked by the group. Only the invited + /// entity or a parent in its chain (e.g. title) may accept the invitation on the invited entity's behalf. Nothing is + /// returned in the case of success. + /// + [Serializable] + public class AcceptGroupInvitationRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + /// + /// Adds members to a group or role. Existing members of the group will added to roles within the group, but if the user is + /// not already a member of the group, only title claimants may add them to the group, and others must use the group + /// application or invite system to add new members to a group. Returns nothing if successful. + /// + [Serializable] + public class AddMembersRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// List of entities to add to the group. Only entities of type title_player_account and character may be added to groups. + /// + public List Members; + /// + /// Optional: The ID of the existing role to add the entities to. If this is not specified, the default member role for the + /// group will be used. Role IDs must be between 1 and 64 characters long. + /// + public string RoleId; + } + + /// + /// Creates an application to join a group. Calling this while a group application already exists will return the same + /// application instead of an error and will not refresh the time before the application expires. By default, if the entity + /// has an invitation to join the group outstanding, this will accept the invitation to join the group instead and return an + /// error indicating such, rather than creating a duplicate application to join that will need to be cleaned up later. + /// Returns information about the application or an error indicating an invitation was accepted instead. + /// + [Serializable] + public class ApplyToGroupRequest : PlayFabRequestCommon + { + /// + /// Optional, default true. Automatically accept an outstanding invitation if one exists instead of creating an application + /// + public bool? AutoAcceptOutstandingInvite; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + /// + /// Describes an application to join a group + /// + [Serializable] + public class ApplyToGroupResponse : PlayFabResultCommon + { + /// + /// Type of entity that requested membership + /// + public EntityWithLineage Entity; + /// + /// When the application to join will expire and be deleted + /// + public DateTime Expires; + /// + /// ID of the group that the entity requesting membership to + /// + public EntityKey Group; + } + + /// + /// Blocks a list of entities from joining a group. Blocked entities may not create new applications to join, be invited to + /// join, accept an invitation, or have an application accepted. Failure due to being blocked does not clean up existing + /// applications or invitations to the group. No data is returned in the case of success. + /// + [Serializable] + public class BlockEntityRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + /// + /// Changes the role membership of a list of entities from one role to another in in a single operation. The destination + /// role must already exist. This is equivalent to adding the entities to the destination role and removing from the origin + /// role. Returns nothing if successful. + /// + [Serializable] + public class ChangeMemberRoleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The ID of the role that the entities will become a member of. This must be an existing role. Role IDs must be between 1 + /// and 64 characters long. + /// + public string DestinationRoleId; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// List of entities to move between roles in the group. All entities in this list must be members of the group and origin + /// role. + /// + public List Members; + /// + /// The ID of the role that the entities currently are a member of. Role IDs must be between 1 and 64 characters long. + /// + public string OriginRoleId; + } + + /// + /// Creates a new group, as well as administration and member roles, based off of a title's group template. Returns + /// information about the group that was created. + /// + [Serializable] + public class CreateGroupRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The name of the group. This is unique at the title level by default. + /// + public string GroupName; + } + + [Serializable] + public class CreateGroupResponse : PlayFabResultCommon + { + /// + /// The ID of the administrator role for the group. + /// + public string AdminRoleId; + /// + /// The server date and time the group was created. + /// + public DateTime Created; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// The name of the group. + /// + public string GroupName; + /// + /// The ID of the default member role for the group. + /// + public string MemberRoleId; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + /// + /// The list of roles and names that belong to the group. + /// + public Dictionary Roles; + } + + /// + /// Creates a new role within an existing group, with no members. Both the role ID and role name must be unique within the + /// group, but the name can be the same as the ID. The role ID is set at creation and cannot be changed. Returns information + /// about the role that was created. + /// + [Serializable] + public class CreateGroupRoleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// The ID of the role. This must be unique within the group and cannot be changed. Role IDs must be between 1 and 64 + /// characters long and are restricted to a-Z, A-Z, 0-9, '(', ')', '_', '-' and '.'. + /// + public string RoleId; + /// + /// The name of the role. This must be unique within the group and can be changed later. Role names must be between 1 and + /// 100 characters long + /// + public string RoleName; + } + + [Serializable] + public class CreateGroupRoleResponse : PlayFabResultCommon + { + /// + /// The current version of the group profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + /// + /// ID for the role + /// + public string RoleId; + /// + /// The name of the role + /// + public string RoleName; + } + + /// + /// Deletes a group and all roles, invitations, join requests, and blocks associated with it. Permission to delete is only + /// required the group itself to execute this action. The group and data cannot be cannot be recovered once removed, but any + /// abuse reports about the group will remain. No data is returned in the case of success. + /// + [Serializable] + public class DeleteGroupRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// ID of the group or role to remove + /// + public EntityKey Group; + } + + /// + /// Returns information about the role + /// + [Serializable] + public class DeleteRoleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// The ID of the role to delete. Role IDs must be between 1 and 64 characters long. + /// + public string RoleId; + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EntityMemberRole : PlayFabBaseModel + { + /// + /// The list of members in the role + /// + public List Members; + /// + /// The ID of the role. + /// + public string RoleId; + /// + /// The name of the role + /// + public string RoleName; + } + + /// + /// Entity wrapper class that contains the entity key and the entities that make up the lineage of the entity. + /// + [Serializable] + public class EntityWithLineage : PlayFabBaseModel + { + /// + /// The entity key for the specified entity + /// + public EntityKey Key; + /// + /// Dictionary of entity keys for related entities. Dictionary key is entity type. + /// + public Dictionary Lineage; + } + + /// + /// Returns the ID, name, role list and other non-membership related information about a group. + /// + [Serializable] + public class GetGroupRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// The full name of the group + /// + public string GroupName; + } + + [Serializable] + public class GetGroupResponse : PlayFabResultCommon + { + /// + /// The ID of the administrator role for the group. + /// + public string AdminRoleId; + /// + /// The server date and time the group was created. + /// + public DateTime Created; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// The name of the group. + /// + public string GroupName; + /// + /// The ID of the default member role for the group. + /// + public string MemberRoleId; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + /// + /// The list of roles and names that belong to the group. + /// + public Dictionary Roles; + } + + /// + /// Describes an application to join a group + /// + [Serializable] + public class GroupApplication : PlayFabBaseModel + { + /// + /// Type of entity that requested membership + /// + public EntityWithLineage Entity; + /// + /// When the application to join will expire and be deleted + /// + public DateTime Expires; + /// + /// ID of the group that the entity requesting membership to + /// + public EntityKey Group; + } + + /// + /// Describes an entity that is blocked from joining a group. + /// + [Serializable] + public class GroupBlock : PlayFabBaseModel + { + /// + /// The entity that is blocked + /// + public EntityWithLineage Entity; + /// + /// ID of the group that the entity is blocked from + /// + public EntityKey Group; + } + + /// + /// Describes an invitation to a group. + /// + [Serializable] + public class GroupInvitation : PlayFabBaseModel + { + /// + /// When the invitation will expire and be deleted + /// + public DateTime Expires; + /// + /// The group that the entity invited to + /// + public EntityKey Group; + /// + /// The entity that created the invitation + /// + public EntityWithLineage InvitedByEntity; + /// + /// The entity that is invited + /// + public EntityWithLineage InvitedEntity; + /// + /// ID of the role in the group to assign the user to. + /// + public string RoleId; + } + + /// + /// Describes a group role + /// + [Serializable] + public class GroupRole : PlayFabBaseModel + { + /// + /// ID for the role + /// + public string RoleId; + /// + /// The name of the role + /// + public string RoleName; + } + + /// + /// Describes a group and the roles that it contains + /// + [Serializable] + public class GroupWithRoles : PlayFabBaseModel + { + /// + /// ID for the group + /// + public EntityKey Group; + /// + /// The name of the group + /// + public string GroupName; + /// + /// The current version of the profile, can be used for concurrency control during updates. + /// + public int ProfileVersion; + /// + /// The list of roles within the group + /// + public List Roles; + } + + /// + /// Invites a player to join a group, if they are not blocked by the group. An optional role can be provided to + /// automatically assign the player to the role if they accept the invitation. By default, if the entity has an application + /// to the group outstanding, this will accept the application instead and return an error indicating such, rather than + /// creating a duplicate invitation to join that will need to be cleaned up later. Returns information about the new + /// invitation or an error indicating an existing application to join was accepted. + /// + [Serializable] + public class InviteToGroupRequest : PlayFabRequestCommon + { + /// + /// Optional, default true. Automatically accept an application if one exists instead of creating an invitation + /// + public bool? AutoAcceptOutstandingApplication; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// Optional. ID of an existing a role in the group to assign the user to. The group's default member role is used if this + /// is not specified. Role IDs must be between 1 and 64 characters long. + /// + public string RoleId; + } + + /// + /// Describes an invitation to a group. + /// + [Serializable] + public class InviteToGroupResponse : PlayFabResultCommon + { + /// + /// When the invitation will expire and be deleted + /// + public DateTime Expires; + /// + /// The group that the entity invited to + /// + public EntityKey Group; + /// + /// The entity that created the invitation + /// + public EntityWithLineage InvitedByEntity; + /// + /// The entity that is invited + /// + public EntityWithLineage InvitedEntity; + /// + /// ID of the role in the group to assign the user to. + /// + public string RoleId; + } + + /// + /// Checks to see if an entity is a member of a group or role within the group. A result indicating if the entity is a + /// member of the group is returned, or a permission error if the caller does not have permission to read the group's member + /// list. + /// + [Serializable] + public class IsMemberRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// Optional: ID of the role to check membership of. Defaults to any role (that is, check to see if the entity is a member + /// of the group in any capacity) if not specified. + /// + public string RoleId; + } + + [Serializable] + public class IsMemberResponse : PlayFabResultCommon + { + /// + /// A value indicating whether or not the entity is a member. + /// + public bool IsMember; + } + + /// + /// Lists all outstanding requests to join a group. Returns a list of all requests to join, as well as when the request will + /// expire. To get the group applications for a specific entity, use ListMembershipOpportunities. + /// + [Serializable] + public class ListGroupApplicationsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + [Serializable] + public class ListGroupApplicationsResponse : PlayFabResultCommon + { + /// + /// The requested list of applications to the group. + /// + public List Applications; + } + + /// + /// Lists all entities blocked from joining a group. A list of blocked entities is returned + /// + [Serializable] + public class ListGroupBlocksRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + [Serializable] + public class ListGroupBlocksResponse : PlayFabResultCommon + { + /// + /// The requested list blocked entities. + /// + public List BlockedEntities; + } + + /// + /// Lists all outstanding invitations for a group. Returns a list of entities that have been invited, as well as when the + /// invitation will expire. To get the group invitations for a specific entity, use ListMembershipOpportunities. + /// + [Serializable] + public class ListGroupInvitationsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + [Serializable] + public class ListGroupInvitationsResponse : PlayFabResultCommon + { + /// + /// The requested list of group invitations. + /// + public List Invitations; + } + + /// + /// Gets a list of members and the roles they belong to within the group. If the caller does not have permission to view the + /// role, and the member is in no other role, the member is not displayed. Returns a list of entities that are members of + /// the group. + /// + [Serializable] + public class ListGroupMembersRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// ID of the group to list the members and roles for + /// + public EntityKey Group; + } + + [Serializable] + public class ListGroupMembersResponse : PlayFabResultCommon + { + /// + /// The requested list of roles and member entity IDs. + /// + public List Members; + } + + /// + /// Lists all outstanding group applications and invitations for an entity. Anyone may call this for any entity, but data + /// will only be returned for the entity or a parent of that entity. To list invitations or applications for a group to + /// check if a player is trying to join, use ListGroupInvitations and ListGroupApplications. + /// + [Serializable] + public class ListMembershipOpportunitiesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class ListMembershipOpportunitiesResponse : PlayFabResultCommon + { + /// + /// The requested list of group applications. + /// + public List Applications; + /// + /// The requested list of group invitations. + /// + public List Invitations; + } + + /// + /// Lists the groups and roles that an entity is a part of, checking to see if group and role metadata and memberships + /// should be visible to the caller. If the entity is not in any roles that are visible to the caller, the group is not + /// returned in the results, even if the caller otherwise has permission to see that the entity is a member of that group. + /// + [Serializable] + public class ListMembershipRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class ListMembershipResponse : PlayFabResultCommon + { + /// + /// The list of groups + /// + public List Groups; + } + + public enum OperationTypes + { + Created, + Updated, + Deleted, + None + } + + /// + /// Removes an existing application to join the group. This is used for both rejection of an application as well as + /// withdrawing an application. The applying entity or a parent in its chain (e.g. title) may withdraw the application, and + /// any caller with appropriate access in the group may reject an application. No data is returned in the case of success. + /// + [Serializable] + public class RemoveGroupApplicationRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + /// + /// Removes an existing invitation to join the group. This is used for both rejection of an invitation as well as rescinding + /// an invitation. The invited entity or a parent in its chain (e.g. title) may reject the invitation by calling this + /// method, and any caller with appropriate access in the group may rescind an invitation. No data is returned in the case + /// of success. + /// + [Serializable] + public class RemoveGroupInvitationRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + /// + /// Removes members from a group. A member can always remove themselves from a group, regardless of permissions. Returns + /// nothing if successful. + /// + [Serializable] + public class RemoveMembersRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// List of entities to remove + /// + public List Members; + /// + /// The ID of the role to remove the entities from. + /// + public string RoleId; + } + + /// + /// Unblocks a list of entities from joining a group. No data is returned in the case of success. + /// + [Serializable] + public class UnblockEntityRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The identifier of the group + /// + public EntityKey Group; + } + + /// + /// Updates data about a group, such as the name or default member role. Returns information about whether the update was + /// successful. Only title claimants may modify the administration role for a group. + /// + [Serializable] + public class UpdateGroupRequest : PlayFabRequestCommon + { + /// + /// Optional: the ID of an existing role to set as the new administrator role for the group + /// + public string AdminRoleId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from the + /// GetGroup API, you can ensure that the group data update will only be performed if the group has not been updated by any + /// other clients since the version you last loaded. + /// + public int? ExpectedProfileVersion; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// Optional: the new name of the group + /// + public string GroupName; + /// + /// Optional: the ID of an existing role to set as the new member role for the group + /// + public string MemberRoleId; + } + + [Serializable] + public class UpdateGroupResponse : PlayFabResultCommon + { + /// + /// Optional reason to explain why the operation was the result that it was. + /// + public string OperationReason; + /// + /// New version of the group data. + /// + public int ProfileVersion; + /// + /// Indicates which operation was completed, either Created, Updated, Deleted or None. + /// + public OperationTypes? SetResult; + } + + /// + /// Updates the role name. Returns information about whether the update was successful. + /// + [Serializable] + public class UpdateGroupRoleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from the + /// GetGroup API, you can ensure that the group data update will only be performed if the group has not been updated by any + /// other clients since the version you last loaded. + /// + public int? ExpectedProfileVersion; + /// + /// The identifier of the group + /// + public EntityKey Group; + /// + /// ID of the role to update. Role IDs must be between 1 and 64 characters long. + /// + public string RoleId; + /// + /// The new name of the role + /// + public string RoleName; + } + + [Serializable] + public class UpdateGroupRoleResponse : PlayFabResultCommon + { + /// + /// Optional reason to explain why the operation was the result that it was. + /// + public string OperationReason; + /// + /// New version of the role data. + /// + public int ProfileVersion; + /// + /// Indicates which operation was completed, either Created, Updated, Deleted or None. + /// + public OperationTypes? SetResult; + } +} +#endif diff --git a/Assets/PlayFabSDK/Groups/PlayFabGroupsModels.cs.meta b/Assets/PlayFabSDK/Groups/PlayFabGroupsModels.cs.meta new file mode 100644 index 00000000..c093d751 --- /dev/null +++ b/Assets/PlayFabSDK/Groups/PlayFabGroupsModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d73f86b427d81044bb2417ea3b5b03ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Insights.meta b/Assets/PlayFabSDK/Insights.meta new file mode 100644 index 00000000..10264c52 --- /dev/null +++ b/Assets/PlayFabSDK/Insights.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9e9ed76149c97e14c85789225c8c3971 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Insights/PlayFabEvents.cs b/Assets/PlayFabSDK/Insights/PlayFabEvents.cs new file mode 100644 index 00000000..b07d1a5c --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabEvents.cs @@ -0,0 +1,22 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.InsightsModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnInsightsGetDetailsRequestEvent; + public event PlayFabResultEvent OnInsightsGetDetailsResultEvent; + public event PlayFabRequestEvent OnInsightsGetLimitsRequestEvent; + public event PlayFabResultEvent OnInsightsGetLimitsResultEvent; + public event PlayFabRequestEvent OnInsightsGetOperationStatusRequestEvent; + public event PlayFabResultEvent OnInsightsGetOperationStatusResultEvent; + public event PlayFabRequestEvent OnInsightsGetPendingOperationsRequestEvent; + public event PlayFabResultEvent OnInsightsGetPendingOperationsResultEvent; + public event PlayFabRequestEvent OnInsightsSetPerformanceRequestEvent; + public event PlayFabResultEvent OnInsightsSetPerformanceResultEvent; + public event PlayFabRequestEvent OnInsightsSetStorageRetentionRequestEvent; + public event PlayFabResultEvent OnInsightsSetStorageRetentionResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Insights/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Insights/PlayFabEvents.cs.meta new file mode 100644 index 00000000..a7bdce18 --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f37defb20913be94a8d7b0e4ed5b97cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Insights/PlayFabInsightsAPI.cs b/Assets/PlayFabSDK/Insights/PlayFabInsightsAPI.cs new file mode 100644 index 00000000..b67e3883 --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabInsightsAPI.cs @@ -0,0 +1,119 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.InsightsModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// Manage the Insights performance level and data storage retention settings. + /// + public static class PlayFabInsightsAPI + { + static PlayFabInsightsAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Gets the current values for the Insights performance and data storage retention, list of pending operations, and the + /// performance and data storage retention limits. + /// + public static void GetDetails(InsightsEmptyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Insights/GetDetails", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the range of allowed values for performance and data storage retention values as well as the submeter details + /// for each performance level. + /// + public static void GetLimits(InsightsEmptyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Insights/GetLimits", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the status of a SetPerformance or SetStorageRetention operation. + /// + public static void GetOperationStatus(InsightsGetOperationStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Insights/GetOperationStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a list of pending SetPerformance and/or SetStorageRetention operations for the title. + /// + public static void GetPendingOperations(InsightsGetPendingOperationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Insights/GetPendingOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the Insights performance level value for the title. + /// + public static void SetPerformance(InsightsSetPerformanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Insights/SetPerformance", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the Insights data storage retention days value for the title. + /// + public static void SetStorageRetention(InsightsSetStorageRetentionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Insights/SetStorageRetention", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Insights/PlayFabInsightsAPI.cs.meta b/Assets/PlayFabSDK/Insights/PlayFabInsightsAPI.cs.meta new file mode 100644 index 00000000..51bd4edb --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabInsightsAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 711d5cb10af3bcf44b9a605a7e7c03e3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Insights/PlayFabInsightsInstanceAPI.cs b/Assets/PlayFabSDK/Insights/PlayFabInsightsInstanceAPI.cs new file mode 100644 index 00000000..5a6c4200 --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabInsightsInstanceAPI.cs @@ -0,0 +1,125 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.InsightsModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// Manage the Insights performance level and data storage retention settings. + /// + public class PlayFabInsightsInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabInsightsInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabInsightsInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Gets the current values for the Insights performance and data storage retention, list of pending operations, and the + /// performance and data storage retention limits. + /// + public void GetDetails(InsightsEmptyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Insights/GetDetails", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the range of allowed values for performance and data storage retention values as well as the submeter details + /// for each performance level. + /// + public void GetLimits(InsightsEmptyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Insights/GetLimits", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the status of a SetPerformance or SetStorageRetention operation. + /// + public void GetOperationStatus(InsightsGetOperationStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Insights/GetOperationStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a list of pending SetPerformance and/or SetStorageRetention operations for the title. + /// + public void GetPendingOperations(InsightsGetPendingOperationsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Insights/GetPendingOperations", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the Insights performance level value for the title. + /// + public void SetPerformance(InsightsSetPerformanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Insights/SetPerformance", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the Insights data storage retention days value for the title. + /// + public void SetStorageRetention(InsightsSetStorageRetentionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Insights/SetStorageRetention", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Insights/PlayFabInsightsInstanceAPI.cs.meta b/Assets/PlayFabSDK/Insights/PlayFabInsightsInstanceAPI.cs.meta new file mode 100644 index 00000000..3007153c --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabInsightsInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c2e7ee83796bb834cbd6263a7a6d65ca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Insights/PlayFabInsightsModels.cs b/Assets/PlayFabSDK/Insights/PlayFabInsightsModels.cs new file mode 100644 index 00000000..fbfd2d62 --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabInsightsModels.cs @@ -0,0 +1,235 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.InsightsModels +{ + [Serializable] + public class InsightsEmptyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class InsightsGetDetailsResponse : PlayFabResultCommon + { + /// + /// Amount of data (in MB) currently used by Insights. + /// + public uint DataUsageMb; + /// + /// Details of any error that occurred while retrieving Insights details. + /// + public string ErrorMessage; + /// + /// Allowed range of values for performance level and data storage retention. + /// + public InsightsGetLimitsResponse Limits; + /// + /// List of pending Insights operations for the title. + /// + public List PendingOperations; + /// + /// Current Insights performance level setting. + /// + public int PerformanceLevel; + /// + /// Current Insights data storage retention value in days. + /// + public int RetentionDays; + } + + [Serializable] + public class InsightsGetLimitsResponse : PlayFabResultCommon + { + /// + /// Default Insights performance level. + /// + public int DefaultPerformanceLevel; + /// + /// Default Insights data storage retention days. + /// + public int DefaultStorageRetentionDays; + /// + /// Maximum allowed data storage retention days. + /// + public int StorageMaxRetentionDays; + /// + /// Minimum allowed data storage retention days. + /// + public int StorageMinRetentionDays; + /// + /// List of Insights submeter limits for the allowed performance levels. + /// + public List SubMeters; + } + + /// + /// Returns the current status for the requested operation id. + /// + [Serializable] + public class InsightsGetOperationStatusRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Id of the Insights operation. + /// + public string OperationId; + } + + [Serializable] + public class InsightsGetOperationStatusResponse : PlayFabResultCommon + { + /// + /// Optional message related to the operation details. + /// + public string Message; + /// + /// Time the operation was completed. + /// + public DateTime OperationCompletedTime; + /// + /// Id of the Insights operation. + /// + public string OperationId; + /// + /// Time the operation status was last updated. + /// + public DateTime OperationLastUpdated; + /// + /// Time the operation started. + /// + public DateTime OperationStartedTime; + /// + /// The type of operation, SetPerformance or SetStorageRetention. + /// + public string OperationType; + /// + /// The value requested for the operation. + /// + public int OperationValue; + /// + /// Current status of the operation. + /// + public string Status; + } + + /// + /// Returns a list of operations that are in the pending state for the requested operation type. + /// + [Serializable] + public class InsightsGetPendingOperationsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The type of pending operations requested, or blank for all operation types. + /// + public string OperationType; + } + + [Serializable] + public class InsightsGetPendingOperationsResponse : PlayFabResultCommon + { + /// + /// List of pending Insights operations. + /// + public List PendingOperations; + } + + [Serializable] + public class InsightsOperationResponse : PlayFabResultCommon + { + /// + /// Optional message related to the operation details. + /// + public string Message; + /// + /// Id of the Insights operation. + /// + public string OperationId; + /// + /// The type of operation, SetPerformance or SetStorageRetention. + /// + public string OperationType; + } + + [Serializable] + public class InsightsPerformanceLevel : PlayFabBaseModel + { + /// + /// Number of allowed active event exports. + /// + public int ActiveEventExports; + /// + /// Maximum cache size. + /// + public int CacheSizeMB; + /// + /// Maximum number of concurrent queries. + /// + public int Concurrency; + /// + /// Number of Insights credits consumed per minute. + /// + public double CreditsPerMinute; + /// + /// Maximum events per second. + /// + public int EventsPerSecond; + /// + /// Performance level. + /// + public int Level; + /// + /// Maximum amount of memory allowed per query. + /// + public int MaxMemoryPerQueryMB; + /// + /// Amount of compute power allocated for queries and operations. + /// + public int VirtualCpuCores; + } + + /// + /// Sets the performance level to the requested value. Use the GetLimits method to get the allowed values. + /// + [Serializable] + public class InsightsSetPerformanceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The Insights performance level to apply to the title. + /// + public int PerformanceLevel; + } + + /// + /// Sets the data storage retention to the requested value. Use the GetLimits method to get the range of allowed values. + /// + [Serializable] + public class InsightsSetStorageRetentionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The Insights data storage retention value (in days) to apply to the title. + /// + public int RetentionDays; + } +} +#endif diff --git a/Assets/PlayFabSDK/Insights/PlayFabInsightsModels.cs.meta b/Assets/PlayFabSDK/Insights/PlayFabInsightsModels.cs.meta new file mode 100644 index 00000000..ab052d03 --- /dev/null +++ b/Assets/PlayFabSDK/Insights/PlayFabInsightsModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0018df8cb03ec3a498320c2be74427e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Localization.meta b/Assets/PlayFabSDK/Localization.meta new file mode 100644 index 00000000..7afe09a1 --- /dev/null +++ b/Assets/PlayFabSDK/Localization.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 36cb4effc7537d94294cbcd603c399af +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Localization/PlayFabEvents.cs b/Assets/PlayFabSDK/Localization/PlayFabEvents.cs new file mode 100644 index 00000000..02a262eb --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabEvents.cs @@ -0,0 +1,12 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.LocalizationModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnLocalizationGetLanguageListRequestEvent; + public event PlayFabResultEvent OnLocalizationGetLanguageListResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Localization/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Localization/PlayFabEvents.cs.meta new file mode 100644 index 00000000..0edb54ce --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1c3bd18b65a5d8d4eb83e5ef98114e4d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Localization/PlayFabLocalizationAPI.cs b/Assets/PlayFabSDK/Localization/PlayFabLocalizationAPI.cs new file mode 100644 index 00000000..d16787fe --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabLocalizationAPI.cs @@ -0,0 +1,52 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.LocalizationModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// The Localization APIs give you the tools needed to manage language setup in your title. + /// + public static class PlayFabLocalizationAPI + { + static PlayFabLocalizationAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Retrieves the list of allowed languages, only accessible by title entities + /// + public static void GetLanguageList(GetLanguageListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Locale/GetLanguageList", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Localization/PlayFabLocalizationAPI.cs.meta b/Assets/PlayFabSDK/Localization/PlayFabLocalizationAPI.cs.meta new file mode 100644 index 00000000..997fea20 --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabLocalizationAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ca10b96ef3ce52644a989907c77d047f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Localization/PlayFabLocalizationInstanceAPI.cs b/Assets/PlayFabSDK/Localization/PlayFabLocalizationInstanceAPI.cs new file mode 100644 index 00000000..8797cfc7 --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabLocalizationInstanceAPI.cs @@ -0,0 +1,68 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.LocalizationModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// The Localization APIs give you the tools needed to manage language setup in your title. + /// + public class PlayFabLocalizationInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabLocalizationInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabLocalizationInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Retrieves the list of allowed languages, only accessible by title entities + /// + public void GetLanguageList(GetLanguageListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Locale/GetLanguageList", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Localization/PlayFabLocalizationInstanceAPI.cs.meta b/Assets/PlayFabSDK/Localization/PlayFabLocalizationInstanceAPI.cs.meta new file mode 100644 index 00000000..ab52fccc --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabLocalizationInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0e3a59c48c3c6fb45a9d83845b225dde +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Localization/PlayFabLocalizationModels.cs b/Assets/PlayFabSDK/Localization/PlayFabLocalizationModels.cs new file mode 100644 index 00000000..49d2d475 --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabLocalizationModels.cs @@ -0,0 +1,26 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.LocalizationModels +{ + [Serializable] + public class GetLanguageListRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetLanguageListResponse : PlayFabResultCommon + { + /// + /// The list of allowed languages, in BCP47 two-letter format + /// + public List LanguageList; + } +} +#endif diff --git a/Assets/PlayFabSDK/Localization/PlayFabLocalizationModels.cs.meta b/Assets/PlayFabSDK/Localization/PlayFabLocalizationModels.cs.meta new file mode 100644 index 00000000..0e2da1e1 --- /dev/null +++ b/Assets/PlayFabSDK/Localization/PlayFabLocalizationModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 772d6350724839b498944cab1b377fb5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Matchmaker.meta b/Assets/PlayFabSDK/Matchmaker.meta new file mode 100644 index 00000000..143b4fea --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8a412908d5a194e469d8ca0be97748d7 +folderAsset: yes +timeCreated: 1468524875 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabEvents.cs b/Assets/PlayFabSDK/Matchmaker/PlayFabEvents.cs new file mode 100644 index 00000000..9248067c --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabEvents.cs @@ -0,0 +1,18 @@ +#if ENABLE_PLAYFABSERVER_API +using PlayFab.MatchmakerModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnMatchmakerAuthUserRequestEvent; + public event PlayFabResultEvent OnMatchmakerAuthUserResultEvent; + public event PlayFabRequestEvent OnMatchmakerPlayerJoinedRequestEvent; + public event PlayFabResultEvent OnMatchmakerPlayerJoinedResultEvent; + public event PlayFabRequestEvent OnMatchmakerPlayerLeftRequestEvent; + public event PlayFabResultEvent OnMatchmakerPlayerLeftResultEvent; + public event PlayFabRequestEvent OnMatchmakerUserInfoRequestEvent; + public event PlayFabResultEvent OnMatchmakerUserInfoResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Matchmaker/PlayFabEvents.cs.meta new file mode 100644 index 00000000..e3a3343c --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1055058934189914bac79666a289e9fd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerAPI.cs b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerAPI.cs new file mode 100644 index 00000000..6265d304 --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerAPI.cs @@ -0,0 +1,88 @@ +#if ENABLE_PLAYFABSERVER_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.MatchmakerModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// Enables the use of an external match-making service in conjunction with PlayFab hosted Game Server instances + /// + public static class PlayFabMatchmakerAPI + { + static PlayFabMatchmakerAPI() {} + + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Validates a user with the PlayFab service + /// + [Obsolete("No longer available", true)] + public static void AuthUser(AuthUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Matchmaker/AuthUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Informs the PlayFab game server hosting service that the indicated user has joined the Game Server Instance specified + /// + [Obsolete("No longer available", true)] + public static void PlayerJoined(PlayerJoinedRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Matchmaker/PlayerJoined", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Informs the PlayFab game server hosting service that the indicated user has left the Game Server Instance specified + /// + [Obsolete("No longer available", true)] + public static void PlayerLeft(PlayerLeftRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Matchmaker/PlayerLeft", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the relevant details for a specified user, which the external match-making service can then use to compute + /// effective matches + /// + [Obsolete("No longer available", true)] + public static void UserInfo(UserInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Matchmaker/UserInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerAPI.cs.meta b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerAPI.cs.meta new file mode 100644 index 00000000..e6f48d33 --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerAPI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c712eeedbc85dfa4c80d30f8a2ed6cd9 +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerInstanceAPI.cs b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerInstanceAPI.cs new file mode 100644 index 00000000..b16f710d --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerInstanceAPI.cs @@ -0,0 +1,98 @@ +#if ENABLE_PLAYFABSERVER_API + +using System; +using System.Collections.Generic; +using PlayFab.MatchmakerModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// Enables the use of an external match-making service in conjunction with PlayFab hosted Game Server instances + /// + public class PlayFabMatchmakerInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabMatchmakerInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabMatchmakerInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Validates a user with the PlayFab service + /// + [Obsolete("No longer available", true)] + public void AuthUser(AuthUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Matchmaker/AuthUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Informs the PlayFab game server hosting service that the indicated user has joined the Game Server Instance specified + /// + [Obsolete("No longer available", true)] + public void PlayerJoined(PlayerJoinedRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Matchmaker/PlayerJoined", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Informs the PlayFab game server hosting service that the indicated user has left the Game Server Instance specified + /// + [Obsolete("No longer available", true)] + public void PlayerLeft(PlayerLeftRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Matchmaker/PlayerLeft", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the relevant details for a specified user, which the external match-making service can then use to compute + /// effective matches + /// + [Obsolete("No longer available", true)] + public void UserInfo(UserInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Matchmaker/UserInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerInstanceAPI.cs.meta b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerInstanceAPI.cs.meta new file mode 100644 index 00000000..cb8059c9 --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 77057761a62cdb648960d924f1b322af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerModels.cs b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerModels.cs new file mode 100644 index 00000000..ed6a7e22 --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerModels.cs @@ -0,0 +1,229 @@ +#if ENABLE_PLAYFABSERVER_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.MatchmakerModels +{ + /// + /// This API allows the external match-making service to confirm that the user has a valid Session Ticket for the title, in + /// order to securely enable match-making. The client passes the user's Session Ticket to the external match-making service, + /// which then passes the Session Ticket in as the AuthorizationTicket in this call. + /// + [Serializable] + public class AuthUserRequest : PlayFabRequestCommon + { + /// + /// Session Ticket provided by the client. + /// + public string AuthorizationTicket; + } + + [Serializable] + public class AuthUserResponse : PlayFabResultCommon + { + /// + /// Boolean indicating if the user has been authorized to use the external match-making service. + /// + public bool Authorized; + /// + /// PlayFab unique identifier of the account that has been authorized. + /// + public string PlayFabId; + } + + /// + /// A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item such as Tags, + /// Description that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can + /// be matched to a catalog entry, which contains the additional information. Also note that Custom Data is only set when + /// the User's specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields + /// such as UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class ItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + [Serializable] + public class PlayerJoinedRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique identifier of the Game Server Instance the user is joining. This must be a Game Server Instance started with the + /// Matchmaker/StartGame API. + /// + public string LobbyId; + /// + /// PlayFab unique identifier for the player joining. + /// + public string PlayFabId; + } + + [Serializable] + public class PlayerJoinedResponse : PlayFabResultCommon + { + } + + [Serializable] + public class PlayerLeftRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique identifier of the Game Server Instance the user is leaving. This must be a Game Server Instance started with the + /// Matchmaker/StartGame API. + /// + public string LobbyId; + /// + /// PlayFab unique identifier for the player leaving. + /// + public string PlayFabId; + } + + [Serializable] + public class PlayerLeftResponse : PlayFabResultCommon + { + } + + [Serializable] + public class UserInfoRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Minimum catalog version for which data is requested (filters the results to only contain inventory items which have a + /// catalog version of this or higher). + /// + public int MinCatalogVersion; + /// + /// PlayFab unique identifier of the user whose information is being requested. + /// + public string PlayFabId; + } + + [Serializable] + public class UserInfoResponse : PlayFabResultCommon + { + /// + /// Array of inventory items in the user's current inventory. + /// + public List Inventory; + /// + /// Boolean indicating whether the user is a developer. + /// + public bool IsDeveloper; + /// + /// PlayFab unique identifier of the user whose information was requested. + /// + public string PlayFabId; + /// + /// Steam unique identifier, if the user has an associated Steam account. + /// + public string SteamId; + /// + /// Title specific display name, if set. + /// + public string TitleDisplayName; + /// + /// PlayFab unique user name. + /// + public string Username; + /// + /// Array of virtual currency balance(s) belonging to the user. + /// + public Dictionary VirtualCurrency; + /// + /// Array of remaining times and timestamps for virtual currencies. + /// + public Dictionary VirtualCurrencyRechargeTimes; + } + + [Serializable] + public class VirtualCurrencyRechargeTime : PlayFabBaseModel + { + /// + /// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value + /// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen + /// below this value. + /// + public int RechargeMax; + /// + /// Server timestamp in UTC indicating the next time the virtual currency will be incremented. + /// + public DateTime RechargeTime; + /// + /// Time remaining (in seconds) before the next recharge increment of the virtual currency. + /// + public int SecondsToRecharge; + } +} +#endif diff --git a/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerModels.cs.meta b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerModels.cs.meta new file mode 100644 index 00000000..ca305967 --- /dev/null +++ b/Assets/PlayFabSDK/Matchmaker/PlayFabMatchmakerModels.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c7c60a1006c1e64499804ca82b2412ed +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Multiplayer.meta b/Assets/PlayFabSDK/Multiplayer.meta new file mode 100644 index 00000000..d9a8414e --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e40ecd498354adc4d835280bde786361 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabEvents.cs b/Assets/PlayFabSDK/Multiplayer/PlayFabEvents.cs new file mode 100644 index 00000000..46607776 --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabEvents.cs @@ -0,0 +1,184 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.MultiplayerModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnMultiplayerCancelAllMatchmakingTicketsForPlayerRequestEvent; + public event PlayFabResultEvent OnMultiplayerCancelAllMatchmakingTicketsForPlayerResultEvent; + public event PlayFabRequestEvent OnMultiplayerCancelAllServerBackfillTicketsForPlayerRequestEvent; + public event PlayFabResultEvent OnMultiplayerCancelAllServerBackfillTicketsForPlayerResultEvent; + public event PlayFabRequestEvent OnMultiplayerCancelMatchmakingTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerCancelMatchmakingTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerCancelServerBackfillTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerCancelServerBackfillTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateBuildAliasRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateBuildAliasResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateBuildWithCustomContainerRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateBuildWithCustomContainerResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateBuildWithManagedContainerRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateBuildWithManagedContainerResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateBuildWithProcessBasedServerRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateBuildWithProcessBasedServerResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateMatchmakingTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateMatchmakingTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateRemoteUserRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateRemoteUserResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateServerBackfillTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateServerBackfillTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateServerMatchmakingTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateServerMatchmakingTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerCreateTitleMultiplayerServersQuotaChangeRequestEvent; + public event PlayFabResultEvent OnMultiplayerCreateTitleMultiplayerServersQuotaChangeResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteAssetRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteAssetResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteBuildRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteBuildResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteBuildAliasRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteBuildAliasResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteBuildRegionRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteBuildRegionResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteCertificateRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteCertificateResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteContainerImageRepositoryRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteContainerImageRepositoryResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteRemoteUserRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteRemoteUserResultEvent; + public event PlayFabRequestEvent OnMultiplayerDeleteSecretRequestEvent; + public event PlayFabResultEvent OnMultiplayerDeleteSecretResultEvent; + public event PlayFabRequestEvent OnMultiplayerEnableMultiplayerServersForTitleRequestEvent; + public event PlayFabResultEvent OnMultiplayerEnableMultiplayerServersForTitleResultEvent; + public event PlayFabRequestEvent OnMultiplayerFindFriendLobbiesRequestEvent; + public event PlayFabResultEvent OnMultiplayerFindFriendLobbiesResultEvent; + public event PlayFabRequestEvent OnMultiplayerFindLobbiesRequestEvent; + public event PlayFabResultEvent OnMultiplayerFindLobbiesResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetAssetDownloadUrlRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetAssetDownloadUrlResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetAssetUploadUrlRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetAssetUploadUrlResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetBuildRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetBuildResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetBuildAliasRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetBuildAliasResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetContainerRegistryCredentialsRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetContainerRegistryCredentialsResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetMatchRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetMatchResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetMatchmakingQueueRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetMatchmakingQueueResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetMatchmakingTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetMatchmakingTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetMultiplayerServerDetailsRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetMultiplayerServerDetailsResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetMultiplayerServerLogsRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetMultiplayerServerLogsResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetMultiplayerSessionLogsBySessionIdRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetMultiplayerSessionLogsBySessionIdResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetQueueStatisticsRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetQueueStatisticsResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetRemoteLoginEndpointRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetRemoteLoginEndpointResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetServerBackfillTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetServerBackfillTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetTitleEnabledForMultiplayerServersStatusRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetTitleEnabledForMultiplayerServersStatusResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetTitleMultiplayerServersQuotaChangeRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetTitleMultiplayerServersQuotaChangeResultEvent; + public event PlayFabRequestEvent OnMultiplayerGetTitleMultiplayerServersQuotasRequestEvent; + public event PlayFabResultEvent OnMultiplayerGetTitleMultiplayerServersQuotasResultEvent; + public event PlayFabRequestEvent OnMultiplayerInviteToLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerInviteToLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerJoinArrangedLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerJoinArrangedLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerJoinLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerJoinLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerJoinLobbyAsServerRequestEvent; + public event PlayFabResultEvent OnMultiplayerJoinLobbyAsServerResultEvent; + public event PlayFabRequestEvent OnMultiplayerJoinMatchmakingTicketRequestEvent; + public event PlayFabResultEvent OnMultiplayerJoinMatchmakingTicketResultEvent; + public event PlayFabRequestEvent OnMultiplayerLeaveLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerLeaveLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerLeaveLobbyAsServerRequestEvent; + public event PlayFabResultEvent OnMultiplayerLeaveLobbyAsServerResultEvent; + public event PlayFabRequestEvent OnMultiplayerListArchivedMultiplayerServersRequestEvent; + public event PlayFabResultEvent OnMultiplayerListArchivedMultiplayerServersResultEvent; + public event PlayFabRequestEvent OnMultiplayerListAssetSummariesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListAssetSummariesResultEvent; + public event PlayFabRequestEvent OnMultiplayerListBuildAliasesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListBuildAliasesResultEvent; + public event PlayFabRequestEvent OnMultiplayerListBuildSummariesV2RequestEvent; + public event PlayFabResultEvent OnMultiplayerListBuildSummariesV2ResultEvent; + public event PlayFabRequestEvent OnMultiplayerListCertificateSummariesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListCertificateSummariesResultEvent; + public event PlayFabRequestEvent OnMultiplayerListContainerImagesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListContainerImagesResultEvent; + public event PlayFabRequestEvent OnMultiplayerListContainerImageTagsRequestEvent; + public event PlayFabResultEvent OnMultiplayerListContainerImageTagsResultEvent; + public event PlayFabRequestEvent OnMultiplayerListMatchmakingQueuesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListMatchmakingQueuesResultEvent; + public event PlayFabRequestEvent OnMultiplayerListMatchmakingTicketsForPlayerRequestEvent; + public event PlayFabResultEvent OnMultiplayerListMatchmakingTicketsForPlayerResultEvent; + public event PlayFabRequestEvent OnMultiplayerListMultiplayerServersRequestEvent; + public event PlayFabResultEvent OnMultiplayerListMultiplayerServersResultEvent; + public event PlayFabRequestEvent OnMultiplayerListPartyQosServersRequestEvent; + public event PlayFabResultEvent OnMultiplayerListPartyQosServersResultEvent; + public event PlayFabRequestEvent OnMultiplayerListQosServersForTitleRequestEvent; + public event PlayFabResultEvent OnMultiplayerListQosServersForTitleResultEvent; + public event PlayFabRequestEvent OnMultiplayerListSecretSummariesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListSecretSummariesResultEvent; + public event PlayFabRequestEvent OnMultiplayerListServerBackfillTicketsForPlayerRequestEvent; + public event PlayFabResultEvent OnMultiplayerListServerBackfillTicketsForPlayerResultEvent; + public event PlayFabRequestEvent OnMultiplayerListTitleMultiplayerServersQuotaChangesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListTitleMultiplayerServersQuotaChangesResultEvent; + public event PlayFabRequestEvent OnMultiplayerListVirtualMachineSummariesRequestEvent; + public event PlayFabResultEvent OnMultiplayerListVirtualMachineSummariesResultEvent; + public event PlayFabRequestEvent OnMultiplayerRemoveMatchmakingQueueRequestEvent; + public event PlayFabResultEvent OnMultiplayerRemoveMatchmakingQueueResultEvent; + public event PlayFabRequestEvent OnMultiplayerRemoveMemberRequestEvent; + public event PlayFabResultEvent OnMultiplayerRemoveMemberResultEvent; + public event PlayFabRequestEvent OnMultiplayerRequestMultiplayerServerRequestEvent; + public event PlayFabResultEvent OnMultiplayerRequestMultiplayerServerResultEvent; + public event PlayFabRequestEvent OnMultiplayerRequestPartyServiceRequestEvent; + public event PlayFabResultEvent OnMultiplayerRequestPartyServiceResultEvent; + public event PlayFabRequestEvent OnMultiplayerRolloverContainerRegistryCredentialsRequestEvent; + public event PlayFabResultEvent OnMultiplayerRolloverContainerRegistryCredentialsResultEvent; + public event PlayFabRequestEvent OnMultiplayerSetMatchmakingQueueRequestEvent; + public event PlayFabResultEvent OnMultiplayerSetMatchmakingQueueResultEvent; + public event PlayFabRequestEvent OnMultiplayerShutdownMultiplayerServerRequestEvent; + public event PlayFabResultEvent OnMultiplayerShutdownMultiplayerServerResultEvent; + public event PlayFabRequestEvent OnMultiplayerSubscribeToLobbyResourceRequestEvent; + public event PlayFabResultEvent OnMultiplayerSubscribeToLobbyResourceResultEvent; + public event PlayFabRequestEvent OnMultiplayerSubscribeToMatchmakingResourceRequestEvent; + public event PlayFabResultEvent OnMultiplayerSubscribeToMatchmakingResourceResultEvent; + public event PlayFabRequestEvent OnMultiplayerUnsubscribeFromLobbyResourceRequestEvent; + public event PlayFabResultEvent OnMultiplayerUnsubscribeFromLobbyResourceResultEvent; + public event PlayFabRequestEvent OnMultiplayerUnsubscribeFromMatchmakingResourceRequestEvent; + public event PlayFabResultEvent OnMultiplayerUnsubscribeFromMatchmakingResourceResultEvent; + public event PlayFabRequestEvent OnMultiplayerUntagContainerImageRequestEvent; + public event PlayFabResultEvent OnMultiplayerUntagContainerImageResultEvent; + public event PlayFabRequestEvent OnMultiplayerUpdateBuildAliasRequestEvent; + public event PlayFabResultEvent OnMultiplayerUpdateBuildAliasResultEvent; + public event PlayFabRequestEvent OnMultiplayerUpdateBuildNameRequestEvent; + public event PlayFabResultEvent OnMultiplayerUpdateBuildNameResultEvent; + public event PlayFabRequestEvent OnMultiplayerUpdateBuildRegionRequestEvent; + public event PlayFabResultEvent OnMultiplayerUpdateBuildRegionResultEvent; + public event PlayFabRequestEvent OnMultiplayerUpdateBuildRegionsRequestEvent; + public event PlayFabResultEvent OnMultiplayerUpdateBuildRegionsResultEvent; + public event PlayFabRequestEvent OnMultiplayerUpdateLobbyRequestEvent; + public event PlayFabResultEvent OnMultiplayerUpdateLobbyResultEvent; + public event PlayFabRequestEvent OnMultiplayerUpdateLobbyAsServerRequestEvent; + public event PlayFabResultEvent OnMultiplayerUpdateLobbyAsServerResultEvent; + public event PlayFabRequestEvent OnMultiplayerUploadCertificateRequestEvent; + public event PlayFabResultEvent OnMultiplayerUploadCertificateResultEvent; + public event PlayFabRequestEvent OnMultiplayerUploadSecretRequestEvent; + public event PlayFabResultEvent OnMultiplayerUploadSecretResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Multiplayer/PlayFabEvents.cs.meta new file mode 100644 index 00000000..90c0c090 --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fe16c398171536247a7e4685790d4dac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerAPI.cs b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerAPI.cs new file mode 100644 index 00000000..fd344674 --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerAPI.cs @@ -0,0 +1,1183 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.MultiplayerModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// API methods for managing multiplayer servers. API methods for managing parties. The lobby service helps players group + /// together to play multiplayer games. It is often used as a rendezvous point for players to share connection information. + /// The TrueSkill service helps titles to estimate a player's skill based on their match results. The player skill values + /// from this service are commonly used by a matchmaking service to provide players with balanced matches. + /// + public static partial class PlayFabMultiplayerAPI + { + static PlayFabMultiplayerAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Cancel all active tickets the player is a member of in a given queue. + /// + public static void CancelAllMatchmakingTicketsForPlayer(CancelAllMatchmakingTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/CancelAllMatchmakingTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Cancel all active backfill tickets the player is a member of in a given queue. + /// + public static void CancelAllServerBackfillTicketsForPlayer(CancelAllServerBackfillTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/CancelAllServerBackfillTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Cancel a matchmaking ticket. + /// + public static void CancelMatchmakingTicket(CancelMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/CancelMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Cancel a server backfill ticket. + /// + public static void CancelServerBackfillTicket(CancelServerBackfillTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/CancelServerBackfillTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a multiplayer server build alias. + /// + public static void CreateBuildAlias(CreateBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a multiplayer server build with a custom container. + /// + public static void CreateBuildWithCustomContainer(CreateBuildWithCustomContainerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithCustomContainer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a multiplayer server build with a managed container. + /// + public static void CreateBuildWithManagedContainer(CreateBuildWithManagedContainerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithManagedContainer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a multiplayer server build with the server running as a process. + /// + public static void CreateBuildWithProcessBasedServer(CreateBuildWithProcessBasedServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithProcessBasedServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a lobby. + /// + public static void CreateLobby(CreateLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/CreateLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a matchmaking ticket as a client. + /// + public static void CreateMatchmakingTicket(CreateMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/CreateMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a remote user to log on to a VM for a multiplayer server build. + /// + public static void CreateRemoteUser(CreateRemoteUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateRemoteUser", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a backfill matchmaking ticket as a server. A backfill ticket represents an ongoing game. The matchmaking service + /// automatically starts matching the backfill ticket against other matchmaking tickets. Backfill tickets cannot match with + /// other backfill tickets. + /// + public static void CreateServerBackfillTicket(CreateServerBackfillTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/CreateServerBackfillTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a matchmaking ticket as a server. The matchmaking service automatically starts matching the ticket against other + /// matchmaking tickets. + /// + public static void CreateServerMatchmakingTicket(CreateServerMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/CreateServerMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a request to change a title's multiplayer server quotas. + /// + public static void CreateTitleMultiplayerServersQuotaChange(CreateTitleMultiplayerServersQuotaChangeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateTitleMultiplayerServersQuotaChange", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a multiplayer server game asset for a title. + /// + public static void DeleteAsset(DeleteAssetRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteAsset", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a multiplayer server build. + /// + public static void DeleteBuild(DeleteBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteBuild", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a multiplayer server build alias. + /// + public static void DeleteBuildAlias(DeleteBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a multiplayer server build's region. + /// + public static void DeleteBuildRegion(DeleteBuildRegionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteBuildRegion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a multiplayer server game certificate. + /// + public static void DeleteCertificate(DeleteCertificateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteCertificate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a container image repository. + /// + public static void DeleteContainerImageRepository(DeleteContainerImageRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteContainerImageRepository", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete a lobby. + /// + public static void DeleteLobby(DeleteLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/DeleteLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a remote user to log on to a VM for a multiplayer server build. + /// + public static void DeleteRemoteUser(DeleteRemoteUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteRemoteUser", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a multiplayer server game secret. + /// + public static void DeleteSecret(DeleteSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteSecret", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Enables the multiplayer server feature for a title. + /// + public static void EnableMultiplayerServersForTitle(EnableMultiplayerServersForTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/EnableMultiplayerServersForTitle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Find lobbies which match certain criteria, and which friends are in. + /// + public static void FindFriendLobbies(FindFriendLobbiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/FindFriendLobbies", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Find all the lobbies that match certain criteria. + /// + public static void FindLobbies(FindLobbiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/FindLobbies", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a URL that can be used to download the specified asset. A sample pre-authenticated url - + /// https://sampleStorageAccount.blob.core.windows.net/gameassets/gameserver.zip?sv=2015-04-05&ss=b&srt=sco&sp=rw&st=startDate&se=endDate&spr=https&sig=sampleSig&api-version=2017-07-29 + /// + public static void GetAssetDownloadUrl(GetAssetDownloadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetAssetDownloadUrl", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the URL to upload assets to. A sample pre-authenticated url - + /// https://sampleStorageAccount.blob.core.windows.net/gameassets/gameserver.zip?sv=2015-04-05&ss=b&srt=sco&sp=rw&st=startDate&se=endDate&spr=https&sig=sampleSig&api-version=2017-07-29 + /// + public static void GetAssetUploadUrl(GetAssetUploadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetAssetUploadUrl", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a multiplayer server build. + /// + public static void GetBuild(GetBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetBuild", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a multiplayer server build alias. + /// + public static void GetBuildAlias(GetBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the credentials to the container registry. + /// + public static void GetContainerRegistryCredentials(GetContainerRegistryCredentialsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetContainerRegistryCredentials", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get a lobby. + /// + public static void GetLobby(GetLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/GetLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get a match. + /// + public static void GetMatch(GetMatchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/GetMatch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// SDK support is limited to C# and Java for this API. Get a matchmaking queue configuration. + /// + public static void GetMatchmakingQueue(GetMatchmakingQueueRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/GetMatchmakingQueue", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get a matchmaking ticket by ticket Id. + /// + public static void GetMatchmakingTicket(GetMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/GetMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets multiplayer server session details for a build. + /// + public static void GetMultiplayerServerDetails(GetMultiplayerServerDetailsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetMultiplayerServerDetails", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets multiplayer server logs after a server has terminated. + /// + public static void GetMultiplayerServerLogs(GetMultiplayerServerLogsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetMultiplayerServerLogs", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets multiplayer server logs after a server has terminated. + /// + public static void GetMultiplayerSessionLogsBySessionId(GetMultiplayerSessionLogsBySessionIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetMultiplayerSessionLogsBySessionId", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the statistics for a queue. + /// + public static void GetQueueStatistics(GetQueueStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/GetQueueStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a remote login endpoint to a VM that is hosting a multiplayer server build. + /// + public static void GetRemoteLoginEndpoint(GetRemoteLoginEndpointRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetRemoteLoginEndpoint", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get a matchmaking backfill ticket by ticket Id. + /// + public static void GetServerBackfillTicket(GetServerBackfillTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/GetServerBackfillTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the status of whether a title is enabled for the multiplayer server feature. + /// + public static void GetTitleEnabledForMultiplayerServersStatus(GetTitleEnabledForMultiplayerServersStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetTitleEnabledForMultiplayerServersStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets a title's server quota change request. + /// + public static void GetTitleMultiplayerServersQuotaChange(GetTitleMultiplayerServersQuotaChangeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetTitleMultiplayerServersQuotaChange", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the quotas for a title in relation to multiplayer servers. + /// + public static void GetTitleMultiplayerServersQuotas(GetTitleMultiplayerServersQuotasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetTitleMultiplayerServersQuotas", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Send a notification to invite a player to a lobby. + /// + public static void InviteToLobby(InviteToLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/InviteToLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Join an Arranged lobby. + /// + public static void JoinArrangedLobby(JoinArrangedLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/JoinArrangedLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Join a lobby. + /// + public static void JoinLobby(JoinLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/JoinLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections. + /// + public static void JoinLobbyAsServer(JoinLobbyAsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/JoinLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Join a matchmaking ticket. + /// + public static void JoinMatchmakingTicket(JoinMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/JoinMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Leave a lobby. + /// + public static void LeaveLobby(LeaveLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/LeaveLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Preview: Request for server to leave a lobby. This is restricted to client owned lobbies which are using connections. + /// + public static void LeaveLobbyAsServer(LeaveLobbyAsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/LeaveLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists archived multiplayer server sessions for a build. + /// + public static void ListArchivedMultiplayerServers(ListMultiplayerServersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListArchivedMultiplayerServers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists multiplayer server game assets for a title. + /// + public static void ListAssetSummaries(ListAssetSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListAssetSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists details of all build aliases for a title. Accepts tokens for title and if game client access is enabled, allows + /// game client to request list of builds with player entity token. + /// + public static void ListBuildAliases(ListBuildAliasesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListBuildAliases", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists summarized details of all multiplayer server builds for a title. Accepts tokens for title and if game client + /// access is enabled, allows game client to request list of builds with player entity token. + /// + public static void ListBuildSummariesV2(ListBuildSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListBuildSummariesV2", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists multiplayer server game certificates for a title. + /// + public static void ListCertificateSummaries(ListCertificateSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListCertificateSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists custom container images for a title. + /// + public static void ListContainerImages(ListContainerImagesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListContainerImages", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists the tags for a custom container image. + /// + public static void ListContainerImageTags(ListContainerImageTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListContainerImageTags", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// SDK support is limited to C# and Java for this API. List all matchmaking queue configs. + /// + public static void ListMatchmakingQueues(ListMatchmakingQueuesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/ListMatchmakingQueues", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all matchmaking ticket Ids the user is a member of. + /// + public static void ListMatchmakingTicketsForPlayer(ListMatchmakingTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/ListMatchmakingTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists multiplayer server sessions for a build. + /// + public static void ListMultiplayerServers(ListMultiplayerServersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListMultiplayerServers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists quality of service servers for party. + /// + public static void ListPartyQosServers(ListPartyQosServersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListPartyQosServers", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists quality of service servers for the title. By default, servers are only returned for regions where a Multiplayer + /// Servers build has been deployed. + /// + public static void ListQosServersForTitle(ListQosServersForTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListQosServersForTitle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists multiplayer server game secrets for a title. + /// + public static void ListSecretSummaries(ListSecretSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListSecretSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all server backfill ticket Ids the user is a member of. + /// + public static void ListServerBackfillTicketsForPlayer(ListServerBackfillTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/ListServerBackfillTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all server quota change requests for a title. + /// + public static void ListTitleMultiplayerServersQuotaChanges(ListTitleMultiplayerServersQuotaChangesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListTitleMultiplayerServersQuotaChanges", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists virtual machines for a title. + /// + public static void ListVirtualMachineSummaries(ListVirtualMachineSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListVirtualMachineSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// SDK support is limited to C# and Java for this API. Remove a matchmaking queue config. + /// + public static void RemoveMatchmakingQueue(RemoveMatchmakingQueueRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/RemoveMatchmakingQueue", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Remove a member from a lobby. + /// + public static void RemoveMember(RemoveMemberFromLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/RemoveMember", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Request a multiplayer server session. Accepts tokens for title and if game client access is enabled, allows game client + /// to request a server with player entity token. + /// + public static void RequestMultiplayerServer(RequestMultiplayerServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/RequestMultiplayerServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Request a party session. + /// + public static void RequestPartyService(RequestPartyServiceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Party/RequestPartyService", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Rolls over the credentials to the container registry. + /// + public static void RolloverContainerRegistryCredentials(RolloverContainerRegistryCredentialsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/RolloverContainerRegistryCredentials", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// SDK support is limited to C# and Java for this API. Create or update a matchmaking queue configuration. + /// + public static void SetMatchmakingQueue(SetMatchmakingQueueRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/SetMatchmakingQueue", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Shuts down a multiplayer server session. + /// + public static void ShutdownMultiplayerServer(ShutdownMultiplayerServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/ShutdownMultiplayerServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Subscribe to lobby resource notifications. + /// + public static void SubscribeToLobbyResource(SubscribeToLobbyResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/SubscribeToLobbyResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Subscribe to match resource notifications. + /// + public static void SubscribeToMatchmakingResource(SubscribeToMatchResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/SubscribeToMatchmakingResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unsubscribe from lobby notifications. + /// + public static void UnsubscribeFromLobbyResource(UnsubscribeFromLobbyResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/UnsubscribeFromLobbyResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unsubscribe from match resource notifications. + /// + public static void UnsubscribeFromMatchmakingResource(UnsubscribeFromMatchResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Match/UnsubscribeFromMatchmakingResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Untags a container image. + /// + public static void UntagContainerImage(UntagContainerImageRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/UntagContainerImage", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Creates a multiplayer server build alias. + /// + public static void UpdateBuildAlias(UpdateBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates a multiplayer server build's name. + /// + public static void UpdateBuildName(UpdateBuildNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildName", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates a multiplayer server build's region. If the region is not yet created, it will be created + /// + public static void UpdateBuildRegion(UpdateBuildRegionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildRegion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates a multiplayer server build's regions. + /// + public static void UpdateBuildRegions(UpdateBuildRegionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildRegions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update a lobby. + /// + public static void UpdateLobby(UpdateLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/UpdateLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring + /// by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect + /// behavior. + /// + public static void UpdateLobbyAsServer(UpdateLobbyAsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Lobby/UpdateLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Uploads a multiplayer server game certificate. + /// + public static void UploadCertificate(UploadCertificateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/UploadCertificate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Uploads a multiplayer server game secret. + /// + public static void UploadSecret(UploadSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/MultiplayerServer/UploadSecret", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerAPI.cs.meta b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerAPI.cs.meta new file mode 100644 index 00000000..d022d5dc --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a5dd863da40a92a46b55d58a56b8db93 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerInstanceAPI.cs b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerInstanceAPI.cs new file mode 100644 index 00000000..9d6c5519 --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerInstanceAPI.cs @@ -0,0 +1,1027 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.MultiplayerModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// API methods for managing multiplayer servers. API methods for managing parties. The lobby service helps players group + /// together to play multiplayer games. It is often used as a rendezvous point for players to share connection information. + /// The TrueSkill service helps titles to estimate a player's skill based on their match results. The player skill values + /// from this service are commonly used by a matchmaking service to provide players with balanced matches. + /// + public partial class PlayFabMultiplayerInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabMultiplayerInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabMultiplayerInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Cancel all active tickets the player is a member of in a given queue. + /// + public void CancelAllMatchmakingTicketsForPlayer(CancelAllMatchmakingTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/CancelAllMatchmakingTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Cancel all active backfill tickets the player is a member of in a given queue. + /// + public void CancelAllServerBackfillTicketsForPlayer(CancelAllServerBackfillTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/CancelAllServerBackfillTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Cancel a matchmaking ticket. + /// + public void CancelMatchmakingTicket(CancelMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/CancelMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Cancel a server backfill ticket. + /// + public void CancelServerBackfillTicket(CancelServerBackfillTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/CancelServerBackfillTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a multiplayer server build alias. + /// + public void CreateBuildAlias(CreateBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a multiplayer server build with a custom container. + /// + public void CreateBuildWithCustomContainer(CreateBuildWithCustomContainerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithCustomContainer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a multiplayer server build with a managed container. + /// + public void CreateBuildWithManagedContainer(CreateBuildWithManagedContainerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithManagedContainer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a multiplayer server build with the server running as a process. + /// + public void CreateBuildWithProcessBasedServer(CreateBuildWithProcessBasedServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithProcessBasedServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a lobby. + /// + public void CreateLobby(CreateLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/CreateLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a matchmaking ticket as a client. + /// + public void CreateMatchmakingTicket(CreateMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/CreateMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a remote user to log on to a VM for a multiplayer server build. + /// + public void CreateRemoteUser(CreateRemoteUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateRemoteUser", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a backfill matchmaking ticket as a server. A backfill ticket represents an ongoing game. The matchmaking service + /// automatically starts matching the backfill ticket against other matchmaking tickets. Backfill tickets cannot match with + /// other backfill tickets. + /// + public void CreateServerBackfillTicket(CreateServerBackfillTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/CreateServerBackfillTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a matchmaking ticket as a server. The matchmaking service automatically starts matching the ticket against other + /// matchmaking tickets. + /// + public void CreateServerMatchmakingTicket(CreateServerMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/CreateServerMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a request to change a title's multiplayer server quotas. + /// + public void CreateTitleMultiplayerServersQuotaChange(CreateTitleMultiplayerServersQuotaChangeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateTitleMultiplayerServersQuotaChange", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a multiplayer server game asset for a title. + /// + public void DeleteAsset(DeleteAssetRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteAsset", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a multiplayer server build. + /// + public void DeleteBuild(DeleteBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteBuild", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a multiplayer server build alias. + /// + public void DeleteBuildAlias(DeleteBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a multiplayer server build's region. + /// + public void DeleteBuildRegion(DeleteBuildRegionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteBuildRegion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a multiplayer server game certificate. + /// + public void DeleteCertificate(DeleteCertificateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteCertificate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a container image repository. + /// + public void DeleteContainerImageRepository(DeleteContainerImageRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteContainerImageRepository", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete a lobby. + /// + public void DeleteLobby(DeleteLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/DeleteLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a remote user to log on to a VM for a multiplayer server build. + /// + public void DeleteRemoteUser(DeleteRemoteUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteRemoteUser", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a multiplayer server game secret. + /// + public void DeleteSecret(DeleteSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/DeleteSecret", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Enables the multiplayer server feature for a title. + /// + public void EnableMultiplayerServersForTitle(EnableMultiplayerServersForTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/EnableMultiplayerServersForTitle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Find lobbies which match certain criteria, and which friends are in. + /// + public void FindFriendLobbies(FindFriendLobbiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/FindFriendLobbies", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Find all the lobbies that match certain criteria. + /// + public void FindLobbies(FindLobbiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/FindLobbies", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a URL that can be used to download the specified asset. A sample pre-authenticated url - + /// https://sampleStorageAccount.blob.core.windows.net/gameassets/gameserver.zip?sv=2015-04-05&ss=b&srt=sco&sp=rw&st=startDate&se=endDate&spr=https&sig=sampleSig&api-version=2017-07-29 + /// + public void GetAssetDownloadUrl(GetAssetDownloadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetAssetDownloadUrl", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the URL to upload assets to. A sample pre-authenticated url - + /// https://sampleStorageAccount.blob.core.windows.net/gameassets/gameserver.zip?sv=2015-04-05&ss=b&srt=sco&sp=rw&st=startDate&se=endDate&spr=https&sig=sampleSig&api-version=2017-07-29 + /// + public void GetAssetUploadUrl(GetAssetUploadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetAssetUploadUrl", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a multiplayer server build. + /// + public void GetBuild(GetBuildRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetBuild", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a multiplayer server build alias. + /// + public void GetBuildAlias(GetBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the credentials to the container registry. + /// + public void GetContainerRegistryCredentials(GetContainerRegistryCredentialsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetContainerRegistryCredentials", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get a lobby. + /// + public void GetLobby(GetLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/GetLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get a match. + /// + public void GetMatch(GetMatchRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/GetMatch", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// SDK support is limited to C# and Java for this API. Get a matchmaking queue configuration. + /// + public void GetMatchmakingQueue(GetMatchmakingQueueRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/GetMatchmakingQueue", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get a matchmaking ticket by ticket Id. + /// + public void GetMatchmakingTicket(GetMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/GetMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets multiplayer server session details for a build. + /// + public void GetMultiplayerServerDetails(GetMultiplayerServerDetailsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetMultiplayerServerDetails", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets multiplayer server logs after a server has terminated. + /// + public void GetMultiplayerServerLogs(GetMultiplayerServerLogsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetMultiplayerServerLogs", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets multiplayer server logs after a server has terminated. + /// + public void GetMultiplayerSessionLogsBySessionId(GetMultiplayerSessionLogsBySessionIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetMultiplayerSessionLogsBySessionId", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the statistics for a queue. + /// + public void GetQueueStatistics(GetQueueStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/GetQueueStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a remote login endpoint to a VM that is hosting a multiplayer server build. + /// + public void GetRemoteLoginEndpoint(GetRemoteLoginEndpointRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetRemoteLoginEndpoint", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get a matchmaking backfill ticket by ticket Id. + /// + public void GetServerBackfillTicket(GetServerBackfillTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/GetServerBackfillTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the status of whether a title is enabled for the multiplayer server feature. + /// + public void GetTitleEnabledForMultiplayerServersStatus(GetTitleEnabledForMultiplayerServersStatusRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetTitleEnabledForMultiplayerServersStatus", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets a title's server quota change request. + /// + public void GetTitleMultiplayerServersQuotaChange(GetTitleMultiplayerServersQuotaChangeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetTitleMultiplayerServersQuotaChange", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the quotas for a title in relation to multiplayer servers. + /// + public void GetTitleMultiplayerServersQuotas(GetTitleMultiplayerServersQuotasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/GetTitleMultiplayerServersQuotas", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Send a notification to invite a player to a lobby. + /// + public void InviteToLobby(InviteToLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/InviteToLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Join an Arranged lobby. + /// + public void JoinArrangedLobby(JoinArrangedLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/JoinArrangedLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Join a lobby. + /// + public void JoinLobby(JoinLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/JoinLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections. + /// + public void JoinLobbyAsServer(JoinLobbyAsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/JoinLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Join a matchmaking ticket. + /// + public void JoinMatchmakingTicket(JoinMatchmakingTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/JoinMatchmakingTicket", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Leave a lobby. + /// + public void LeaveLobby(LeaveLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/LeaveLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Preview: Request for server to leave a lobby. This is restricted to client owned lobbies which are using connections. + /// + public void LeaveLobbyAsServer(LeaveLobbyAsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/LeaveLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists archived multiplayer server sessions for a build. + /// + public void ListArchivedMultiplayerServers(ListMultiplayerServersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListArchivedMultiplayerServers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists multiplayer server game assets for a title. + /// + public void ListAssetSummaries(ListAssetSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListAssetSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists details of all build aliases for a title. Accepts tokens for title and if game client access is enabled, allows + /// game client to request list of builds with player entity token. + /// + public void ListBuildAliases(ListBuildAliasesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListBuildAliases", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists summarized details of all multiplayer server builds for a title. Accepts tokens for title and if game client + /// access is enabled, allows game client to request list of builds with player entity token. + /// + public void ListBuildSummariesV2(ListBuildSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListBuildSummariesV2", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists multiplayer server game certificates for a title. + /// + public void ListCertificateSummaries(ListCertificateSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListCertificateSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists custom container images for a title. + /// + public void ListContainerImages(ListContainerImagesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListContainerImages", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists the tags for a custom container image. + /// + public void ListContainerImageTags(ListContainerImageTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListContainerImageTags", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// SDK support is limited to C# and Java for this API. List all matchmaking queue configs. + /// + public void ListMatchmakingQueues(ListMatchmakingQueuesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/ListMatchmakingQueues", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all matchmaking ticket Ids the user is a member of. + /// + public void ListMatchmakingTicketsForPlayer(ListMatchmakingTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/ListMatchmakingTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists multiplayer server sessions for a build. + /// + public void ListMultiplayerServers(ListMultiplayerServersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListMultiplayerServers", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists quality of service servers for party. + /// + public void ListPartyQosServers(ListPartyQosServersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListPartyQosServers", request, AuthType.None, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists quality of service servers for the title. By default, servers are only returned for regions where a Multiplayer + /// Servers build has been deployed. + /// + public void ListQosServersForTitle(ListQosServersForTitleRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListQosServersForTitle", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists multiplayer server game secrets for a title. + /// + public void ListSecretSummaries(ListSecretSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListSecretSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all server backfill ticket Ids the user is a member of. + /// + public void ListServerBackfillTicketsForPlayer(ListServerBackfillTicketsForPlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/ListServerBackfillTicketsForPlayer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all server quota change requests for a title. + /// + public void ListTitleMultiplayerServersQuotaChanges(ListTitleMultiplayerServersQuotaChangesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListTitleMultiplayerServersQuotaChanges", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists virtual machines for a title. + /// + public void ListVirtualMachineSummaries(ListVirtualMachineSummariesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ListVirtualMachineSummaries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// SDK support is limited to C# and Java for this API. Remove a matchmaking queue config. + /// + public void RemoveMatchmakingQueue(RemoveMatchmakingQueueRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/RemoveMatchmakingQueue", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Remove a member from a lobby. + /// + public void RemoveMember(RemoveMemberFromLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/RemoveMember", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Request a multiplayer server session. Accepts tokens for title and if game client access is enabled, allows game client + /// to request a server with player entity token. + /// + public void RequestMultiplayerServer(RequestMultiplayerServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/RequestMultiplayerServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Request a party session. + /// + public void RequestPartyService(RequestPartyServiceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Party/RequestPartyService", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Rolls over the credentials to the container registry. + /// + public void RolloverContainerRegistryCredentials(RolloverContainerRegistryCredentialsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/RolloverContainerRegistryCredentials", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// SDK support is limited to C# and Java for this API. Create or update a matchmaking queue configuration. + /// + public void SetMatchmakingQueue(SetMatchmakingQueueRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/SetMatchmakingQueue", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Shuts down a multiplayer server session. + /// + public void ShutdownMultiplayerServer(ShutdownMultiplayerServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/ShutdownMultiplayerServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Subscribe to lobby resource notifications. + /// + public void SubscribeToLobbyResource(SubscribeToLobbyResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/SubscribeToLobbyResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Subscribe to match resource notifications. + /// + public void SubscribeToMatchmakingResource(SubscribeToMatchResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/SubscribeToMatchmakingResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unsubscribe from lobby notifications. + /// + public void UnsubscribeFromLobbyResource(UnsubscribeFromLobbyResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/UnsubscribeFromLobbyResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unsubscribe from match resource notifications. + /// + public void UnsubscribeFromMatchmakingResource(UnsubscribeFromMatchResourceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Match/UnsubscribeFromMatchmakingResource", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Untags a container image. + /// + public void UntagContainerImage(UntagContainerImageRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/UntagContainerImage", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Creates a multiplayer server build alias. + /// + public void UpdateBuildAlias(UpdateBuildAliasRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildAlias", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates a multiplayer server build's name. + /// + public void UpdateBuildName(UpdateBuildNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildName", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates a multiplayer server build's region. If the region is not yet created, it will be created + /// + public void UpdateBuildRegion(UpdateBuildRegionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildRegion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates a multiplayer server build's regions. + /// + public void UpdateBuildRegions(UpdateBuildRegionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/UpdateBuildRegions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update a lobby. + /// + public void UpdateLobby(UpdateLobbyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/UpdateLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring + /// by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect + /// behavior. + /// + public void UpdateLobbyAsServer(UpdateLobbyAsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Lobby/UpdateLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Uploads a multiplayer server game certificate. + /// + public void UploadCertificate(UploadCertificateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/UploadCertificate", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Uploads a multiplayer server game secret. + /// + public void UploadSecret(UploadSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/MultiplayerServer/UploadSecret", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerInstanceAPI.cs.meta b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerInstanceAPI.cs.meta new file mode 100644 index 00000000..0d3c42fa --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a4dbb109fa8001b4b9fa53260ba50cf8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerModels.cs b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerModels.cs new file mode 100644 index 00000000..aae42535 --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerModels.cs @@ -0,0 +1,5357 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.MultiplayerModels +{ + public enum AccessPolicy + { + Public, + Friends, + Private + } + + [Serializable] + public class AssetReference : PlayFabBaseModel + { + /// + /// The asset's file name. This is a filename with the .zip, .tar, or .tar.gz extension. + /// + public string FileName; + /// + /// The asset's mount path. + /// + public string MountPath; + } + + [Serializable] + public class AssetReferenceParams : PlayFabBaseModel + { + /// + /// The asset's file name. + /// + public string FileName; + /// + /// The asset's mount path. + /// + public string MountPath; + } + + [Serializable] + public class AssetSummary : PlayFabBaseModel + { + /// + /// The asset's file name. This is a filename with the .zip, .tar, or .tar.gz extension. + /// + public string FileName; + /// + /// The metadata associated with the asset. + /// + public Dictionary Metadata; + } + + public enum AttributeMergeFunction + { + Min, + Max, + Average + } + + public enum AttributeNotSpecifiedBehavior + { + UseDefault, + MatchAny + } + + public enum AttributeSource + { + User, + PlayerEntity + } + + public enum AzureRegion + { + AustraliaEast, + AustraliaSoutheast, + BrazilSouth, + CentralUs, + EastAsia, + EastUs, + EastUs2, + JapanEast, + JapanWest, + NorthCentralUs, + NorthEurope, + SouthCentralUs, + SoutheastAsia, + WestEurope, + WestUs, + SouthAfricaNorth, + WestCentralUs, + KoreaCentral, + FranceCentral, + WestUs2, + CentralIndia, + UaeNorth, + UkSouth, + SwedenCentral + } + + public enum AzureVmFamily + { + A, + Av2, + Dv2, + Dv3, + F, + Fsv2, + Dasv4, + Dav4, + Dadsv5, + Eav4, + Easv4, + Ev4, + Esv4, + Dsv3, + Dsv2, + NCasT4_v3, + Ddv4, + Ddsv4, + HBv3, + Ddv5, + Ddsv5 + } + + public enum AzureVmSize + { + Standard_A1, + Standard_A2, + Standard_A3, + Standard_A4, + Standard_A1_v2, + Standard_A2_v2, + Standard_A4_v2, + Standard_A8_v2, + Standard_D1_v2, + Standard_D2_v2, + Standard_D3_v2, + Standard_D4_v2, + Standard_D5_v2, + Standard_D2_v3, + Standard_D4_v3, + Standard_D8_v3, + Standard_D16_v3, + Standard_F1, + Standard_F2, + Standard_F4, + Standard_F8, + Standard_F16, + Standard_F2s_v2, + Standard_F4s_v2, + Standard_F8s_v2, + Standard_F16s_v2, + Standard_D2as_v4, + Standard_D4as_v4, + Standard_D8as_v4, + Standard_D16as_v4, + Standard_D2a_v4, + Standard_D4a_v4, + Standard_D8a_v4, + Standard_D16a_v4, + Standard_D2ads_v5, + Standard_D4ads_v5, + Standard_D8ads_v5, + Standard_D16ads_v5, + Standard_E2a_v4, + Standard_E4a_v4, + Standard_E8a_v4, + Standard_E16a_v4, + Standard_E2as_v4, + Standard_E4as_v4, + Standard_E8as_v4, + Standard_E16as_v4, + Standard_D2s_v3, + Standard_D4s_v3, + Standard_D8s_v3, + Standard_D16s_v3, + Standard_DS1_v2, + Standard_DS2_v2, + Standard_DS3_v2, + Standard_DS4_v2, + Standard_DS5_v2, + Standard_NC4as_T4_v3, + Standard_D2d_v4, + Standard_D4d_v4, + Standard_D8d_v4, + Standard_D16d_v4, + Standard_D2ds_v4, + Standard_D4ds_v4, + Standard_D8ds_v4, + Standard_D16ds_v4, + Standard_HB120_16rs_v3, + Standard_HB120_32rs_v3, + Standard_HB120_64rs_v3, + Standard_HB120_96rs_v3, + Standard_HB120rs_v3, + Standard_D2d_v5, + Standard_D4d_v5, + Standard_D8d_v5, + Standard_D16d_v5, + Standard_D32d_v5, + Standard_D2ds_v5, + Standard_D4ds_v5, + Standard_D8ds_v5, + Standard_D16ds_v5, + Standard_D32ds_v5 + } + + [Serializable] + public class BuildAliasDetailsResponse : PlayFabResultCommon + { + /// + /// The guid string alias Id of the alias to be created or updated. + /// + public string AliasId; + /// + /// The alias name. + /// + public string AliasName; + /// + /// Array of build selection criteria. + /// + public List BuildSelectionCriteria; + } + + [Serializable] + public class BuildAliasParams : PlayFabBaseModel + { + /// + /// The guid string alias ID to use for the request. + /// + public string AliasId; + } + + [Serializable] + public class BuildRegion : PlayFabBaseModel + { + /// + /// The current multiplayer server stats for the region. + /// + public CurrentServerStats CurrentServerStats; + /// + /// Optional settings to control dynamic adjustment of standby target + /// + public DynamicStandbySettings DynamicStandbySettings; + /// + /// Whether the game assets provided for the build have been replicated to this region. + /// + public bool IsAssetReplicationComplete; + /// + /// The maximum number of multiplayer servers for the region. + /// + public int MaxServers; + /// + /// Regional override for the number of multiplayer servers to host on a single VM of the build. + /// + public int? MultiplayerServerCountPerVm; + /// + /// The build region. + /// + public string Region; + /// + /// Optional settings to set the standby target to specified values during the supplied schedules + /// + public ScheduledStandbySettings ScheduledStandbySettings; + /// + /// The target number of standby multiplayer servers for the region. + /// + public int StandbyServers; + /// + /// The status of multiplayer servers in the build region. Valid values are - Unknown, Initialized, Deploying, Deployed, + /// Unhealthy, Deleting, Deleted. + /// + public string Status; + /// + /// Regional override for the VM size the build was created on. + /// + public AzureVmSize? VmSize; + } + + [Serializable] + public class BuildRegionParams : PlayFabBaseModel + { + /// + /// Optional settings to control dynamic adjustment of standby target. If not specified, dynamic standby is disabled + /// + public DynamicStandbySettings DynamicStandbySettings; + /// + /// The maximum number of multiplayer servers for the region. + /// + public int MaxServers; + /// + /// Regional override for the number of multiplayer servers to host on a single VM of the build. + /// + public int? MultiplayerServerCountPerVm; + /// + /// The build region. + /// + public string Region; + /// + /// Optional settings to set the standby target to specified values during the supplied schedules + /// + public ScheduledStandbySettings ScheduledStandbySettings; + /// + /// The number of standby multiplayer servers for the region. + /// + public int StandbyServers; + /// + /// Regional override for the VM size the build was created on. + /// + public AzureVmSize? VmSize; + } + + [Serializable] + public class BuildSelectionCriterion : PlayFabBaseModel + { + /// + /// Dictionary of build ids and their respective weights for distribution of allocation requests. + /// + public Dictionary BuildWeightDistribution; + } + + [Serializable] + public class BuildSummary : PlayFabBaseModel + { + /// + /// The guid string build ID of the build. + /// + public string BuildId; + /// + /// The build name. + /// + public string BuildName; + /// + /// The time the build was created in UTC. + /// + public DateTime? CreationTime; + /// + /// The metadata of the build. + /// + public Dictionary Metadata; + /// + /// The configuration and status for each region in the build. + /// + public List RegionConfigurations; + } + + /// + /// Cancels all tickets of which the player is a member in a given queue that are not cancelled or matched. This API is + /// useful if you lose track of what tickets the player is a member of (if the title crashes for instance) and want to + /// "reset". The Entity field is optional if the caller is a player and defaults to that player. Players may not cancel + /// tickets for other people. The Entity field is required if the caller is a server (authenticated as the title). + /// + [Serializable] + public class CancelAllMatchmakingTicketsForPlayerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity key of the player whose tickets should be canceled. + /// + public EntityKey Entity; + /// + /// The name of the queue from which a player's tickets should be canceled. + /// + public string QueueName; + } + + [Serializable] + public class CancelAllMatchmakingTicketsForPlayerResult : PlayFabResultCommon + { + } + + /// + /// Cancels all backfill tickets of which the player is a member in a given queue that are not cancelled or matched. This + /// API is useful if you lose track of what tickets the player is a member of (if the server crashes for instance) and want + /// to "reset". + /// + [Serializable] + public class CancelAllServerBackfillTicketsForPlayerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity key of the player whose backfill tickets should be canceled. + /// + public EntityKey Entity; + /// + /// The name of the queue from which a player's backfill tickets should be canceled. + /// + public string QueueName; + } + + [Serializable] + public class CancelAllServerBackfillTicketsForPlayerResult : PlayFabResultCommon + { + } + + public enum CancellationReason + { + Requested, + Internal, + Timeout + } + + /// + /// Only servers and ticket members can cancel a ticket. The ticket can be in five different states when it is cancelled. 1: + /// the ticket is waiting for members to join it, and it has not started matching. If the ticket is cancelled at this stage, + /// it will never match. 2: the ticket is matching. If the ticket is cancelled, it will stop matching. 3: the ticket is + /// matched. A matched ticket cannot be cancelled. 4: the ticket is already cancelled and nothing happens. 5: the ticket is + /// waiting for a server. If the ticket is cancelled, server allocation will be stopped. A server may still be allocated due + /// to a race condition, but that will not be reflected in the ticket. There may be race conditions between the ticket + /// getting matched and the client making a cancellation request. The client must handle the possibility that the cancel + /// request fails if a match is found before the cancellation request is processed. We do not allow resubmitting a cancelled + /// ticket because players must consent to enter matchmaking again. Create a new ticket instead. + /// + [Serializable] + public class CancelMatchmakingTicketRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the queue the ticket is in. + /// + public string QueueName; + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + [Serializable] + public class CancelMatchmakingTicketResult : PlayFabResultCommon + { + } + + /// + /// Only servers can cancel a backfill ticket. The ticket can be in three different states when it is cancelled. 1: the + /// ticket is matching. If the ticket is cancelled, it will stop matching. 2: the ticket is matched. A matched ticket cannot + /// be cancelled. 3: the ticket is already cancelled and nothing happens. There may be race conditions between the ticket + /// getting matched and the server making a cancellation request. The server must handle the possibility that the cancel + /// request fails if a match is found before the cancellation request is processed. We do not allow resubmitting a cancelled + /// ticket. Create a new ticket instead. + /// + [Serializable] + public class CancelServerBackfillTicketRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the queue the ticket is in. + /// + public string QueueName; + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + [Serializable] + public class CancelServerBackfillTicketResult : PlayFabResultCommon + { + } + + [Serializable] + public class Certificate : PlayFabBaseModel + { + /// + /// Base64 encoded string contents of the certificate. + /// + public string Base64EncodedValue; + /// + /// A name for the certificate. This is used to reference certificates in build configurations. + /// + public string Name; + /// + /// If required for your PFX certificate, use this field to provide a password that will be used to install the certificate + /// on the container. + /// + public string Password; + } + + [Serializable] + public class CertificateSummary : PlayFabBaseModel + { + /// + /// The name of the certificate. + /// + public string Name; + /// + /// The thumbprint for the certificate. + /// + public string Thumbprint; + } + + [Serializable] + public class ConnectedPlayer : PlayFabBaseModel + { + /// + /// The player ID of the player connected to the multiplayer server. + /// + public string PlayerId; + } + + public enum ContainerFlavor + { + ManagedWindowsServerCore, + CustomLinux, + ManagedWindowsServerCorePreview, + Invalid + } + + [Serializable] + public class ContainerImageReference : PlayFabBaseModel + { + /// + /// The container image name. + /// + public string ImageName; + /// + /// The container tag. + /// + public string Tag; + } + + [Serializable] + public class CoreCapacity : PlayFabBaseModel + { + /// + /// The available core capacity for the (Region, VmFamily) + /// + public int Available; + /// + /// The AzureRegion + /// + public string Region; + /// + /// The total core capacity for the (Region, VmFamily) + /// + public int Total; + /// + /// The AzureVmFamily + /// + public AzureVmFamily? VmFamily; + } + + [Serializable] + public class CoreCapacityChange : PlayFabBaseModel + { + /// + /// New quota core limit for the given vm family/region. + /// + public int NewCoreLimit; + /// + /// Region to change. + /// + public string Region; + /// + /// Virtual machine family to change. + /// + public AzureVmFamily VmFamily; + } + + /// + /// Creates a multiplayer server build alias and returns the created alias. + /// + [Serializable] + public class CreateBuildAliasRequest : PlayFabRequestCommon + { + /// + /// The alias name. + /// + public string AliasName; + /// + /// Array of build selection criteria. + /// + public List BuildSelectionCriteria; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Creates a multiplayer server build with a custom container and returns information about the build creation request. + /// + [Serializable] + public class CreateBuildWithCustomContainerRequest : PlayFabRequestCommon + { + /// + /// When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or + /// will have the same assets mounted in the container. + /// + public bool? AreAssetsReadonly; + /// + /// The build name. + /// + public string BuildName; + /// + /// The flavor of container to create a build from. + /// + public ContainerFlavor? ContainerFlavor; + /// + /// The container reference, consisting of the image name and tag. + /// + public ContainerImageReference ContainerImageReference; + /// + /// The container command to run when the multiplayer server has been allocated, including any arguments. + /// + public string ContainerRunCommand; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The list of game assets related to the build. + /// + public List GameAssetReferences; + /// + /// The game certificates for the build. + /// + public List GameCertificateReferences; + /// + /// The game secrets for the build. + /// + public List GameSecretReferences; + /// + /// The Linux instrumentation configuration for the build. + /// + public LinuxInstrumentationConfiguration LinuxInstrumentationConfiguration; + /// + /// Metadata to tag the build. The keys are case insensitive. The build metadata is made available to the server through + /// Game Server SDK (GSDK).Constraints: Maximum number of keys: 30, Maximum key length: 50, Maximum value length: 100 + /// + public Dictionary Metadata; + /// + /// The configuration for the monitoring application on the build + /// + public MonitoringApplicationConfigurationParams MonitoringApplicationConfiguration; + /// + /// The number of multiplayer servers to host on a single VM. + /// + public int MultiplayerServerCountPerVm; + /// + /// The ports to map the build on. + /// + public List Ports; + /// + /// The region configurations for the build. + /// + public List RegionConfigurations; + /// + /// The resource constraints to apply to each server on the VM (EXPERIMENTAL API) + /// + public ServerResourceConstraintParams ServerResourceConstraints; + /// + /// The VM size to create the build on. + /// + public AzureVmSize? VmSize; + /// + /// The configuration for the VmStartupScript for the build + /// + public VmStartupScriptParams VmStartupScriptConfiguration; + } + + [Serializable] + public class CreateBuildWithCustomContainerResponse : PlayFabResultCommon + { + /// + /// When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or + /// will have the same assets mounted in the container. + /// + public bool? AreAssetsReadonly; + /// + /// The guid string build ID. Must be unique for every build. + /// + public string BuildId; + /// + /// The build name. + /// + public string BuildName; + /// + /// The flavor of container of the build. + /// + public ContainerFlavor? ContainerFlavor; + /// + /// The container command to run when the multiplayer server has been allocated, including any arguments. + /// + public string ContainerRunCommand; + /// + /// The time the build was created in UTC. + /// + public DateTime? CreationTime; + /// + /// The custom game container image reference information. + /// + public ContainerImageReference CustomGameContainerImage; + /// + /// The game assets for the build. + /// + public List GameAssetReferences; + /// + /// The game certificates for the build. + /// + public List GameCertificateReferences; + /// + /// The game secrets for the build. + /// + public List GameSecretReferences; + /// + /// The Linux instrumentation configuration for this build. + /// + public LinuxInstrumentationConfiguration LinuxInstrumentationConfiguration; + /// + /// The metadata of the build. + /// + public Dictionary Metadata; + /// + /// The configuration for the monitoring application for the build + /// + public MonitoringApplicationConfiguration MonitoringApplicationConfiguration; + /// + /// The number of multiplayer servers to host on a single VM of the build. + /// + public int MultiplayerServerCountPerVm; + /// + /// The OS platform used for running the game process. + /// + public string OsPlatform; + /// + /// The ports the build is mapped on. + /// + public List Ports; + /// + /// The region configuration for the build. + /// + public List RegionConfigurations; + /// + /// The resource constraints to apply to each server on the VM (EXPERIMENTAL API) + /// + public ServerResourceConstraintParams ServerResourceConstraints; + /// + /// The type of game server being hosted. + /// + public string ServerType; + /// + /// When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to + /// disc. + /// + public bool? UseStreamingForAssetDownloads; + /// + /// The VM size the build was created on. + /// + public AzureVmSize? VmSize; + /// + /// The configuration for the VmStartupScript feature for the build + /// + public VmStartupScriptConfiguration VmStartupScriptConfiguration; + } + + /// + /// Creates a multiplayer server build with a managed container and returns information about the build creation request. + /// + [Serializable] + public class CreateBuildWithManagedContainerRequest : PlayFabRequestCommon + { + /// + /// When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or + /// will have the same assets mounted in the container. + /// + public bool? AreAssetsReadonly; + /// + /// The build name. + /// + public string BuildName; + /// + /// The flavor of container to create a build from. + /// + public ContainerFlavor? ContainerFlavor; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The list of game assets related to the build. + /// + public List GameAssetReferences; + /// + /// The game certificates for the build. + /// + public List GameCertificateReferences; + /// + /// The game secrets for the build. + /// + public List GameSecretReferences; + /// + /// The directory containing the game executable. This would be the start path of the game assets that contain the main game + /// server executable. If not provided, a best effort will be made to extract it from the start game command. + /// + public string GameWorkingDirectory; + /// + /// The instrumentation configuration for the build. + /// + public InstrumentationConfiguration InstrumentationConfiguration; + /// + /// Metadata to tag the build. The keys are case insensitive. The build metadata is made available to the server through + /// Game Server SDK (GSDK).Constraints: Maximum number of keys: 30, Maximum key length: 50, Maximum value length: 100 + /// + public Dictionary Metadata; + /// + /// The configuration for the monitoring application on the build + /// + public MonitoringApplicationConfigurationParams MonitoringApplicationConfiguration; + /// + /// The number of multiplayer servers to host on a single VM. + /// + public int MultiplayerServerCountPerVm; + /// + /// The ports to map the build on. + /// + public List Ports; + /// + /// The region configurations for the build. + /// + public List RegionConfigurations; + /// + /// The resource constraints to apply to each server on the VM (EXPERIMENTAL API) + /// + public ServerResourceConstraintParams ServerResourceConstraints; + /// + /// The command to run when the multiplayer server is started, including any arguments. + /// + public string StartMultiplayerServerCommand; + /// + /// The VM size to create the build on. + /// + public AzureVmSize? VmSize; + /// + /// The configuration for the VmStartupScript for the build + /// + public VmStartupScriptParams VmStartupScriptConfiguration; + /// + /// The crash dump configuration for the build. + /// + public WindowsCrashDumpConfiguration WindowsCrashDumpConfiguration; + } + + [Serializable] + public class CreateBuildWithManagedContainerResponse : PlayFabResultCommon + { + /// + /// When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or + /// will have the same assets mounted in the container. + /// + public bool? AreAssetsReadonly; + /// + /// The guid string build ID. Must be unique for every build. + /// + public string BuildId; + /// + /// The build name. + /// + public string BuildName; + /// + /// The flavor of container of the build. + /// + public ContainerFlavor? ContainerFlavor; + /// + /// The time the build was created in UTC. + /// + public DateTime? CreationTime; + /// + /// The game assets for the build. + /// + public List GameAssetReferences; + /// + /// The game certificates for the build. + /// + public List GameCertificateReferences; + /// + /// The game secrets for the build. + /// + public List GameSecretReferences; + /// + /// The directory containing the game executable. This would be the start path of the game assets that contain the main game + /// server executable. If not provided, a best effort will be made to extract it from the start game command. + /// + public string GameWorkingDirectory; + /// + /// The instrumentation configuration for this build. + /// + public InstrumentationConfiguration InstrumentationConfiguration; + /// + /// The metadata of the build. + /// + public Dictionary Metadata; + /// + /// The configuration for the monitoring application for the build + /// + public MonitoringApplicationConfiguration MonitoringApplicationConfiguration; + /// + /// The number of multiplayer servers to host on a single VM of the build. + /// + public int MultiplayerServerCountPerVm; + /// + /// The OS platform used for running the game process. + /// + public string OsPlatform; + /// + /// The ports the build is mapped on. + /// + public List Ports; + /// + /// The region configuration for the build. + /// + public List RegionConfigurations; + /// + /// The resource constraints to apply to each server on the VM (EXPERIMENTAL API) + /// + public ServerResourceConstraintParams ServerResourceConstraints; + /// + /// The type of game server being hosted. + /// + public string ServerType; + /// + /// The command to run when the multiplayer server has been allocated, including any arguments. + /// + public string StartMultiplayerServerCommand; + /// + /// When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to + /// disc. + /// + public bool? UseStreamingForAssetDownloads; + /// + /// The VM size the build was created on. + /// + public AzureVmSize? VmSize; + /// + /// The configuration for the VmStartupScript feature for the build + /// + public VmStartupScriptConfiguration VmStartupScriptConfiguration; + } + + /// + /// Creates a multiplayer server build with the game server running as a process and returns information about the build + /// creation request. + /// + [Serializable] + public class CreateBuildWithProcessBasedServerRequest : PlayFabRequestCommon + { + /// + /// When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or + /// will have the same assets mounted in the container. + /// + public bool? AreAssetsReadonly; + /// + /// The build name. + /// + public string BuildName; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The list of game assets related to the build. + /// + public List GameAssetReferences; + /// + /// The game certificates for the build. + /// + public List GameCertificateReferences; + /// + /// The game secrets for the build. + /// + public List GameSecretReferences; + /// + /// The working directory for the game process. If this is not provided, the working directory will be set based on the + /// mount path of the game server executable. + /// + public string GameWorkingDirectory; + /// + /// The instrumentation configuration for the Build. Used only if it is a Windows Build. + /// + public InstrumentationConfiguration InstrumentationConfiguration; + /// + /// Indicates whether this build will be created using the OS Preview versionPreview OS is recommended for dev builds to + /// detect any breaking changes before they are released to retail. Retail builds should set this value to false. + /// + public bool? IsOSPreview; + /// + /// The Linux instrumentation configuration for the Build. Used only if it is a Linux Build. + /// + public LinuxInstrumentationConfiguration LinuxInstrumentationConfiguration; + /// + /// Metadata to tag the build. The keys are case insensitive. The build metadata is made available to the server through + /// Game Server SDK (GSDK).Constraints: Maximum number of keys: 30, Maximum key length: 50, Maximum value length: 100 + /// + public Dictionary Metadata; + /// + /// The configuration for the monitoring application on the build + /// + public MonitoringApplicationConfigurationParams MonitoringApplicationConfiguration; + /// + /// The number of multiplayer servers to host on a single VM. + /// + public int MultiplayerServerCountPerVm; + /// + /// The OS platform used for running the game process. + /// + public string OsPlatform; + /// + /// The ports to map the build on. + /// + public List Ports; + /// + /// The region configurations for the build. + /// + public List RegionConfigurations; + /// + /// The command to run when the multiplayer server is started, including any arguments. The path to any executable should be + /// relative to the root asset folder when unzipped. + /// + public string StartMultiplayerServerCommand; + /// + /// The VM size to create the build on. + /// + public AzureVmSize? VmSize; + /// + /// The configuration for the VmStartupScript for the build + /// + public VmStartupScriptParams VmStartupScriptConfiguration; + } + + [Serializable] + public class CreateBuildWithProcessBasedServerResponse : PlayFabResultCommon + { + /// + /// When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or + /// will have the same assets mounted in the container. + /// + public bool? AreAssetsReadonly; + /// + /// The guid string build ID. Must be unique for every build. + /// + public string BuildId; + /// + /// The build name. + /// + public string BuildName; + /// + /// The flavor of container of the build. + /// + public ContainerFlavor? ContainerFlavor; + /// + /// The time the build was created in UTC. + /// + public DateTime? CreationTime; + /// + /// The game assets for the build. + /// + public List GameAssetReferences; + /// + /// The game certificates for the build. + /// + public List GameCertificateReferences; + /// + /// The game secrets for the build. + /// + public List GameSecretReferences; + /// + /// The working directory for the game process. If this is not provided, the working directory will be set based on the + /// mount path of the game server executable. + /// + public string GameWorkingDirectory; + /// + /// The instrumentation configuration for this build. + /// + public InstrumentationConfiguration InstrumentationConfiguration; + /// + /// Indicates whether this build will be created using the OS Preview versionPreview OS is recommended for dev builds to + /// detect any breaking changes before they are released to retail. Retail builds should set this value to false. + /// + public bool? IsOSPreview; + /// + /// The Linux instrumentation configuration for this build. + /// + public LinuxInstrumentationConfiguration LinuxInstrumentationConfiguration; + /// + /// The metadata of the build. + /// + public Dictionary Metadata; + /// + /// The configuration for the monitoring application for the build + /// + public MonitoringApplicationConfiguration MonitoringApplicationConfiguration; + /// + /// The number of multiplayer servers to host on a single VM of the build. + /// + public int MultiplayerServerCountPerVm; + /// + /// The OS platform used for running the game process. + /// + public string OsPlatform; + /// + /// The ports the build is mapped on. + /// + public List Ports; + /// + /// The region configuration for the build. + /// + public List RegionConfigurations; + /// + /// The type of game server being hosted. + /// + public string ServerType; + /// + /// The command to run when the multiplayer server is started, including any arguments. The path to any executable is + /// relative to the root asset folder when unzipped. + /// + public string StartMultiplayerServerCommand; + /// + /// When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to + /// disc. + /// + public bool? UseStreamingForAssetDownloads; + /// + /// The VM size the build was created on. + /// + public AzureVmSize? VmSize; + /// + /// The configuration for the VmStartupScript feature for the build + /// + public VmStartupScriptConfiguration VmStartupScriptConfiguration; + } + + /// + /// Request to create a lobby. A Server or client can create a lobby. + /// + [Serializable] + public class CreateLobbyRequest : PlayFabRequestCommon + { + /// + /// The policy indicating who is allowed to join the lobby, and the visibility to queries. May be 'Public', 'Friends' or + /// 'Private'. Public means the lobby is both visible in queries and any player may join, including invited players. Friends + /// means that users who are bidirectional friends of members in the lobby may search to find friend lobbies, to retrieve + /// its connection string. Private means the lobby is not visible in queries, and a player must receive an invitation to + /// join. Defaults to 'Public' on creation. Can only be changed by the lobby owner. + /// + public AccessPolicy? AccessPolicy; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The private key-value pairs which are visible to all entities in the lobby. At most 30 key-value pairs may be stored + /// here, keys are limited to 30 characters and values to 1000. The total size of all lobbyData values may not exceed 4096 + /// bytes. Keys are case sensitive. + /// + public Dictionary LobbyData; + /// + /// The maximum number of players allowed in the lobby. The value must be between 2 and 128. + /// + public uint MaxPlayers; + /// + /// The member initially added to the lobby. Client must specify exactly one member, which is the creator's entity and + /// member data. Member PubSubConnectionHandle must be null or empty. Game servers must not specify any members. + /// + public List Members; + /// + /// The lobby owner. Must be the calling entity. + /// + public EntityKey Owner; + /// + /// The policy for how a new owner is chosen. May be 'Automatic', 'Manual' or 'None'. Can only be specified by clients. If + /// client-owned and 'Automatic' - The Lobby service will automatically assign another connected owner when the current + /// owner leaves or disconnects. The useConnections property must be true. If client - owned and 'Manual' - Ownership is + /// protected as long as the current owner is connected. If the current owner leaves or disconnects any member may set + /// themselves as the current owner. The useConnections property must be true. If client-owned and 'None' - Any member can + /// set ownership. The useConnections property can be either true or false. + /// + public OwnerMigrationPolicy? OwnerMigrationPolicy; + /// + /// The public key-value pairs which allow queries to differentiate between lobbies. Queries will refer to these key-value + /// pairs in their filter and order by clauses to retrieve lobbies fitting the specified criteria. At most 30 key-value + /// pairs may be stored here. Keys are of the format string_key1, string_key2 ... string_key30 for string values, or + /// number_key1, number_key2, ... number_key30 for numeric values.Numeric values are floats. Values can be at most 256 + /// characters long. The total size of all searchData values may not exceed 1024 bytes. + /// + public Dictionary SearchData; + /// + /// A setting to control whether connections are used. Defaults to true. When true, notifications are sent to subscribed + /// players, disconnect detection removes connectionHandles, only owner migration policies using connections are allowed, + /// and lobbies must have at least one connected member to be searchable or be a server hosted lobby with a connected + /// server. If false, then notifications are not sent, connections are not allowed, and lobbies do not need connections to + /// be searchable. + /// + public bool UseConnections; + } + + [Serializable] + public class CreateLobbyResult : PlayFabResultCommon + { + /// + /// A field which indicates which lobby the user will be joining. + /// + public string ConnectionString; + /// + /// Id to uniquely identify a lobby. + /// + public string LobbyId; + } + + /// + /// The client specifies the creator's attributes and optionally a list of other users to match with. + /// + [Serializable] + public class CreateMatchmakingTicketRequest : PlayFabRequestCommon + { + /// + /// The User who created this ticket. + /// + public MatchmakingPlayer Creator; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// How long to attempt matching this ticket in seconds. + /// + public int GiveUpAfterSeconds; + /// + /// A list of Entity Keys of other users to match with. + /// + public List MembersToMatchWith; + /// + /// The Id of a match queue. + /// + public string QueueName; + } + + [Serializable] + public class CreateMatchmakingTicketResult : PlayFabResultCommon + { + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + /// + /// Creates a remote user to log on to a VM for a multiplayer server build in a specific region. Returns user credential + /// information necessary to log on. + /// + [Serializable] + public class CreateRemoteUserRequest : PlayFabRequestCommon + { + /// + /// The guid string build ID of to create the remote user for. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The expiration time for the remote user created. Defaults to expiring in one day if not specified. + /// + public DateTime? ExpirationTime; + /// + /// The region of virtual machine to create the remote user for. + /// + public string Region; + /// + /// The username to create the remote user with. + /// + public string Username; + /// + /// The virtual machine ID the multiplayer server is located on. + /// + public string VmId; + } + + [Serializable] + public class CreateRemoteUserResponse : PlayFabResultCommon + { + /// + /// The expiration time for the remote user created. + /// + public DateTime? ExpirationTime; + /// + /// The generated password for the remote user that was created. + /// + public string Password; + /// + /// The username for the remote user that was created. + /// + public string Username; + } + + /// + /// The server specifies all the members, their teams and their attributes, and the server details if applicable. + /// + [Serializable] + public class CreateServerBackfillTicketRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// How long to attempt matching this ticket in seconds. + /// + public int GiveUpAfterSeconds; + /// + /// The users who will be part of this ticket, along with their team assignments. + /// + public List Members; + /// + /// The Id of a match queue. + /// + public string QueueName; + /// + /// The details of the server the members are connected to. + /// + public ServerDetails ServerDetails; + } + + [Serializable] + public class CreateServerBackfillTicketResult : PlayFabResultCommon + { + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + /// + /// The server specifies all the members and their attributes. + /// + [Serializable] + public class CreateServerMatchmakingTicketRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// How long to attempt matching this ticket in seconds. + /// + public int GiveUpAfterSeconds; + /// + /// The users who will be part of this ticket. + /// + public List Members; + /// + /// The Id of a match queue. + /// + public string QueueName; + } + + /// + /// Creates a request to change a title's multiplayer server quotas. + /// + [Serializable] + public class CreateTitleMultiplayerServersQuotaChangeRequest : PlayFabRequestCommon + { + /// + /// A brief description of the requested changes. + /// + public string ChangeDescription; + /// + /// Changes to make to the titles cores quota. + /// + public List Changes; + /// + /// Email to be contacted by our team about this request. Only required when a request is not approved. + /// + public string ContactEmail; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Additional information about this request that our team can use to better understand the requirements. + /// + public string Notes; + /// + /// When these changes would need to be in effect. Only required when a request is not approved. + /// + public DateTime? StartDate; + } + + [Serializable] + public class CreateTitleMultiplayerServersQuotaChangeResponse : PlayFabResultCommon + { + /// + /// Id of the change request that was created. + /// + public string RequestId; + /// + /// Determines if the request was approved or not. When false, our team is reviewing and may respond within 2 business days. + /// + public bool WasApproved; + } + + [Serializable] + public class CurrentServerStats : PlayFabBaseModel + { + /// + /// The number of active multiplayer servers. + /// + public int Active; + /// + /// The number of multiplayer servers still downloading game resources (such as assets). + /// + public int Propping; + /// + /// The number of standingby multiplayer servers. + /// + public int StandingBy; + /// + /// The total number of multiplayer servers. + /// + public int Total; + } + + [Serializable] + public class CustomDifferenceRuleExpansion : PlayFabBaseModel + { + /// + /// Manually specify the values to use for each expansion interval (this overrides Difference, Delta, and MaxDifference). + /// + public List DifferenceOverrides; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class CustomRegionSelectionRuleExpansion : PlayFabBaseModel + { + /// + /// Manually specify the maximum latency to use for each expansion interval. + /// + public List MaxLatencyOverrides; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class CustomSetIntersectionRuleExpansion : PlayFabBaseModel + { + /// + /// Manually specify the values to use for each expansion interval. + /// + public List MinIntersectionSizeOverrides; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class CustomTeamDifferenceRuleExpansion : PlayFabBaseModel + { + /// + /// Manually specify the team difference value to use for each expansion interval. + /// + public List DifferenceOverrides; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class CustomTeamSizeBalanceRuleExpansion : PlayFabBaseModel + { + /// + /// Manually specify the team size difference to use for each expansion interval. + /// + public List DifferenceOverrides; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + /// + /// Deletes a multiplayer server game asset for a title. + /// + [Serializable] + public class DeleteAssetRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The filename of the asset to delete. + /// + public string FileName; + } + + /// + /// Deletes a multiplayer server build alias. + /// + [Serializable] + public class DeleteBuildAliasRequest : PlayFabRequestCommon + { + /// + /// The guid string alias ID of the alias to perform the action on. + /// + public string AliasId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Removes a multiplayer server build's region. + /// + [Serializable] + public class DeleteBuildRegionRequest : PlayFabRequestCommon + { + /// + /// The guid string ID of the build we want to update regions for. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The build region to delete. + /// + public string Region; + } + + /// + /// Deletes a multiplayer server build. + /// + [Serializable] + public class DeleteBuildRequest : PlayFabRequestCommon + { + /// + /// The guid string build ID of the build to delete. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Deletes a multiplayer server game certificate. + /// + [Serializable] + public class DeleteCertificateRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the certificate. + /// + public string Name; + } + + /// + /// Removes the specified container image repository. After this operation, a 'docker pull' will fail for all the tags of + /// the specified image. Morever, ListContainerImages will not return the specified image. + /// + [Serializable] + public class DeleteContainerImageRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The container image repository we want to delete. + /// + public string ImageName; + } + + /// + /// Request to delete a lobby. Only servers can delete lobbies. + /// + [Serializable] + public class DeleteLobbyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The id of the lobby. + /// + public string LobbyId; + } + + /// + /// Deletes a remote user to log on to a VM for a multiplayer server build in a specific region. Returns user credential + /// information necessary to log on. + /// + [Serializable] + public class DeleteRemoteUserRequest : PlayFabRequestCommon + { + /// + /// The guid string build ID of the multiplayer server where the remote user is to delete. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The region of the multiplayer server where the remote user is to delete. + /// + public string Region; + /// + /// The username of the remote user to delete. + /// + public string Username; + /// + /// The virtual machine ID the multiplayer server is located on. + /// + public string VmId; + } + + /// + /// Deletes a multiplayer server game secret. + /// + [Serializable] + public class DeleteSecretRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the secret. + /// + public string Name; + } + + [Serializable] + public class DifferenceRule : PlayFabBaseModel + { + /// + /// Description of the attribute used by this rule to match tickets. + /// + public QueueRuleAttribute Attribute; + /// + /// Describes the behavior when an attribute is not specified in the ticket creation request or in the user's entity + /// profile. + /// + public AttributeNotSpecifiedBehavior AttributeNotSpecifiedBehavior; + /// + /// Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. When this + /// is set, Difference is ignored. + /// + public CustomDifferenceRuleExpansion CustomExpansion; + /// + /// The default value assigned to tickets that are missing the attribute specified by AttributePath (assuming that + /// AttributeNotSpecifiedBehavior is false). Optional. + /// + public double? DefaultAttributeValue; + /// + /// The allowed difference between any two tickets at the start of matchmaking. + /// + public double Difference; + /// + /// Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. + /// + public LinearDifferenceRuleExpansion LinearExpansion; + /// + /// How values are treated when there are multiple players in a single ticket. + /// + public AttributeMergeFunction MergeFunction; + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + /// + /// The relative weight of this rule compared to others. + /// + public double Weight; + } + + public enum DirectPeerConnectivityOptions + { + None, + SamePlatformType, + DifferentPlatformType, + AnyPlatformType, + SameEntityLoginProvider, + DifferentEntityLoginProvider, + AnyEntityLoginProvider, + AnyPlatformTypeAndEntityLoginProvider, + OnlyServers + } + + [Serializable] + public class DynamicStandbySettings : PlayFabBaseModel + { + /// + /// List of auto standing by trigger values and corresponding standing by multiplier. Defaults to 1.5X at 50%, 3X at 25%, + /// and 4X at 5% + /// + public List DynamicFloorMultiplierThresholds; + /// + /// When true, dynamic standby will be enabled + /// + public bool IsEnabled; + /// + /// The time it takes to reduce target standing by to configured floor value after an increase. Defaults to 30 minutes + /// + public int? RampDownSeconds; + } + + [Serializable] + public class DynamicStandbyThreshold : PlayFabBaseModel + { + /// + /// When the trigger threshold is reached, multiply by this value + /// + public double Multiplier; + /// + /// The multiplier will be applied when the actual standby divided by target standby floor is less than this value + /// + public double TriggerThresholdPercentage; + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + /// + /// Enables the multiplayer server feature for a title and returns the enabled status. The enabled status can be + /// Initializing, Enabled, and Disabled. It can up to 20 minutes or more for the title to be enabled for the feature. On + /// average, it can take up to 20 minutes for the title to be enabled for the feature. + /// + [Serializable] + public class EnableMultiplayerServersForTitleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class EnableMultiplayerServersForTitleResponse : PlayFabResultCommon + { + /// + /// The enabled status for the multiplayer server features for the title. + /// + public TitleMultiplayerServerEnabledStatus? Status; + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + public enum ExternalFriendSources + { + None, + Steam, + Facebook, + Xbox, + Psn, + All + } + + /// + /// Request to find friends lobbies. Only a client can find friend lobbies. + /// + [Serializable] + public class FindFriendLobbiesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates which other platforms' friends this query should link to. + /// + public ExternalFriendSources? ExternalPlatformFriends; + /// + /// OData style string that contains one or more filters. Only the following operators are supported: "and" (logical and), + /// "eq" (equal), "ne" (not equals), "ge" (greater than or equal), "gt" (greater than), "le" (less than or equal), and "lt" + /// (less than). The left-hand side of each OData logical expression should be either a search property key (e.g. + /// string_key1, number_key3, etc) or one of the pre-defined search keys all of which must be prefixed by "lobby/": + /// lobby/memberCount (number of players in a lobby), lobby/maxMemberCount (maximum number of players allowed in a lobby), + /// lobby/memberCountRemaining (remaining number of players who can be allowed in a lobby), lobby/membershipLock (must equal + /// 'Unlocked' or 'Locked'), lobby/amOwner (required to equal "true"), lobby/amMember (required to equal "true"). + /// + public string Filter; + /// + /// OData style string that contains sorting for this query in either ascending ("asc") or descending ("desc") order. + /// OrderBy clauses are of the form "number_key1 asc" or the pre-defined search key "lobby/memberCount asc", + /// "lobby/memberCountRemaining desc" and "lobby/maxMemberCount desc". To sort by closest, a moniker `distance{number_key1 = + /// 5}` can be used to sort by distance from the given number. This field only supports either one sort clause or one + /// distance clause. + /// + public string OrderBy; + /// + /// Request pagination information. + /// + public PaginationRequest Pagination; + /// + /// Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab. + /// + public string XboxToken; + } + + [Serializable] + public class FindFriendLobbiesResult : PlayFabResultCommon + { + /// + /// Array of lobbies found that matched FindFriendLobbies request. + /// + public List Lobbies; + /// + /// Pagination response for FindFriendLobbies request. + /// + public PaginationResponse Pagination; + } + + /// + /// Request to find lobbies. + /// + [Serializable] + public class FindLobbiesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// OData style string that contains one or more filters. Only the following operators are supported: "and" (logical and), + /// "eq" (equal), "ne" (not equals), "ge" (greater than or equal), "gt" (greater than), "le" (less than or equal), and "lt" + /// (less than). The left-hand side of each OData logical expression should be either a search property key (e.g. + /// string_key1, number_key3, etc) or one of the pre-defined search keys all of which must be prefixed by "lobby/": + /// lobby/memberCount (number of players in a lobby), lobby/maxMemberCount (maximum number of players allowed in a lobby), + /// lobby/memberCountRemaining (remaining number of players who can be allowed in a lobby), lobby/membershipLock (must equal + /// 'Unlocked' or 'Locked'), lobby/amOwner (required to equal "true"), lobby/amMember (required to equal "true"). + /// + public string Filter; + /// + /// OData style string that contains sorting for this query in either ascending ("asc") or descending ("desc") order. + /// OrderBy clauses are of the form "number_key1 asc" or the pre-defined search key "lobby/memberCount asc", + /// "lobby/memberCountRemaining desc" and "lobby/maxMemberCount desc". To sort by closest, a moniker `distance{number_key1 = + /// 5}` can be used to sort by distance from the given number. This field only supports either one sort clause or one + /// distance clause. + /// + public string OrderBy; + /// + /// Request pagination information. + /// + public PaginationRequest Pagination; + } + + [Serializable] + public class FindLobbiesResult : PlayFabResultCommon + { + /// + /// Array of lobbies found that matched FindLobbies request. + /// + public List Lobbies; + /// + /// Pagination response for FindLobbies request. + /// + public PaginationResponse Pagination; + } + + [Serializable] + public class FriendLobbySummary : PlayFabBaseModel + { + /// + /// A string used to join the lobby.This field is populated by the Lobby service.Invites are performed by communicating this + /// connectionString to other players. + /// + public string ConnectionString; + /// + /// The current number of players in the lobby. + /// + public uint CurrentPlayers; + /// + /// Friends in Lobby. + /// + public List Friends; + /// + /// Id to uniquely identify a lobby. + /// + public string LobbyId; + /// + /// The maximum number of players allowed in the lobby. + /// + public uint MaxPlayers; + /// + /// A setting indicating whether members are allowed to join this lobby. When Locked new members are prevented from joining. + /// + public MembershipLock? MembershipLock; + /// + /// The client or server entity which owns this lobby. + /// + public EntityKey Owner; + /// + /// Search data. + /// + public Dictionary SearchData; + } + + [Serializable] + public class GameCertificateReference : PlayFabBaseModel + { + /// + /// An alias for the game certificate. The game server will reference this alias via GSDK config to retrieve the game + /// certificate. This alias is used as an identifier in game server code to allow a new certificate with different Name + /// field to be uploaded without the need to change any game server code to reference the new Name. + /// + public string GsdkAlias; + /// + /// The name of the game certificate. This name should match the name of a certificate that was previously uploaded to this + /// title. + /// + public string Name; + } + + [Serializable] + public class GameCertificateReferenceParams : PlayFabBaseModel + { + /// + /// An alias for the game certificate. The game server will reference this alias via GSDK config to retrieve the game + /// certificate. This alias is used as an identifier in game server code to allow a new certificate with different Name + /// field to be uploaded without the need to change any game server code to reference the new Name. + /// + public string GsdkAlias; + /// + /// The name of the game certificate. This name should match the name of a certificate that was previously uploaded to this + /// title. + /// + public string Name; + } + + [Serializable] + public class GameSecretReference : PlayFabBaseModel + { + /// + /// The name of the game secret. This name should match the name of a secret that was previously added to this title. + /// + public string Name; + } + + [Serializable] + public class GameSecretReferenceParams : PlayFabBaseModel + { + /// + /// The name of the game secret. This name should match the name of a secret that was previously added to this title. + /// + public string Name; + } + + /// + /// Gets a URL that can be used to download the specified asset. + /// + [Serializable] + public class GetAssetDownloadUrlRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The asset's file name to get the download URL for. + /// + public string FileName; + } + + [Serializable] + public class GetAssetDownloadUrlResponse : PlayFabResultCommon + { + /// + /// The asset's download URL. + /// + public string AssetDownloadUrl; + /// + /// The asset's file name to get the download URL for. + /// + public string FileName; + } + + /// + /// Gets the URL to upload assets to. + /// + [Serializable] + public class GetAssetUploadUrlRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The asset's file name to get the upload URL for. + /// + public string FileName; + } + + [Serializable] + public class GetAssetUploadUrlResponse : PlayFabResultCommon + { + /// + /// The asset's upload URL. + /// + public string AssetUploadUrl; + /// + /// The asset's file name to get the upload URL for. + /// + public string FileName; + } + + /// + /// Returns the details about a multiplayer server build alias. + /// + [Serializable] + public class GetBuildAliasRequest : PlayFabRequestCommon + { + /// + /// The guid string alias ID of the alias to perform the action on. + /// + public string AliasId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Returns the details about a multiplayer server build. + /// + [Serializable] + public class GetBuildRequest : PlayFabRequestCommon + { + /// + /// The guid string build ID of the build to get. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetBuildResponse : PlayFabResultCommon + { + /// + /// When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or + /// will have the same assets mounted in the container. + /// + public bool? AreAssetsReadonly; + /// + /// The guid string build ID of the build. + /// + public string BuildId; + /// + /// The build name. + /// + public string BuildName; + /// + /// The current build status. Valid values are - Deploying, Deployed, DeletingRegion, Unhealthy. + /// + public string BuildStatus; + /// + /// The flavor of container of he build. + /// + public ContainerFlavor? ContainerFlavor; + /// + /// The container command to run when the multiplayer server has been allocated, including any arguments. This only applies + /// to custom builds. If the build is a managed build, this field will be null. + /// + public string ContainerRunCommand; + /// + /// The time the build was created in UTC. + /// + public DateTime? CreationTime; + /// + /// The custom game container image for a custom build. + /// + public ContainerImageReference CustomGameContainerImage; + /// + /// The game assets for the build. + /// + public List GameAssetReferences; + /// + /// The game certificates for the build. + /// + public List GameCertificateReferences; + /// + /// The instrumentation configuration of the build. + /// + public InstrumentationConfiguration InstrumentationConfiguration; + /// + /// Metadata of the build. The keys are case insensitive. The build metadata is made available to the server through Game + /// Server SDK (GSDK). + /// + public Dictionary Metadata; + /// + /// The number of multiplayer servers to hosted on a single VM of the build. + /// + public int MultiplayerServerCountPerVm; + /// + /// The OS platform used for running the game process. + /// + public string OsPlatform; + /// + /// The ports the build is mapped on. + /// + public List Ports; + /// + /// The region configuration for the build. + /// + public List RegionConfigurations; + /// + /// The resource constraints to apply to each server on the VM. + /// + public ServerResourceConstraintParams ServerResourceConstraints; + /// + /// The type of game server being hosted. + /// + public string ServerType; + /// + /// The command to run when the multiplayer server has been allocated, including any arguments. This only applies to managed + /// builds. If the build is a custom build, this field will be null. + /// + public string StartMultiplayerServerCommand; + /// + /// The VM size the build was created on. + /// + public AzureVmSize? VmSize; + /// + /// The configuration for the VmStartupScript feature for the build + /// + public VmStartupScriptConfiguration VmStartupScriptConfiguration; + } + + /// + /// Gets credentials to the container registry where game developers can upload custom container images to before creating a + /// new build. + /// + [Serializable] + public class GetContainerRegistryCredentialsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetContainerRegistryCredentialsResponse : PlayFabResultCommon + { + /// + /// The url of the container registry. + /// + public string DnsName; + /// + /// The password for accessing the container registry. + /// + public string Password; + /// + /// The username for accessing the container registry. + /// + public string Username; + } + + /// + /// Request to get a lobby. + /// + [Serializable] + public class GetLobbyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The id of the lobby. + /// + public string LobbyId; + } + + [Serializable] + public class GetLobbyResult : PlayFabResultCommon + { + /// + /// The information pertaining to the requested lobby. + /// + public Lobby Lobby; + } + + /// + /// Gets the current configuration for a queue. + /// + [Serializable] + public class GetMatchmakingQueueRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The Id of the matchmaking queue to retrieve. + /// + public string QueueName; + } + + [Serializable] + public class GetMatchmakingQueueResult : PlayFabResultCommon + { + /// + /// The matchmaking queue config. + /// + public MatchmakingQueueConfig MatchmakingQueue; + } + + /// + /// The ticket includes the invited players, their attributes if they have joined, the ticket status, the match Id when + /// applicable, etc. Only servers, the ticket creator and the invited players can get the ticket. + /// + [Serializable] + public class GetMatchmakingTicketRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Determines whether the matchmaking attributes will be returned as an escaped JSON string or as an un-escaped JSON + /// object. + /// + public bool EscapeObject; + /// + /// The name of the queue to find a match for. + /// + public string QueueName; + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + [Serializable] + public class GetMatchmakingTicketResult : PlayFabResultCommon + { + /// + /// The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. Please retry + /// if CancellationReason is RetryRequired. + /// + public string CancellationReasonString; + /// + /// Change number used for differentiating older matchmaking status updates from newer ones. + /// + public uint? ChangeNumber; + /// + /// The server date and time at which ticket was created. + /// + public DateTime Created; + /// + /// The Creator's entity key. + /// + public EntityKey Creator; + /// + /// How long to attempt matching this ticket in seconds. + /// + public int GiveUpAfterSeconds; + /// + /// The Id of a match. + /// + public string MatchId; + /// + /// A list of Users that have joined this ticket. + /// + public List Members; + /// + /// A list of PlayFab Ids of Users to match with. + /// + public List MembersToMatchWith; + /// + /// The Id of a match queue. + /// + public string QueueName; + /// + /// The current ticket status. Possible values are: WaitingForPlayers, WaitingForMatch, WaitingForServer, Canceled and + /// Matched. + /// + public string Status; + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + /// + /// When matchmaking has successfully matched together a collection of tickets, it produces a 'match' with an Id. The match + /// contains all of the players that were matched together, and their team assigments. Only servers and ticket members can + /// get the match. + /// + [Serializable] + public class GetMatchRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Determines whether the matchmaking attributes will be returned as an escaped JSON string or as an un-escaped JSON + /// object. + /// + public bool EscapeObject; + /// + /// The Id of a match. + /// + public string MatchId; + /// + /// The name of the queue to join. + /// + public string QueueName; + /// + /// Determines whether the matchmaking attributes for each user should be returned in the response for match request. + /// + public bool ReturnMemberAttributes; + } + + [Serializable] + public class GetMatchResult : PlayFabResultCommon + { + /// + /// A string that is used by players that are matched together to join an arranged lobby. + /// + public string ArrangementString; + /// + /// The Id of a match. + /// + public string MatchId; + /// + /// A list of Users that are matched together, along with their team assignments. + /// + public List Members; + /// + /// A list of regions that the match could be played in sorted by preference. This value is only set if the queue has a + /// region selection rule. + /// + public List RegionPreferences; + /// + /// The details of the server that the match has been allocated to. + /// + public ServerDetails ServerDetails; + } + + /// + /// Gets multiplayer server session details for a build in a specific region. + /// + [Serializable] + public class GetMultiplayerServerDetailsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The title generated guid string session ID of the multiplayer server to get details for. This is to keep track of + /// multiplayer server sessions. + /// + public string SessionId; + } + + [Serializable] + public class GetMultiplayerServerDetailsResponse : PlayFabResultCommon + { + /// + /// The identity of the build in which the server was allocated. + /// + public string BuildId; + /// + /// The connected players in the multiplayer server. + /// + public List ConnectedPlayers; + /// + /// The fully qualified domain name of the virtual machine that is hosting this multiplayer server. + /// + public string FQDN; + /// + /// The public IPv4 address of the virtual machine that is hosting this multiplayer server. + /// + public string IPV4Address; + /// + /// The time (UTC) at which a change in the multiplayer server state was observed. + /// + public DateTime? LastStateTransitionTime; + /// + /// The ports the multiplayer server uses. + /// + public List Ports; + /// + /// The list of public Ipv4 addresses associated with the server. + /// + public List PublicIPV4Addresses; + /// + /// The region the multiplayer server is located in. + /// + public string Region; + /// + /// The string server ID of the multiplayer server generated by PlayFab. + /// + public string ServerId; + /// + /// The guid string session ID of the multiplayer server. + /// + public string SessionId; + /// + /// The state of the multiplayer server. + /// + public string State; + /// + /// The virtual machine ID that the multiplayer server is located on. + /// + public string VmId; + } + + /// + /// Gets multiplayer server logs for a specific server id in a region. The logs are available only after a server has + /// terminated. + /// + [Serializable] + public class GetMultiplayerServerLogsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The server ID of multiplayer server to get logs for. + /// + public string ServerId; + } + + [Serializable] + public class GetMultiplayerServerLogsResponse : PlayFabResultCommon + { + /// + /// URL for logs download. + /// + public string LogDownloadUrl; + } + + /// + /// Gets multiplayer server logs for a specific server id in a region. The logs are available only after a server has + /// terminated. + /// + [Serializable] + public class GetMultiplayerSessionLogsBySessionIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The server ID of multiplayer server to get logs for. + /// + public string SessionId; + } + + /// + /// Returns the matchmaking statistics for a queue. These include the number of players matching and the statistics related + /// to the time to match statistics in seconds (average and percentiles). Statistics are refreshed once every 5 minutes. + /// Servers can access all statistics no matter what the ClientStatisticsVisibility is configured to. Clients can access + /// statistics according to the ClientStatisticsVisibility. Client requests are forbidden if all visibility fields are + /// false. + /// + [Serializable] + public class GetQueueStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the queue. + /// + public string QueueName; + } + + [Serializable] + public class GetQueueStatisticsResult : PlayFabResultCommon + { + /// + /// The current number of players in the matchmaking queue, who are waiting to be matched. + /// + public uint? NumberOfPlayersMatching; + /// + /// Statistics representing the time (in seconds) it takes for tickets to find a match. + /// + public Statistics TimeToMatchStatisticsInSeconds; + } + + /// + /// Gets a remote login endpoint to a VM that is hosting a multiplayer server build in a specific region. + /// + [Serializable] + public class GetRemoteLoginEndpointRequest : PlayFabRequestCommon + { + /// + /// The guid string build ID of the multiplayer server to get remote login information for. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The region of the multiplayer server to get remote login information for. + /// + public string Region; + /// + /// The virtual machine ID the multiplayer server is located on. + /// + public string VmId; + } + + [Serializable] + public class GetRemoteLoginEndpointResponse : PlayFabResultCommon + { + /// + /// The remote login IPV4 address of multiplayer server. + /// + public string IPV4Address; + /// + /// The remote login port of multiplayer server. + /// + public int Port; + } + + /// + /// The ticket includes the players, their attributes, their teams, the ticket status, the match Id and the server details + /// when applicable, etc. Only servers can get the ticket. + /// + [Serializable] + public class GetServerBackfillTicketRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Determines whether the matchmaking attributes will be returned as an escaped JSON string or as an un-escaped JSON + /// object. + /// + public bool EscapeObject; + /// + /// The name of the queue to find a match for. + /// + public string QueueName; + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + [Serializable] + public class GetServerBackfillTicketResult : PlayFabResultCommon + { + /// + /// The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. + /// + public string CancellationReasonString; + /// + /// The server date and time at which ticket was created. + /// + public DateTime Created; + /// + /// How long to attempt matching this ticket in seconds. + /// + public int GiveUpAfterSeconds; + /// + /// The Id of a match. + /// + public string MatchId; + /// + /// A list of Users that are part of this ticket, along with their team assignments. + /// + public List Members; + /// + /// The Id of a match queue. + /// + public string QueueName; + /// + /// The details of the server the members are connected to. + /// + public ServerDetails ServerDetails; + /// + /// The current ticket status. Possible values are: WaitingForMatch, Canceled and Matched. + /// + public string Status; + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + /// + /// Gets the status of whether a title is enabled for the multiplayer server feature. The enabled status can be + /// Initializing, Enabled, and Disabled. + /// + [Serializable] + public class GetTitleEnabledForMultiplayerServersStatusRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetTitleEnabledForMultiplayerServersStatusResponse : PlayFabResultCommon + { + /// + /// The enabled status for the multiplayer server features for the title. + /// + public TitleMultiplayerServerEnabledStatus? Status; + } + + /// + /// Gets a title's server quota change request. + /// + [Serializable] + public class GetTitleMultiplayerServersQuotaChangeRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Id of the change request to get. + /// + public string RequestId; + } + + [Serializable] + public class GetTitleMultiplayerServersQuotaChangeResponse : PlayFabResultCommon + { + /// + /// The change request for this title. + /// + public QuotaChange Change; + } + + /// + /// Gets the quotas for a title in relation to multiplayer servers. + /// + [Serializable] + public class GetTitleMultiplayerServersQuotasRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class GetTitleMultiplayerServersQuotasResponse : PlayFabResultCommon + { + /// + /// The various quotas for multiplayer servers for the title. + /// + public TitleMultiplayerServersQuotas Quotas; + } + + [Serializable] + public class InstrumentationConfiguration : PlayFabBaseModel + { + /// + /// Designates whether windows instrumentation configuration will be enabled for this Build + /// + public bool? IsEnabled; + /// + /// This property is deprecated, use IsEnabled. The list of processes to be monitored on a VM for this build. Providing + /// processes will turn on performance metrics collection for this build. Process names should not include extensions. If + /// the game server process is: GameServer.exe; then, ProcessesToMonitor = [ GameServer ] + /// + public List ProcessesToMonitor; + } + + /// + /// Request to invite a player to a lobby the caller is already a member of. Only a client can invite another player to a + /// lobby. + /// + [Serializable] + public class InviteToLobbyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity invited to the lobby. + /// + public EntityKey InviteeEntity; + /// + /// The id of the lobby. + /// + public string LobbyId; + /// + /// The member entity sending the invite. Must be a member of the lobby. + /// + public EntityKey MemberEntity; + } + + /// + /// Request to join an arranged lobby. Only a client can join an arranged lobby. + /// + [Serializable] + public class JoinArrangedLobbyRequest : PlayFabRequestCommon + { + /// + /// The policy indicating who is allowed to join the lobby, and the visibility to queries. May be 'Public', 'Friends' or + /// 'Private'. Public means the lobby is both visible in queries and any player may join, including invited players. Friends + /// means that users who are bidirectional friends of members in the lobby may search to find friend lobbies, to retrieve + /// its connection string. Private means the lobby is not visible in queries, and a player must receive an invitation to + /// join. Defaults to 'Public' on creation. Can only be changed by the lobby owner. + /// + public AccessPolicy? AccessPolicy; + /// + /// A field which indicates which lobby the user will be joining. This field is opaque to everyone except the Lobby service + /// and the creator of the arrangementString (Matchmaking). This string defines a unique identifier for the arranged lobby + /// as well as the title and member the string is valid for. Arrangement strings have an expiration. + /// + public string ArrangementString; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The maximum number of players allowed in the lobby. The value must be between 2 and 128. + /// + public uint MaxPlayers; + /// + /// The private key-value pairs used by the member to communicate information to other members and the owner. Visible to all + /// entities in the lobby. At most 30 key-value pairs may be stored here, keys are limited to 30 characters and values to + /// 1000. The total size of all memberData values may not exceed 4096 bytes. Keys are case sensitive. + /// + public Dictionary MemberData; + /// + /// The member entity who is joining the lobby. The first member to join will be the lobby owner. + /// + public EntityKey MemberEntity; + /// + /// The policy for how a new owner is chosen. May be 'Automatic', 'Manual' or 'None'. Can only be specified by clients. If + /// client-owned and 'Automatic' - The Lobby service will automatically assign another connected owner when the current + /// owner leaves or disconnects. The useConnections property must be true. If client - owned and 'Manual' - Ownership is + /// protected as long as the current owner is connected. If the current owner leaves or disconnects any member may set + /// themselves as the current owner. The useConnections property must be true. If client-owned and 'None' - Any member can + /// set ownership. The useConnections property can be either true or false. + /// + public OwnerMigrationPolicy? OwnerMigrationPolicy; + /// + /// A setting to control whether connections are used. Defaults to true. When true, notifications are sent to subscribed + /// players, disconnect detection removes connectionHandles, only owner migration policies using connections are allowed, + /// and lobbies must have at least one connected member to be searchable or be a server hosted lobby with a connected + /// server. If false, then notifications are not sent, connections are not allowed, and lobbies do not need connections to + /// be searchable. + /// + public bool UseConnections; + } + + /// + /// Preview: Request to join a lobby as a server. Only callable by a game_server entity and this is restricted to client + /// owned lobbies which are using connections. + /// + [Serializable] + public class JoinLobbyAsServerRequest : PlayFabRequestCommon + { + /// + /// A field which indicates which lobby the game_server will be joining. This field is opaque to everyone except the Lobby + /// service. + /// + public string ConnectionString; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The private key-value pairs which are visible to all entities in the lobby but can only be modified by the joined + /// server.At most 30 key - value pairs may be stored here, keys are limited to 30 characters and values to 1000.The total + /// size of all serverData values may not exceed 4096 bytes. + /// + public Dictionary ServerData; + /// + /// The game_server entity which is joining the Lobby. If a different game_server entity has already joined the request will + /// fail unless the joined entity is disconnected, in which case the incoming game_server entity will replace the + /// disconnected entity. + /// + public EntityKey ServerEntity; + } + + [Serializable] + public class JoinLobbyAsServerResult : PlayFabResultCommon + { + /// + /// Successfully joined lobby's id. + /// + public string LobbyId; + } + + /// + /// Request to join a lobby. Only a client can join a lobby. + /// + [Serializable] + public class JoinLobbyRequest : PlayFabRequestCommon + { + /// + /// A field which indicates which lobby the user will be joining. This field is opaque to everyone except the Lobby service. + /// + public string ConnectionString; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The private key-value pairs used by the member to communicate information to other members and the owner. Visible to all + /// entities in the lobby. At most 30 key-value pairs may be stored here, keys are limited to 30 characters and values to + /// 1000. The total size of all memberData values may not exceed 4096 bytes.Keys are case sensitive. + /// + public Dictionary MemberData; + /// + /// The member entity who is joining the lobby. + /// + public EntityKey MemberEntity; + } + + [Serializable] + public class JoinLobbyResult : PlayFabResultCommon + { + /// + /// Successfully joined lobby's id. + /// + public string LobbyId; + } + + /// + /// Add the player to a matchmaking ticket and specify all of its matchmaking attributes. Players can join a ticket if and + /// only if their EntityKeys are already listed in the ticket's Members list. The matchmaking service automatically starts + /// matching the ticket against other matchmaking tickets once all players have joined the ticket. It is not possible to + /// join a ticket once it has started matching. + /// + [Serializable] + public class JoinMatchmakingTicketRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The User who wants to join the ticket. Their Id must be listed in PlayFabIdsToMatchWith. + /// + public MatchmakingPlayer Member; + /// + /// The name of the queue to join. + /// + public string QueueName; + /// + /// The Id of the ticket to find a match for. + /// + public string TicketId; + } + + [Serializable] + public class JoinMatchmakingTicketResult : PlayFabResultCommon + { + } + + /// + /// Preview: Request for server to leave a lobby. Only a game_server entity can leave and this is restricted to client owned + /// lobbies which are using connections. + /// + [Serializable] + public class LeaveLobbyAsServerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The id of the lobby. + /// + public string LobbyId; + /// + /// The game_server entity leaving the lobby. If the game_server was subscribed to notifications, it will be unsubscribed. + /// If a the given game_server entity is not in the lobby, it will fail. + /// + public EntityKey ServerEntity; + } + + /// + /// Request to leave a lobby. Only a client can leave a lobby. + /// + [Serializable] + public class LeaveLobbyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The id of the lobby. + /// + public string LobbyId; + /// + /// The member entity leaving the lobby. + /// + public EntityKey MemberEntity; + } + + [Serializable] + public class LinearDifferenceRuleExpansion : PlayFabBaseModel + { + /// + /// This value gets added to Difference at every expansion interval. + /// + public double Delta; + /// + /// Once the total difference reaches this value, expansion stops. Optional. + /// + public double? Limit; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class LinearRegionSelectionRuleExpansion : PlayFabBaseModel + { + /// + /// This value gets added to MaxLatency at every expansion interval. + /// + public uint Delta; + /// + /// Once the max Latency reaches this value, expansion stops. + /// + public uint Limit; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class LinearSetIntersectionRuleExpansion : PlayFabBaseModel + { + /// + /// This value gets added to MinIntersectionSize at every expansion interval. + /// + public uint Delta; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class LinearTeamDifferenceRuleExpansion : PlayFabBaseModel + { + /// + /// This value gets added to Difference at every expansion interval. + /// + public double Delta; + /// + /// Once the total difference reaches this value, expansion stops. Optional. + /// + public double? Limit; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class LinearTeamSizeBalanceRuleExpansion : PlayFabBaseModel + { + /// + /// This value gets added to Difference at every expansion interval. + /// + public uint Delta; + /// + /// Once the total difference reaches this value, expansion stops. Optional. + /// + public uint? Limit; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class LinuxInstrumentationConfiguration : PlayFabBaseModel + { + /// + /// Designates whether Linux instrumentation configuration will be enabled for this Build + /// + public bool IsEnabled; + } + + /// + /// Returns a list of multiplayer server game asset summaries for a title. + /// + [Serializable] + public class ListAssetSummariesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListAssetSummariesResponse : PlayFabResultCommon + { + /// + /// The list of asset summaries. + /// + public List AssetSummaries; + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of summarized details of all multiplayer server builds for a title. + /// + [Serializable] + public class ListBuildAliasesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListBuildAliasesResponse : PlayFabResultCommon + { + /// + /// The list of build aliases for the title + /// + public List BuildAliases; + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of summarized details of all multiplayer server builds for a title. + /// + [Serializable] + public class ListBuildSummariesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListBuildSummariesResponse : PlayFabResultCommon + { + /// + /// The list of build summaries for a title. + /// + public List BuildSummaries; + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of multiplayer server game certificates for a title. + /// + [Serializable] + public class ListCertificateSummariesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListCertificateSummariesResponse : PlayFabResultCommon + { + /// + /// The list of game certificates. + /// + public List CertificateSummaries; + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of the container images that have been uploaded to the container registry for a title. + /// + [Serializable] + public class ListContainerImagesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListContainerImagesResponse : PlayFabResultCommon + { + /// + /// The list of container images. + /// + public List Images; + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of the tags for a particular container image that exists in the container registry for a title. + /// + [Serializable] + public class ListContainerImageTagsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The container images we want to list tags for. + /// + public string ImageName; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListContainerImageTagsResponse : PlayFabResultCommon + { + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + /// + /// The list of tags for a particular container image. + /// + public List Tags; + } + + /// + /// Gets a list of all the matchmaking queue configurations for the title. + /// + [Serializable] + public class ListMatchmakingQueuesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class ListMatchmakingQueuesResult : PlayFabResultCommon + { + /// + /// The list of matchmaking queue configs for this title. + /// + public List MatchMakingQueues; + } + + /// + /// If the caller is a title, the EntityKey in the request is required. If the caller is a player, then it is optional. If + /// it is provided it must match the caller's entity. + /// + [Serializable] + public class ListMatchmakingTicketsForPlayerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity key for which to find the ticket Ids. + /// + public EntityKey Entity; + /// + /// The name of the queue to find a match for. + /// + public string QueueName; + } + + [Serializable] + public class ListMatchmakingTicketsForPlayerResult : PlayFabResultCommon + { + /// + /// The list of ticket Ids the user is a member of. + /// + public List TicketIds; + } + + /// + /// Returns a list of multiplayer servers for a build in a specific region. + /// + [Serializable] + public class ListMultiplayerServersRequest : PlayFabRequestCommon + { + /// + /// The guid string build ID of the multiplayer servers to list. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The region the multiplayer servers to list. + /// + public string Region; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListMultiplayerServersResponse : PlayFabResultCommon + { + /// + /// The list of multiplayer server summary details. + /// + public List MultiplayerServerSummaries; + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of quality of service servers for party. + /// + [Serializable] + public class ListPartyQosServersRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class ListPartyQosServersResponse : PlayFabResultCommon + { + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The list of QoS servers. + /// + public List QosServers; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of quality of service servers for a title. + /// + [Serializable] + public class ListQosServersForTitleRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates that the response should contain Qos servers for all regions, including those where there are no builds + /// deployed for the title. + /// + public bool? IncludeAllRegions; + /// + /// Indicates the Routing Preference used by the Qos servers. The default Routing Preference is Microsoft + /// + public string RoutingPreference; + } + + [Serializable] + public class ListQosServersForTitleResponse : PlayFabResultCommon + { + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The list of QoS servers. + /// + public List QosServers; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// Returns a list of multiplayer server game secrets for a title. + /// + [Serializable] + public class ListSecretSummariesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListSecretSummariesResponse : PlayFabResultCommon + { + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The list of game secret. + /// + public List SecretSummaries; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + } + + /// + /// List all server backfill ticket Ids the user is a member of. + /// + [Serializable] + public class ListServerBackfillTicketsForPlayerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity key for which to find the ticket Ids. + /// + public EntityKey Entity; + /// + /// The name of the queue the tickets are in. + /// + public string QueueName; + } + + [Serializable] + public class ListServerBackfillTicketsForPlayerResult : PlayFabResultCommon + { + /// + /// The list of backfill ticket Ids the user is a member of. + /// + public List TicketIds; + } + + /// + /// List all server quota change requests for a title. + /// + [Serializable] + public class ListTitleMultiplayerServersQuotaChangesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class ListTitleMultiplayerServersQuotaChangesResponse : PlayFabResultCommon + { + /// + /// All change requests for this title. + /// + public List Changes; + } + + /// + /// Returns a list of virtual machines for a title. + /// + [Serializable] + public class ListVirtualMachineSummariesRequest : PlayFabRequestCommon + { + /// + /// The guid string build ID of the virtual machines to list. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The page size for the request. + /// + public int? PageSize; + /// + /// The region of the virtual machines to list. + /// + public string Region; + /// + /// The skip token for the paged request. + /// + public string SkipToken; + } + + [Serializable] + public class ListVirtualMachineSummariesResponse : PlayFabResultCommon + { + /// + /// The page size on the response. + /// + public int PageSize; + /// + /// The skip token for the paged response. + /// + public string SkipToken; + /// + /// The list of virtual machine summaries. + /// + public List VirtualMachines; + } + + [Serializable] + public class Lobby : PlayFabBaseModel + { + /// + /// A setting indicating who is allowed to join this lobby, as well as see it in queries. + /// + public AccessPolicy AccessPolicy; + /// + /// A number that increments once for each request that modifies the lobby. + /// + public uint ChangeNumber; + /// + /// A string used to join the lobby. This field is populated by the Lobby service. Invites are performed by communicating + /// this connectionString to other players. + /// + public string ConnectionString; + /// + /// Lobby data. + /// + public Dictionary LobbyData; + /// + /// Id to uniquely identify a lobby. + /// + public string LobbyId; + /// + /// The maximum number of players allowed in the lobby. + /// + public uint MaxPlayers; + /// + /// Array of all lobby members. + /// + public List Members; + /// + /// A setting indicating whether members are allowed to join this lobby. When Locked new members are prevented from joining. + /// + public MembershipLock MembershipLock; + /// + /// The client or server entity which owns this lobby. + /// + public EntityKey Owner; + /// + /// A setting indicating the owner migration policy. If server owned, this field is not present. + /// + public OwnerMigrationPolicy? OwnerMigrationPolicy; + /// + /// An opaque string stored on a SubscribeToLobbyResource call, which indicates the connection an owner or member has with + /// PubSub. + /// + public string PubSubConnectionHandle; + /// + /// Search data. + /// + public Dictionary SearchData; + /// + /// Preview: Lobby joined server. This is not the server owner, rather the server that has joined a client owned lobby. + /// + public LobbyServer Server; + /// + /// A flag which determines if connections are used. Defaults to true. Only set on create. + /// + public bool UseConnections; + } + + [Serializable] + public class LobbyEmptyResult : PlayFabResultCommon + { + } + + [Serializable] + public class LobbyServer : PlayFabBaseModel + { + /// + /// Opaque string, stored on a Subscribe call, which indicates the connection a joined server has with PubSub. + /// + public string PubSubConnectionHandle; + /// + /// Key-value pairs specific to the joined server. + /// + public Dictionary ServerData; + /// + /// The server entity key. + /// + public EntityKey ServerEntity; + } + + [Serializable] + public class LobbySummary : PlayFabBaseModel + { + /// + /// A string used to join the lobby.This field is populated by the Lobby service.Invites are performed by communicating this + /// connectionString to other players. + /// + public string ConnectionString; + /// + /// The current number of players in the lobby. + /// + public uint CurrentPlayers; + /// + /// Id to uniquely identify a lobby. + /// + public string LobbyId; + /// + /// The maximum number of players allowed in the lobby. + /// + public uint MaxPlayers; + /// + /// A setting indicating whether members are allowed to join this lobby. When Locked new members are prevented from joining. + /// + public MembershipLock? MembershipLock; + /// + /// The client or server entity which owns this lobby. + /// + public EntityKey Owner; + /// + /// Search data. + /// + public Dictionary SearchData; + } + + /// + /// A user in a matchmaking ticket. + /// + [Serializable] + public class MatchmakingPlayer : PlayFabBaseModel + { + /// + /// The user's attributes custom to the title. + /// + public MatchmakingPlayerAttributes Attributes; + /// + /// The entity key of the matchmaking user. + /// + public EntityKey Entity; + } + + /// + /// The matchmaking attributes for a user. + /// + [Serializable] + public class MatchmakingPlayerAttributes : PlayFabBaseModel + { + /// + /// A data object representing a user's attributes. + /// + public object DataObject; + /// + /// An escaped data object representing a user's attributes. + /// + public string EscapedDataObject; + } + + /// + /// A player in a created matchmaking match with a team assignment. + /// + [Serializable] + public class MatchmakingPlayerWithTeamAssignment : PlayFabBaseModel + { + /// + /// The user's attributes custom to the title. These attributes will be null unless the request has ReturnMemberAttributes + /// flag set to true. + /// + public MatchmakingPlayerAttributes Attributes; + /// + /// The entity key of the matchmaking user. + /// + public EntityKey Entity; + /// + /// The Id of the team the User is assigned to. + /// + public string TeamId; + } + + [Serializable] + public class MatchmakingQueueConfig : PlayFabBaseModel + { + /// + /// This is the buildAlias that will be used to allocate the multiplayer server for the match. + /// + public BuildAliasParams BuildAliasParams; + /// + /// This is the buildId that will be used to allocate the multiplayer server for the match. + /// + public string BuildId; + /// + /// List of difference rules used to find an optimal match. + /// + public List DifferenceRules; + /// + /// List of match total rules used to find an optimal match. + /// + public List MatchTotalRules; + /// + /// Maximum number of players in a match. + /// + public uint MaxMatchSize; + /// + /// Maximum number of players in a ticket. Optional. + /// + public uint? MaxTicketSize; + /// + /// Minimum number of players in a match. + /// + public uint MinMatchSize; + /// + /// Unique identifier for a Queue. Chosen by the developer. + /// + public string Name; + /// + /// Region selection rule used to find an optimal match. + /// + public RegionSelectionRule RegionSelectionRule; + /// + /// Boolean flag to enable server allocation for the queue. + /// + public bool ServerAllocationEnabled; + /// + /// List of set intersection rules used to find an optimal match. + /// + public List SetIntersectionRules; + /// + /// Controls which statistics are visible to players. + /// + public StatisticsVisibilityToPlayers StatisticsVisibilityToPlayers; + /// + /// List of string equality rules used to find an optimal match. + /// + public List StringEqualityRules; + /// + /// List of team difference rules used to find an optimal match. + /// + public List TeamDifferenceRules; + /// + /// The team configuration for a match. This may be null if there are no teams. + /// + public List Teams; + /// + /// Team size balance rule used to find an optimal match. + /// + public TeamSizeBalanceRule TeamSizeBalanceRule; + /// + /// Team ticket size similarity rule used to find an optimal match. + /// + public TeamTicketSizeSimilarityRule TeamTicketSizeSimilarityRule; + } + + [Serializable] + public class MatchmakingQueueTeam : PlayFabBaseModel + { + /// + /// The maximum number of players required for the team. + /// + public uint MaxTeamSize; + /// + /// The minimum number of players required for the team. + /// + public uint MinTeamSize; + /// + /// A name to identify the team. This is case insensitive. + /// + public string Name; + } + + [Serializable] + public class MatchTotalRule : PlayFabBaseModel + { + /// + /// Description of the attribute used by this rule to match tickets. + /// + public QueueRuleAttribute Attribute; + /// + /// Collection of fields relating to expanding this rule at set intervals. + /// + public MatchTotalRuleExpansion Expansion; + /// + /// The maximum total value for a group. Must be >= Min. + /// + public double Max; + /// + /// The minimum total value for a group. Must be >=2. + /// + public double Min; + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + /// + /// The relative weight of this rule compared to others. + /// + public double Weight; + } + + [Serializable] + public class MatchTotalRuleExpansion : PlayFabBaseModel + { + /// + /// Manually specify the values to use for each expansion interval. When this is set, Max is ignored. + /// + public List MaxOverrides; + /// + /// Manually specify the values to use for each expansion interval. When this is set, Min is ignored. + /// + public List MinOverrides; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + [Serializable] + public class Member : PlayFabBaseModel + { + /// + /// Key-value pairs specific to member. + /// + public Dictionary MemberData; + /// + /// The member entity key. + /// + public EntityKey MemberEntity; + /// + /// Opaque string, stored on a Subscribe call, which indicates the connection an owner or member has with PubSub. + /// + public string PubSubConnectionHandle; + } + + public enum MembershipLock + { + Unlocked, + Locked + } + + [Serializable] + public class MonitoringApplicationConfiguration : PlayFabBaseModel + { + /// + /// Asset which contains the monitoring application files and scripts. + /// + public AssetReference AssetReference; + /// + /// Execution script name, this will be the main executable for the monitoring application. + /// + public string ExecutionScriptName; + /// + /// Installation script name, this will be run before the ExecutionScript. + /// + public string InstallationScriptName; + /// + /// Timespan the monitoring application will be kept alive when running from the start of the VM + /// + public double? OnStartRuntimeInMinutes; + } + + [Serializable] + public class MonitoringApplicationConfigurationParams : PlayFabBaseModel + { + /// + /// Asset which contains the monitoring application files and scripts. + /// + public AssetReferenceParams AssetReference; + /// + /// Execution script name, this will be the main executable for the monitoring application. + /// + public string ExecutionScriptName; + /// + /// Installation script name, this will be run before the ExecutionScript. + /// + public string InstallationScriptName; + /// + /// Timespan the monitoring application will be kept alive when running from the start of the VM + /// + public double? OnStartRuntimeInMinutes; + } + + [Serializable] + public class MultiplayerServerSummary : PlayFabBaseModel + { + /// + /// The connected players in the multiplayer server. + /// + public List ConnectedPlayers; + /// + /// The time (UTC) at which a change in the multiplayer server state was observed. + /// + public DateTime? LastStateTransitionTime; + /// + /// The region the multiplayer server is located in. + /// + public string Region; + /// + /// The string server ID of the multiplayer server generated by PlayFab. + /// + public string ServerId; + /// + /// The title generated guid string session ID of the multiplayer server. + /// + public string SessionId; + /// + /// The state of the multiplayer server. + /// + public string State; + /// + /// The virtual machine ID that the multiplayer server is located on. + /// + public string VmId; + } + + public enum OsPlatform + { + Windows, + Linux + } + + [Serializable] + public class OverrideDouble : PlayFabBaseModel + { + /// + /// The custom expansion value. + /// + public double Value; + } + + [Serializable] + public class OverrideUnsignedInt : PlayFabBaseModel + { + /// + /// The custom expansion value. + /// + public uint Value; + } + + public enum OwnerMigrationPolicy + { + None, + Automatic, + Manual, + Server + } + + [Serializable] + public class PaginationRequest : PlayFabBaseModel + { + /// + /// Continuation token returned as a result in a previous FindLobbies call. Cannot be specified by clients. + /// + public string ContinuationToken; + /// + /// The number of lobbies that should be retrieved. Cannot be specified by servers, clients may specify any value up to 50 + /// + public uint? PageSizeRequested; + } + + [Serializable] + public class PaginationResponse : PlayFabBaseModel + { + /// + /// Continuation token returned by server call. Not returned for clients + /// + public string ContinuationToken; + /// + /// The number of lobbies that matched the search request. + /// + public uint? TotalMatchedLobbyCount; + } + + [Serializable] + public class PartyInvitationConfiguration : PlayFabBaseModel + { + /// + /// The list of PlayFab EntityKeys that the invitation allows to authenticate into the network. If this list is empty, all + /// users are allowed to authenticate using the invitation's identifier. This list may contain no more than 1024 items. + /// + public List EntityKeys; + /// + /// The invite identifier for this party. If this value is specified, it must be no longer than 127 characters. + /// + public string Identifier; + /// + /// Controls which participants can revoke this invite. + /// + public string Revocability; + } + + public enum PartyInvitationRevocability + { + Creator, + Anyone + } + + [Serializable] + public class PartyNetworkConfiguration : PlayFabBaseModel + { + /// + /// Controls whether and how to support direct peer-to-peer connection attempts among devices in the network. + /// + public string DirectPeerConnectivityOptions; + /// + /// The maximum number of devices allowed to connect to the network. Must be between 1 and 128, inclusive. + /// + public uint MaxDevices; + /// + /// The maximum number of devices allowed per user. Must be greater than 0. + /// + public uint MaxDevicesPerUser; + /// + /// The maximum number of endpoints allowed per device. Must be between 0 and 32, inclusive. + /// + public uint MaxEndpointsPerDevice; + /// + /// The maximum number of unique users allowed in the network. Must be greater than 0. + /// + public uint MaxUsers; + /// + /// The maximum number of users allowed per device. Must be between 1 and 8, inclusive. + /// + public uint MaxUsersPerDevice; + /// + /// An optionally-specified configuration for the initial invitation for this party. If not provided, default configuration + /// values will be used: a title-unique invitation identifier will be generated, the revocability will be Anyone, and the + /// EntityID list will be empty. + /// + public PartyInvitationConfiguration PartyInvitationConfiguration; + } + + [Serializable] + public class Port : PlayFabBaseModel + { + /// + /// The name for the port. + /// + public string Name; + /// + /// The number for the port. + /// + public int Num; + /// + /// The protocol for the port. + /// + public ProtocolType Protocol; + } + + public enum ProtocolType + { + TCP, + UDP + } + + [Serializable] + public class PublicIpAddress : PlayFabBaseModel + { + /// + /// FQDN of the public IP + /// + public string FQDN; + /// + /// Server IP Address + /// + public string IpAddress; + /// + /// Routing Type of the public IP. + /// + public string RoutingType; + } + + [Serializable] + public class QosServer : PlayFabBaseModel + { + /// + /// The region the QoS server is located in. + /// + public string Region; + /// + /// The QoS server URL. + /// + public string ServerUrl; + } + + [Serializable] + public class QueueRuleAttribute : PlayFabBaseModel + { + /// + /// Specifies which attribute in a ticket to use. + /// + public string Path; + /// + /// Specifies which source the attribute comes from. + /// + public AttributeSource Source; + } + + [Serializable] + public class QuotaChange : PlayFabBaseModel + { + /// + /// A brief description of the requested changes. + /// + public string ChangeDescription; + /// + /// Requested changes to make to the titles cores quota. + /// + public List Changes; + /// + /// Whether or not this request is pending a review. + /// + public bool IsPendingReview; + /// + /// Additional information about this request that our team can use to better understand the requirements. + /// + public string Notes; + /// + /// Id of the change request. + /// + public string RequestId; + /// + /// Comments by our team when a request is reviewed. + /// + public string ReviewComments; + /// + /// Whether or not this request was approved. + /// + public bool WasApproved; + } + + [Serializable] + public class RegionSelectionRule : PlayFabBaseModel + { + /// + /// Controls how the Max Latency parameter expands over time. Only one expansion can be set per rule. When this is set, + /// MaxLatency is ignored. + /// + public CustomRegionSelectionRuleExpansion CustomExpansion; + /// + /// Controls how the Max Latency parameter expands over time. Only one expansion can be set per rule. + /// + public LinearRegionSelectionRuleExpansion LinearExpansion; + /// + /// Specifies the maximum latency that is allowed between the client and the selected server. The value is in milliseconds. + /// + public uint MaxLatency; + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// Specifies which attribute in a ticket to use. + /// + public string Path; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + /// + /// The relative weight of this rule compared to others. + /// + public double Weight; + } + + /// + /// Deletes the configuration for a queue. This will permanently delete the configuration and players will no longer be able + /// to match in the queue. All outstanding matchmaking tickets will be cancelled. + /// + [Serializable] + public class RemoveMatchmakingQueueRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The Id of the matchmaking queue to remove. + /// + public string QueueName; + } + + [Serializable] + public class RemoveMatchmakingQueueResult : PlayFabResultCommon + { + } + + /// + /// Request to remove a member from a lobby. Owners may remove other members from a lobby. Members cannot remove themselves + /// (use LeaveLobby instead). + /// + [Serializable] + public class RemoveMemberFromLobbyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The id of the lobby. + /// + public string LobbyId; + /// + /// The member entity to be removed from the lobby. + /// + public EntityKey MemberEntity; + /// + /// If true, removed member can never rejoin this lobby. + /// + public bool PreventRejoin; + } + + /// + /// Requests a multiplayer server session from a particular build in any of the given preferred regions. + /// + [Serializable] + public class RequestMultiplayerServerRequest : PlayFabRequestCommon + { + /// + /// The identifiers of the build alias to use for the request. + /// + public BuildAliasParams BuildAliasParams; + /// + /// The guid string build ID of the multiplayer server to request. + /// + public string BuildId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Initial list of players (potentially matchmade) allowed to connect to the game. This list is passed to the game server + /// when requested (via GSDK) and can be used to validate players connecting to it. + /// + public List InitialPlayers; + /// + /// The preferred regions to request a multiplayer server from. The Multiplayer Service will iterate through the regions in + /// the specified order and allocate a server from the first one that has servers available. + /// + public List PreferredRegions; + /// + /// Data encoded as a string that is passed to the game server when requested. This can be used to to communicate + /// information such as game mode or map through the request flow. + /// + public string SessionCookie; + /// + /// A guid string session ID created track the multiplayer server session over its life. + /// + public string SessionId; + } + + [Serializable] + public class RequestMultiplayerServerResponse : PlayFabResultCommon + { + /// + /// The identity of the build in which the server was allocated. + /// + public string BuildId; + /// + /// The connected players in the multiplayer server. + /// + public List ConnectedPlayers; + /// + /// The fully qualified domain name of the virtual machine that is hosting this multiplayer server. + /// + public string FQDN; + /// + /// The public IPv4 address of the virtual machine that is hosting this multiplayer server. + /// + public string IPV4Address; + /// + /// The time (UTC) at which a change in the multiplayer server state was observed. + /// + public DateTime? LastStateTransitionTime; + /// + /// The ports the multiplayer server uses. + /// + public List Ports; + /// + /// The list of public Ipv4 addresses associated with the server. + /// + public List PublicIPV4Addresses; + /// + /// The region the multiplayer server is located in. + /// + public string Region; + /// + /// The string server ID of the multiplayer server generated by PlayFab. + /// + public string ServerId; + /// + /// The guid string session ID of the multiplayer server. + /// + public string SessionId; + /// + /// The state of the multiplayer server. + /// + public string State; + /// + /// The virtual machine ID that the multiplayer server is located on. + /// + public string VmId; + } + + /// + /// Requests a party session from a particular set of builds if build alias params is provided, in any of the given + /// preferred regions. + /// + [Serializable] + public class RequestPartyServiceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The network configuration for this request. + /// + public PartyNetworkConfiguration NetworkConfiguration; + /// + /// A guid string party ID created track the party session over its life. + /// + public string PartyId; + /// + /// The preferred regions to request a party session from. The party service will iterate through the regions in the + /// specified order and allocate a party session from the first one that is available. + /// + public List PreferredRegions; + } + + [Serializable] + public class RequestPartyServiceResponse : PlayFabResultCommon + { + /// + /// The invitation identifier supplied in the PartyInvitationConfiguration, or the PlayFab-generated guid if none was + /// supplied. + /// + public string InvitationId; + /// + /// The guid string party ID of the party session. + /// + public string PartyId; + /// + /// A base-64 encoded string containing the serialized network descriptor for this party. + /// + public string SerializedNetworkDescriptor; + } + + /// + /// Gets new credentials to the container registry where game developers can upload custom container images to before + /// creating a new build. + /// + [Serializable] + public class RolloverContainerRegistryCredentialsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class RolloverContainerRegistryCredentialsResponse : PlayFabResultCommon + { + /// + /// The url of the container registry. + /// + public string DnsName; + /// + /// The password for accessing the container registry. + /// + public string Password; + /// + /// The username for accessing the container registry. + /// + public string Username; + } + + public enum RoutingType + { + Microsoft, + Internet + } + + [Serializable] + public class Schedule : PlayFabBaseModel + { + /// + /// A short description about this schedule. For example, "Game launch on July 15th". + /// + public string Description; + /// + /// The date and time in UTC at which the schedule ends. If IsRecurringWeekly is true, this schedule will keep renewing for + /// future weeks until disabled or removed. + /// + public DateTime EndTime; + /// + /// Disables the schedule. + /// + public bool IsDisabled; + /// + /// If true, the StartTime and EndTime will get renewed every week. + /// + public bool IsRecurringWeekly; + /// + /// The date and time in UTC at which the schedule starts. + /// + public DateTime StartTime; + /// + /// The standby target to maintain for the duration of the schedule. + /// + public int TargetStandby; + } + + [Serializable] + public class ScheduledStandbySettings : PlayFabBaseModel + { + /// + /// When true, scheduled standby will be enabled + /// + public bool IsEnabled; + /// + /// A list of non-overlapping schedules + /// + public List ScheduleList; + } + + [Serializable] + public class Secret : PlayFabBaseModel + { + /// + /// Optional secret expiration date. + /// + public DateTime? ExpirationDate; + /// + /// A name for the secret. This is used to reference secrets in build configurations. + /// + public string Name; + /// + /// Secret value. + /// + public string Value; + } + + [Serializable] + public class SecretSummary : PlayFabBaseModel + { + /// + /// Optional secret expiration date. + /// + public DateTime? ExpirationDate; + /// + /// The name of the secret. + /// + public string Name; + /// + /// The secret version auto-generated after upload. + /// + public string Version; + } + + [Serializable] + public class ServerDetails : PlayFabBaseModel + { + /// + /// The fully qualified domain name of the virtual machine that is hosting this multiplayer server. + /// + public string Fqdn; + /// + /// The IPv4 address of the virtual machine that is hosting this multiplayer server. + /// + public string IPV4Address; + /// + /// The ports the multiplayer server uses. + /// + public List Ports; + /// + /// The server's region. + /// + public string Region; + /// + /// The string server ID of the multiplayer server generated by PlayFab. + /// + public string ServerId; + } + + [Serializable] + public class ServerResourceConstraintParams : PlayFabBaseModel + { + /// + /// The maximum number of cores that each server is allowed to use. + /// + public double CpuLimit; + /// + /// The maximum number of GiB of memory that each server is allowed to use. WARNING: After exceeding this limit, the server + /// will be killed + /// + public double MemoryLimitGB; + } + + public enum ServerType + { + Container, + Process + } + + [Serializable] + public class SetIntersectionRule : PlayFabBaseModel + { + /// + /// Description of the attribute used by this rule to match tickets. + /// + public QueueRuleAttribute Attribute; + /// + /// Describes the behavior when an attribute is not specified in the ticket creation request or in the user's entity + /// profile. + /// + public AttributeNotSpecifiedBehavior AttributeNotSpecifiedBehavior; + /// + /// Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. When this + /// is set, MinIntersectionSize is ignored. + /// + public CustomSetIntersectionRuleExpansion CustomExpansion; + /// + /// The default value assigned to tickets that are missing the attribute specified by AttributePath (assuming that + /// AttributeNotSpecifiedBehavior is UseDefault). Values must be unique. + /// + public List DefaultAttributeValue; + /// + /// Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. + /// + public LinearSetIntersectionRuleExpansion LinearExpansion; + /// + /// The minimum number of values that must match between sets. + /// + public uint MinIntersectionSize; + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + /// + /// The relative weight of this rule compared to others. + /// + public double Weight; + } + + /// + /// Use this API to create or update matchmaking queue configurations. The queue configuration defines the matchmaking + /// rules. The matchmaking service will match tickets together according to the configured rules. Queue resources are not + /// spun up by calling this API. Queues are created when the first ticket is submitted. + /// + [Serializable] + public class SetMatchmakingQueueRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The matchmaking queue config. + /// + public MatchmakingQueueConfig MatchmakingQueue; + } + + [Serializable] + public class SetMatchmakingQueueResult : PlayFabResultCommon + { + } + + /// + /// Executes the shutdown callback from the GSDK and terminates the multiplayer server session. The callback in the GSDK + /// will allow for graceful shutdown with a 15 minute timeoutIf graceful shutdown has not been completed before 15 minutes + /// have elapsed, the multiplayer server session will be forcefully terminated on it's own. + /// + [Serializable] + public class ShutdownMultiplayerServerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// A guid string session ID of the multiplayer server to shut down. + /// + public string SessionId; + } + + [Serializable] + public class Statistics : PlayFabBaseModel + { + /// + /// The average. + /// + public double Average; + /// + /// The 50th percentile. + /// + public double Percentile50; + /// + /// The 90th percentile. + /// + public double Percentile90; + /// + /// The 99th percentile. + /// + public double Percentile99; + } + + [Serializable] + public class StatisticsVisibilityToPlayers : PlayFabBaseModel + { + /// + /// Whether to allow players to view the current number of players in the matchmaking queue. + /// + public bool ShowNumberOfPlayersMatching; + /// + /// Whether to allow players to view statistics representing the time it takes for tickets to find a match. + /// + public bool ShowTimeToMatch; + } + + [Serializable] + public class StringEqualityRule : PlayFabBaseModel + { + /// + /// Description of the attribute used by this rule to match tickets. + /// + public QueueRuleAttribute Attribute; + /// + /// Describes the behavior when an attribute is not specified in the ticket creation request or in the user's entity + /// profile. + /// + public AttributeNotSpecifiedBehavior AttributeNotSpecifiedBehavior; + /// + /// The default value assigned to tickets that are missing the attribute specified by AttributePath (assuming that + /// AttributeNotSpecifiedBehavior is false). + /// + public string DefaultAttributeValue; + /// + /// Collection of fields relating to expanding this rule at set intervals. For StringEqualityRules, this is limited to + /// turning the rule off or on during different intervals. + /// + public StringEqualityRuleExpansion Expansion; + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + /// + /// The relative weight of this rule compared to others. + /// + public double Weight; + } + + [Serializable] + public class StringEqualityRuleExpansion : PlayFabBaseModel + { + /// + /// List of bools specifying whether the rule is applied during this expansion. + /// + public List EnabledOverrides; + /// + /// How many seconds before this rule is expanded. + /// + public uint SecondsBetweenExpansions; + } + + /// + /// Request to subscribe to lobby resource notifications. + /// + [Serializable] + public class SubscribeToLobbyResourceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity performing the subscription. + /// + public EntityKey EntityKey; + /// + /// Opaque string, given to a client upon creating a connection with PubSub. + /// + public string PubSubConnectionHandle; + /// + /// The name of the resource to subscribe to. + /// + public string ResourceId; + /// + /// Version number for the subscription of this resource. + /// + public uint SubscriptionVersion; + /// + /// Subscription type. + /// + public SubscriptionType Type; + } + + [Serializable] + public class SubscribeToLobbyResourceResult : PlayFabResultCommon + { + /// + /// Topic will be returned in all notifications that are the result of this subscription. + /// + public string Topic; + } + + /// + /// Subscribe to match resource notifications. Match subscriptions have two types; MatchInvite and MatchTicketStatusChange + /// + [Serializable] + public class SubscribeToMatchResourceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity performing the subscription. The entity must be authorized to use this connectionHandle. + /// + public EntityKey EntityKey; + /// + /// Opaque string, given to a client upon creating a connection with PubSub. Notifications will be sent to the connection + /// associated with this handle. + /// + public string PubSubConnectionHandle; + /// + /// The name of the resource to subscribe to. It follows the format {queueName}|{ticketId} for MatchTicketStatusChange. For + /// MatchInvite, ResourceId is @me. + /// + public string ResourceId; + /// + /// Version number for the subscription of this resource. Current supported version must be 1. + /// + public uint SubscriptionVersion; + /// + /// Subscription type. MatchInvite subscriptions are per-player. MatchTicketStatusChange subscriptions are per-ticket. + /// Subscribe calls are idempotent. Subscribing on the same resource for the same connection results in success. + /// + public string Type; + } + + [Serializable] + public class SubscribeToMatchResourceResult : PlayFabResultCommon + { + /// + /// Matchmaking resource + /// + public string Topic; + } + + public enum SubscriptionType + { + LobbyChange, + LobbyInvite + } + + [Serializable] + public class TeamDifferenceRule : PlayFabBaseModel + { + /// + /// Description of the attribute used by this rule to match teams. + /// + public QueueRuleAttribute Attribute; + /// + /// Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. When this + /// is set, Difference is ignored. + /// + public CustomTeamDifferenceRuleExpansion CustomExpansion; + /// + /// The default value assigned to tickets that are missing the attribute specified by AttributePath (assuming that + /// AttributeNotSpecifiedBehavior is false). + /// + public double DefaultAttributeValue; + /// + /// The allowed difference between any two teams at the start of matchmaking. + /// + public double Difference; + /// + /// Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. + /// + public LinearTeamDifferenceRuleExpansion LinearExpansion; + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + } + + [Serializable] + public class TeamSizeBalanceRule : PlayFabBaseModel + { + /// + /// Controls how the Difference parameter expands over time. Only one expansion can be set per rule. When this is set, + /// Difference is ignored. + /// + public CustomTeamSizeBalanceRuleExpansion CustomExpansion; + /// + /// The allowed difference in team size between any two teams. + /// + public uint Difference; + /// + /// Controls how the Difference parameter expands over time. Only one expansion can be set per rule. + /// + public LinearTeamSizeBalanceRuleExpansion LinearExpansion; + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + } + + [Serializable] + public class TeamTicketSizeSimilarityRule : PlayFabBaseModel + { + /// + /// Friendly name chosen by developer. + /// + public string Name; + /// + /// How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be + /// prioritized over those that don't). Leave blank if this rule is always enforced. + /// + public uint? SecondsUntilOptional; + } + + public enum TitleMultiplayerServerEnabledStatus + { + Initializing, + Enabled, + Disabled + } + + [Serializable] + public class TitleMultiplayerServersQuotas : PlayFabBaseModel + { + /// + /// The core capacity for the various regions and VM Family + /// + public List CoreCapacities; + } + + /// + /// Request to unsubscribe from lobby notifications. + /// + [Serializable] + public class UnsubscribeFromLobbyResourceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity which performed the subscription. + /// + public EntityKey EntityKey; + /// + /// Opaque string, given to a client upon creating a connection with PubSub. + /// + public string PubSubConnectionHandle; + /// + /// The name of the resource to unsubscribe from. + /// + public string ResourceId; + /// + /// Version number passed for the subscription of this resource. + /// + public uint SubscriptionVersion; + /// + /// Subscription type. + /// + public SubscriptionType Type; + } + + /// + /// Unsubscribe from a Match resource's notifications. For MatchInvite, players are expected to unsubscribe once they can no + /// longer accept invites. For MatchTicketStatusChange, players are expected to unsusbcribe once the ticket has reached a + /// canceled or matched state. + /// + [Serializable] + public class UnsubscribeFromMatchResourceRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity performing the unsubscription. The entity must be authorized to use this connectionHandle. + /// + public EntityKey EntityKey; + /// + /// Opaque string, given to a client upon creating a connection with PubSub. + /// + public string PubSubConnectionHandle; + /// + /// The name of the resource to unsubscribe from. It follows the format {queueName}|{ticketId} for MatchTicketStatusChange. + /// For MatchInvite, ResourceId is @me. + /// + public string ResourceId; + /// + /// Version number for the unsubscription from this resource. + /// + public uint SubscriptionVersion; + /// + /// Type of the subscription to be canceled. + /// + public string Type; + } + + [Serializable] + public class UnsubscribeFromMatchResourceResult : PlayFabResultCommon + { + } + + /// + /// Removes the specified tag from the image. After this operation, a 'docker pull' will fail for the specified image and + /// tag combination. Morever, ListContainerImageTags will not return the specified tag. + /// + [Serializable] + public class UntagContainerImageRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The container image which tag we want to remove. + /// + public string ImageName; + /// + /// The tag we want to remove. + /// + public string Tag; + } + + /// + /// Creates a multiplayer server build alias and returns the created alias. + /// + [Serializable] + public class UpdateBuildAliasRequest : PlayFabRequestCommon + { + /// + /// The guid string alias Id of the alias to be updated. + /// + public string AliasId; + /// + /// The alias name. + /// + public string AliasName; + /// + /// Array of build selection criteria. + /// + public List BuildSelectionCriteria; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Updates a multiplayer server build's name. + /// + [Serializable] + public class UpdateBuildNameRequest : PlayFabRequestCommon + { + /// + /// The guid string ID of the build we want to update the name of. + /// + public string BuildId; + /// + /// The build name. + /// + public string BuildName; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Updates a multiplayer server build's region. + /// + [Serializable] + public class UpdateBuildRegionRequest : PlayFabRequestCommon + { + /// + /// The guid string ID of the build we want to update regions for. + /// + public string BuildId; + /// + /// The updated region configuration that should be applied to the specified build. + /// + public BuildRegionParams BuildRegion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Updates a multiplayer server build's regions. + /// + [Serializable] + public class UpdateBuildRegionsRequest : PlayFabRequestCommon + { + /// + /// The guid string ID of the build we want to update regions for. + /// + public string BuildId; + /// + /// The updated region configuration that should be applied to the specified build. + /// + public List BuildRegions; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + /// + /// Preview: Request to update the serverData and serverEntity in case of migration. Only a game_server entity can update + /// this information and this is restricted to client owned lobbies which are using connections. + /// + [Serializable] + public class UpdateLobbyAsServerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The id of the lobby. + /// + public string LobbyId; + /// + /// The private key-value pairs which are visible to all entities in the lobby and modifiable by the joined server. + /// Optional. Sets or updates key-value pairs on the lobby. Only the current lobby lobby server can set serverData. Keys may + /// be an arbitrary string of at most 30 characters. The total size of all serverData values may not exceed 4096 bytes. + /// Values are not individually limited. There can be up to 30 key-value pairs stored here. Keys are case sensitive. + /// + public Dictionary ServerData; + /// + /// The keys to delete from the lobby serverData. Optional. Optional. Deletes key-value pairs on the lobby. Only the current + /// joined lobby server can delete serverData. All the specified keys will be removed from the serverData. Keys that do not + /// exist in the lobby are a no-op. If the key to delete exists in the serverData (same request) it will result in a bad + /// request. + /// + public List ServerDataToDelete; + /// + /// The lobby server. Optional. Set a different server as the joined server of the lobby (there can only be 1 joined + /// server). When changing the server the previous server will automatically be unsubscribed. + /// + public EntityKey ServerEntity; + } + + /// + /// Request to update a lobby. + /// + [Serializable] + public class UpdateLobbyRequest : PlayFabRequestCommon + { + /// + /// The policy indicating who is allowed to join the lobby, and the visibility to queries. May be 'Public', 'Friends' or + /// 'Private'. Public means the lobby is both visible in queries and any player may join, including invited players. Friends + /// means that users who are bidirectional friends of members in the lobby may search to find friend lobbies, to retrieve + /// its connection string. Private means the lobby is not visible in queries, and a player must receive an invitation to + /// join. Defaults to 'Public' on creation. Can only be changed by the lobby owner. + /// + public AccessPolicy? AccessPolicy; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The private key-value pairs which are visible to all entities in the lobby. Optional. Sets or updates key-value pairs on + /// the lobby. Only the current lobby owner can set lobby data. Keys may be an arbitrary string of at most 30 characters. + /// The total size of all lobbyData values may not exceed 4096 bytes. Values are not individually limited. There can be up + /// to 30 key-value pairs stored here. Keys are case sensitive. + /// + public Dictionary LobbyData; + /// + /// The keys to delete from the lobby LobbyData. Optional. Behaves similar to searchDataToDelete, but applies to lobbyData. + /// + public List LobbyDataToDelete; + /// + /// The id of the lobby. + /// + public string LobbyId; + /// + /// The maximum number of players allowed in the lobby. Updates the maximum allowed number of players in the lobby. Only the + /// current lobby owner can set this. If set, the value must be greater than or equal to the number of members currently in + /// the lobby. + /// + public uint? MaxPlayers; + /// + /// The private key-value pairs used by the member to communicate information to other members and the owner. Optional. Sets + /// or updates new key-value pairs on the caller's member data. New keys will be added with their values and existing keys + /// will be updated with the new values. Visible to all entities in the lobby. At most 30 key-value pairs may be stored + /// here, keys are limited to 30 characters and values to 1000. The total size of all memberData values may not exceed 4096 + /// bytes. Keys are case sensitive. Servers cannot specifiy this. + /// + public Dictionary MemberData; + /// + /// The keys to delete from the lobby MemberData. Optional. Deletes key-value pairs on the caller's member data. All the + /// specified keys will be removed from the caller's member data. Keys that do not exist are a no-op. If the key to delete + /// exists in the memberData (same request) it will result in a bad request. Servers cannot specifiy this. + /// + public List MemberDataToDelete; + /// + /// The member entity whose data is being modified. Servers cannot specify this. + /// + public EntityKey MemberEntity; + /// + /// A setting indicating whether the lobby is locked. May be 'Unlocked' or 'Locked'. When Locked new members are not allowed + /// to join. Defaults to 'Unlocked' on creation. Can only be changed by the lobby owner. + /// + public MembershipLock? MembershipLock; + /// + /// The lobby owner. Optional. Set to transfer ownership of the lobby. If client - owned and 'Automatic' - The Lobby service + /// will automatically assign another connected owner when the current owner leaves or disconnects. useConnections must be + /// true. If client - owned and 'Manual' - Ownership is protected as long as the current owner is connected. If the current + /// owner leaves or disconnects any member may set themselves as the current owner. The useConnections property must be + /// true. If client-owned and 'None' - Any member can set ownership. The useConnections property can be either true or + /// false. For all client-owned lobbies when the owner leaves and a new owner can not be automatically selected - The owner + /// field is set to null. For all client-owned lobbies when the owner disconnects and a new owner can not be automatically + /// selected - The owner field remains unchanged and the current owner retains all owner abilities for the lobby. If + /// server-owned (must be 'Server') - Any server can set ownership. The useConnections property must be true. + /// + public EntityKey Owner; + /// + /// The public key-value pairs which allow queries to differentiate between lobbies. Optional. Sets or updates key-value + /// pairs on the lobby for use with queries. Only the current lobby owner can set search data. New keys will be added with + /// their values and existing keys will be updated with the new values. There can be up to 30 key-value pairs stored here. + /// Keys are of the format string_key1, string_key2... string_key30 for string values, or number_key1, number_key2, ... + /// number_key30 for numeric values. Numeric values are floats. Values can be at most 256 characters long. The total size of + /// all searchData values may not exceed 1024 bytes.Keys are case sensitive. + /// + public Dictionary SearchData; + /// + /// The keys to delete from the lobby SearchData. Optional. Deletes key-value pairs on the lobby. Only the current lobby + /// owner can delete search data. All the specified keys will be removed from the search data. Keys that do not exist in the + /// lobby are a no-op.If the key to delete exists in the searchData (same request) it will result in a bad request. + /// + public List SearchDataToDelete; + } + + /// + /// Uploads a multiplayer server game certificate. + /// + [Serializable] + public class UploadCertificateRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Forces the certificate renewal if the certificate already exists. Default is false + /// + public bool? ForceUpdate; + /// + /// The game certificate to upload. + /// + public Certificate GameCertificate; + } + + /// + /// Uploads a multiplayer server game secret. + /// + [Serializable] + public class UploadSecretRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Forces the secret renewal if the secret already exists. Default is false + /// + public bool? ForceUpdate; + /// + /// The game secret to add. + /// + public Secret GameSecret; + } + + [Serializable] + public class VirtualMachineSummary : PlayFabBaseModel + { + /// + /// The virtual machine health status. + /// + public string HealthStatus; + /// + /// The virtual machine state. + /// + public string State; + /// + /// The virtual machine ID. + /// + public string VmId; + } + + [Serializable] + public class VmStartupScriptConfiguration : PlayFabBaseModel + { + /// + /// Optional port requests (name/protocol) that will be used by the VmStartupScript. Max of 5 requests. + /// + public List PortRequests; + /// + /// Asset which contains the VmStartupScript script and any other required files. + /// + public AssetReference VmStartupScriptAssetReference; + } + + [Serializable] + public class VmStartupScriptParams : PlayFabBaseModel + { + /// + /// Optional port requests (name/protocol) that will be used by the VmStartupScript. Max of 5 requests. + /// + public List PortRequests; + /// + /// Asset which contains the VmStartupScript script and any other required files. + /// + public AssetReferenceParams VmStartupScriptAssetReference; + } + + [Serializable] + public class VmStartupScriptPortRequest : PlayFabBaseModel + { + /// + /// The name for the port. + /// + public string Name; + /// + /// The protocol for the port. + /// + public ProtocolType Protocol; + } + + [Serializable] + public class VmStartupScriptPortRequestParams : PlayFabBaseModel + { + /// + /// The name for the port. + /// + public string Name; + /// + /// The protocol for the port. + /// + public ProtocolType Protocol; + } + + [Serializable] + public class WindowsCrashDumpConfiguration : PlayFabBaseModel + { + /// + /// See https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps for valid values. + /// + public int? CustomDumpFlags; + /// + /// See https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps for valid values. + /// + public int? DumpType; + /// + /// Designates whether automatic crash dump capturing will be enabled for this Build. + /// + public bool IsEnabled; + } +} +#endif diff --git a/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerModels.cs.meta b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerModels.cs.meta new file mode 100644 index 00000000..f6ca95fd --- /dev/null +++ b/Assets/PlayFabSDK/Multiplayer/PlayFabMultiplayerModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c9c53dd06e97f414cafc09e35d9f24aa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/PlayFab.asmdef b/Assets/PlayFabSDK/PlayFab.asmdef new file mode 100644 index 00000000..bb74f7cb --- /dev/null +++ b/Assets/PlayFabSDK/PlayFab.asmdef @@ -0,0 +1,12 @@ +{ + "name": "PlayFab", + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +} \ No newline at end of file diff --git a/Assets/PlayFabSDK/PlayFab.asmdef.meta b/Assets/PlayFabSDK/PlayFab.asmdef.meta new file mode 100644 index 00000000..e1a45097 --- /dev/null +++ b/Assets/PlayFabSDK/PlayFab.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0da6d172d18a54e4389d0dce1e1ffdf2 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Profiles.meta b/Assets/PlayFabSDK/Profiles.meta new file mode 100644 index 00000000..cd65838d --- /dev/null +++ b/Assets/PlayFabSDK/Profiles.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb038585995bfe148853edfdae25b48c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Profiles/PlayFabEvents.cs b/Assets/PlayFabSDK/Profiles/PlayFabEvents.cs new file mode 100644 index 00000000..069ee41a --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabEvents.cs @@ -0,0 +1,28 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.ProfilesModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnProfilesGetGlobalPolicyRequestEvent; + public event PlayFabResultEvent OnProfilesGetGlobalPolicyResultEvent; + public event PlayFabRequestEvent OnProfilesGetProfileRequestEvent; + public event PlayFabResultEvent OnProfilesGetProfileResultEvent; + public event PlayFabRequestEvent OnProfilesGetProfilesRequestEvent; + public event PlayFabResultEvent OnProfilesGetProfilesResultEvent; + public event PlayFabRequestEvent OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsRequestEvent; + public event PlayFabResultEvent OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsResultEvent; + public event PlayFabRequestEvent OnProfilesGetTitlePlayersFromXboxLiveIDsRequestEvent; + public event PlayFabResultEvent OnProfilesGetTitlePlayersFromXboxLiveIDsResultEvent; + public event PlayFabRequestEvent OnProfilesSetDisplayNameRequestEvent; + public event PlayFabResultEvent OnProfilesSetDisplayNameResultEvent; + public event PlayFabRequestEvent OnProfilesSetGlobalPolicyRequestEvent; + public event PlayFabResultEvent OnProfilesSetGlobalPolicyResultEvent; + public event PlayFabRequestEvent OnProfilesSetProfileLanguageRequestEvent; + public event PlayFabResultEvent OnProfilesSetProfileLanguageResultEvent; + public event PlayFabRequestEvent OnProfilesSetProfilePolicyRequestEvent; + public event PlayFabResultEvent OnProfilesSetProfilePolicyResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Profiles/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Profiles/PlayFabEvents.cs.meta new file mode 100644 index 00000000..7b89c240 --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 108a292bd382f6c4a88576ed2173cb93 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Profiles/PlayFabProfilesAPI.cs b/Assets/PlayFabSDK/Profiles/PlayFabProfilesAPI.cs new file mode 100644 index 00000000..aec3d21d --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabProfilesAPI.cs @@ -0,0 +1,158 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.ProfilesModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// All PlayFab entities have profiles, which hold top-level properties about the entity. These APIs give you the tools + /// needed to manage entity profiles. + /// + public static class PlayFabProfilesAPI + { + static PlayFabProfilesAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Gets the global title access policy + /// + public static void GetGlobalPolicy(GetGlobalPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/GetGlobalPolicy", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the entity's profile. + /// + public static void GetProfile(GetEntityProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/GetProfile", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the entity's profile. + /// + public static void GetProfiles(GetEntityProfilesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/GetProfiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title player accounts associated with the given master player account. + /// + public static void GetTitlePlayersFromMasterPlayerAccountIds(GetTitlePlayersFromMasterPlayerAccountIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/GetTitlePlayersFromMasterPlayerAccountIds", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title player accounts associated with the given XUIDs. + /// + public static void GetTitlePlayersFromXboxLiveIDs(GetTitlePlayersFromXboxLiveIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/GetTitlePlayersFromXboxLiveIDs", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update the display name of the entity + /// + public static void SetDisplayName(SetDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/SetDisplayName", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the global title access policy + /// + public static void SetGlobalPolicy(SetGlobalPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/SetGlobalPolicy", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account + /// language, Master Player Account language, and then title default language if the first two aren't set or supported. + /// + public static void SetProfileLanguage(SetProfileLanguageRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/SetProfileLanguage", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the profiles access policy + /// + public static void SetProfilePolicy(SetEntityProfilePolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Profile/SetProfilePolicy", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Profiles/PlayFabProfilesAPI.cs.meta b/Assets/PlayFabSDK/Profiles/PlayFabProfilesAPI.cs.meta new file mode 100644 index 00000000..eb3d8cb1 --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabProfilesAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 04039b10ae9eebd46a8c4a5b401ea567 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Profiles/PlayFabProfilesInstanceAPI.cs b/Assets/PlayFabSDK/Profiles/PlayFabProfilesInstanceAPI.cs new file mode 100644 index 00000000..d332f6f4 --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabProfilesInstanceAPI.cs @@ -0,0 +1,158 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.ProfilesModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// All PlayFab entities have profiles, which hold top-level properties about the entity. These APIs give you the tools + /// needed to manage entity profiles. + /// + public class PlayFabProfilesInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabProfilesInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabProfilesInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Gets the global title access policy + /// + public void GetGlobalPolicy(GetGlobalPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/GetGlobalPolicy", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the entity's profile. + /// + public void GetProfile(GetEntityProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/GetProfile", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the entity's profile. + /// + public void GetProfiles(GetEntityProfilesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/GetProfiles", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title player accounts associated with the given master player account. + /// + public void GetTitlePlayersFromMasterPlayerAccountIds(GetTitlePlayersFromMasterPlayerAccountIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/GetTitlePlayersFromMasterPlayerAccountIds", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title player accounts associated with the given XUIDs. + /// + public void GetTitlePlayersFromXboxLiveIDs(GetTitlePlayersFromXboxLiveIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/GetTitlePlayersFromXboxLiveIDs", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update the display name of the entity + /// + public void SetDisplayName(SetDisplayNameRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/SetDisplayName", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the global title access policy + /// + public void SetGlobalPolicy(SetGlobalPolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/SetGlobalPolicy", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account + /// language, Master Player Account language, and then title default language if the first two aren't set or supported. + /// + public void SetProfileLanguage(SetProfileLanguageRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/SetProfileLanguage", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the profiles access policy + /// + public void SetProfilePolicy(SetEntityProfilePolicyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Profile/SetProfilePolicy", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Profiles/PlayFabProfilesInstanceAPI.cs.meta b/Assets/PlayFabSDK/Profiles/PlayFabProfilesInstanceAPI.cs.meta new file mode 100644 index 00000000..ffd238a7 --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabProfilesInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef2cfc8d3e49a7e479e1fe8c2cf18478 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Profiles/PlayFabProfilesModels.cs b/Assets/PlayFabSDK/Profiles/PlayFabProfilesModels.cs new file mode 100644 index 00000000..76cebbbd --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabProfilesModels.cs @@ -0,0 +1,508 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.ProfilesModels +{ + public enum EffectType + { + Allow, + Deny + } + + /// + /// An entity object and its associated meta data. + /// + [Serializable] + public class EntityDataObject : PlayFabBaseModel + { + /// + /// Un-escaped JSON object, if DataAsObject is true. + /// + public object DataObject; + /// + /// Escaped string JSON body of the object, if DataAsObject is default or false. + /// + public string EscapedDataObject; + /// + /// Name of this object. + /// + public string ObjectName; + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EntityLineage : PlayFabBaseModel + { + /// + /// The Character Id of the associated entity. + /// + public string CharacterId; + /// + /// The Group Id of the associated entity. + /// + public string GroupId; + /// + /// The Master Player Account Id of the associated entity. + /// + public string MasterPlayerAccountId; + /// + /// The Namespace Id of the associated entity. + /// + public string NamespaceId; + /// + /// The Title Id of the associated entity. + /// + public string TitleId; + /// + /// The Title Player Account Id of the associated entity. + /// + public string TitlePlayerAccountId; + } + + [Serializable] + public class EntityPermissionStatement : PlayFabBaseModel + { + /// + /// The action this statement effects. May be 'Read', 'Write' or '*' for both read and write. + /// + public string Action; + /// + /// A comment about the statement. Intended solely for bookkeeping and debugging. + /// + public string Comment; + /// + /// Additional conditions to be applied for entity resources. + /// + public object Condition; + /// + /// The effect this statement will have. It may be either Allow or Deny + /// + public EffectType Effect; + /// + /// The principal this statement will effect. + /// + public object Principal; + /// + /// The resource this statements effects. Similar to 'pfrn:data--title![Title ID]/Profile/*' + /// + public string Resource; + } + + [Serializable] + public class EntityProfileBody : PlayFabBaseModel + { + /// + /// Avatar URL for the entity. + /// + public string AvatarUrl; + /// + /// The creation time of this profile in UTC. + /// + public DateTime Created; + /// + /// The display name of the entity. This field may serve different purposes for different entity types. i.e.: for a title + /// player account it could represent the display name of the player, whereas on a character it could be character's name. + /// + public string DisplayName; + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The chain of responsibility for this entity. Use Lineage. + /// + public string EntityChain; + /// + /// The experiment variants of this profile. + /// + public List ExperimentVariants; + /// + /// The files on this profile. + /// + public Dictionary Files; + /// + /// The language on this profile. + /// + public string Language; + /// + /// The lineage of this profile. + /// + public EntityLineage Lineage; + /// + /// The objects on this profile. + /// + public Dictionary Objects; + /// + /// The permissions that govern access to this entity profile and its properties. Only includes permissions set on this + /// profile, not global statements from titles and namespaces. + /// + public List Permissions; + /// + /// The statistics on this profile. + /// + public Dictionary Statistics; + /// + /// The version number of the profile in persistent storage at the time of the read. Used for optional optimistic + /// concurrency during update. + /// + public int VersionNumber; + } + + /// + /// An entity file's meta data. To get a download URL call File/GetFiles API. + /// + [Serializable] + public class EntityProfileFileMetadata : PlayFabBaseModel + { + /// + /// Checksum value for the file, can be used to check if the file on the server has changed. + /// + public string Checksum; + /// + /// Name of the file + /// + public string FileName; + /// + /// Last UTC time the file was modified + /// + public DateTime LastModified; + /// + /// Storage service's reported byte count + /// + public int Size; + } + + [Serializable] + public class EntityStatisticValue : PlayFabBaseModel + { + /// + /// Metadata associated with the Statistic. + /// + public string Metadata; + /// + /// Statistic name + /// + public string Name; + /// + /// Statistic scores + /// + public List Scores; + /// + /// Statistic version + /// + public int Version; + } + + /// + /// Given an entity type and entity identifier will retrieve the profile from the entity store. If the profile being + /// retrieved is the caller's, then the read operation is consistent, if not it is an inconsistent read. An inconsistent + /// read means that we do not guarantee all committed writes have occurred before reading the profile, allowing for a stale + /// read. If consistency is important the Version Number on the result can be used to compare which version of the profile + /// any reader has. + /// + [Serializable] + public class GetEntityProfileRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Determines whether the objects will be returned as an escaped JSON string or as a un-escaped JSON object. Default is + /// JSON string. + /// + public bool? DataAsObject; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetEntityProfileResponse : PlayFabResultCommon + { + /// + /// Entity profile + /// + public EntityProfileBody Profile; + } + + /// + /// Given a set of entity types and entity identifiers will retrieve all readable profiles properties for the caller. + /// Profiles that the caller is not allowed to read will silently not be included in the results. + /// + [Serializable] + public class GetEntityProfilesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Determines whether the objects will be returned as an escaped JSON string or as a un-escaped JSON object. Default is + /// JSON string. + /// + public bool? DataAsObject; + /// + /// Entity keys of the profiles to load. Must be between 1 and 25 + /// + public List Entities; + } + + [Serializable] + public class GetEntityProfilesResponse : PlayFabResultCommon + { + /// + /// Entity profiles + /// + public List Profiles; + } + + /// + /// Retrieves the title access policy that is used before the profile's policy is inspected during a request. If never + /// customized this will return the default starter policy built by PlayFab. + /// + [Serializable] + public class GetGlobalPolicyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetGlobalPolicyResponse : PlayFabResultCommon + { + /// + /// The permissions that govern access to all entities under this title or namespace. + /// + public List Permissions; + } + + /// + /// Given a master player account id (PlayFab ID), returns all title player accounts associated with it. + /// + [Serializable] + public class GetTitlePlayersFromMasterPlayerAccountIdsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Master player account ids. + /// + public List MasterPlayerAccountIds; + /// + /// Id of title to get players from. + /// + public string TitleId; + } + + [Serializable] + public class GetTitlePlayersFromMasterPlayerAccountIdsResponse : PlayFabResultCommon + { + /// + /// Optional id of title to get players from, required if calling using a master_player_account. + /// + public string TitleId; + /// + /// Dictionary of master player ids mapped to title player entity keys and id pairs + /// + public Dictionary TitlePlayerAccounts; + } + + [Serializable] + public class GetTitlePlayersFromProviderIDsResponse : PlayFabResultCommon + { + /// + /// Dictionary of provider identifiers mapped to title_player_account lineage. Missing lineage indicates the player either + /// doesn't exist or doesn't play the requested title. + /// + public Dictionary TitlePlayerAccounts; + } + + /// + /// Given a collection of Xbox IDs (XUIDs), returns all title player accounts. + /// + [Serializable] + public class GetTitlePlayersFromXboxLiveIDsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Xbox Sandbox the players had on their Xbox tokens. + /// + public string Sandbox; + /// + /// Optional ID of title to get players from, required if calling using a master_player_account. + /// + public string TitleId; + /// + /// List of Xbox Live XUIDs + /// + public List XboxLiveIds; + } + + public enum OperationTypes + { + Created, + Updated, + Deleted, + None + } + + /// + /// Given an entity profile, will update its display name to the one passed in if the profile's version is equal to the + /// specified value + /// + [Serializable] + public class SetDisplayNameRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The new value to be set on Entity Profile's display name + /// + public string DisplayName; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The expected version of a profile to perform this update on + /// + public int? ExpectedVersion; + } + + [Serializable] + public class SetDisplayNameResponse : PlayFabResultCommon + { + /// + /// The type of operation that occured on the profile's display name + /// + public OperationTypes? OperationResult; + /// + /// The updated version of the profile after the display name update + /// + public int? VersionNumber; + } + + /// + /// This will set the access policy statements on the given entity profile. This is not additive, any existing statements + /// will be replaced with the statements in this request. + /// + [Serializable] + public class SetEntityProfilePolicyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity to perform this action on. + /// + public EntityKey Entity; + /// + /// The statements to include in the access policy. + /// + public List Statements; + } + + [Serializable] + public class SetEntityProfilePolicyResponse : PlayFabResultCommon + { + /// + /// The permissions that govern access to this entity profile and its properties. Only includes permissions set on this + /// profile, not global statements from titles and namespaces. + /// + public List Permissions; + } + + /// + /// Updates the title access policy that is used before the profile's policy is inspected during a request. Policies are + /// compiled and cached for several minutes so an update here may not be reflected in behavior for a short time. + /// + [Serializable] + public class SetGlobalPolicyRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The permissions that govern access to all entities under this title or namespace. + /// + public List Permissions; + } + + [Serializable] + public class SetGlobalPolicyResponse : PlayFabResultCommon + { + } + + /// + /// Given an entity profile, will update its language to the one passed in if the profile's version is equal to the one + /// passed in. + /// + [Serializable] + public class SetProfileLanguageRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// The expected version of a profile to perform this update on + /// + public int? ExpectedVersion; + /// + /// The language to set on the given entity. Deletes the profile's language if passed in a null string. + /// + public string Language; + } + + [Serializable] + public class SetProfileLanguageResponse : PlayFabResultCommon + { + /// + /// The type of operation that occured on the profile's language + /// + public OperationTypes? OperationResult; + /// + /// The updated version of the profile after the language update + /// + public int? VersionNumber; + } +} +#endif diff --git a/Assets/PlayFabSDK/Profiles/PlayFabProfilesModels.cs.meta b/Assets/PlayFabSDK/Profiles/PlayFabProfilesModels.cs.meta new file mode 100644 index 00000000..9250c5c9 --- /dev/null +++ b/Assets/PlayFabSDK/Profiles/PlayFabProfilesModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d7cf1e15acb646e4eaf8ef5d951b1477 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Progression.meta b/Assets/PlayFabSDK/Progression.meta new file mode 100644 index 00000000..942cbdd4 --- /dev/null +++ b/Assets/PlayFabSDK/Progression.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 24485793d5ba2d641b660ee9a48c06b3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Progression/PlayFabEvents.cs b/Assets/PlayFabSDK/Progression/PlayFabEvents.cs new file mode 100644 index 00000000..ee302234 --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabEvents.cs @@ -0,0 +1,52 @@ +#if !DISABLE_PLAYFABENTITY_API +using PlayFab.ProgressionModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnProgressionCreateLeaderboardDefinitionRequestEvent; + public event PlayFabResultEvent OnProgressionCreateLeaderboardDefinitionResultEvent; + public event PlayFabRequestEvent OnProgressionCreateStatisticDefinitionRequestEvent; + public event PlayFabResultEvent OnProgressionCreateStatisticDefinitionResultEvent; + public event PlayFabRequestEvent OnProgressionDeleteLeaderboardDefinitionRequestEvent; + public event PlayFabResultEvent OnProgressionDeleteLeaderboardDefinitionResultEvent; + public event PlayFabRequestEvent OnProgressionDeleteLeaderboardEntriesRequestEvent; + public event PlayFabResultEvent OnProgressionDeleteLeaderboardEntriesResultEvent; + public event PlayFabRequestEvent OnProgressionDeleteStatisticDefinitionRequestEvent; + public event PlayFabResultEvent OnProgressionDeleteStatisticDefinitionResultEvent; + public event PlayFabRequestEvent OnProgressionDeleteStatisticsRequestEvent; + public event PlayFabResultEvent OnProgressionDeleteStatisticsResultEvent; + public event PlayFabRequestEvent OnProgressionGetFriendLeaderboardForEntityRequestEvent; + public event PlayFabResultEvent OnProgressionGetFriendLeaderboardForEntityResultEvent; + public event PlayFabRequestEvent OnProgressionGetLeaderboardRequestEvent; + public event PlayFabResultEvent OnProgressionGetLeaderboardResultEvent; + public event PlayFabRequestEvent OnProgressionGetLeaderboardAroundEntityRequestEvent; + public event PlayFabResultEvent OnProgressionGetLeaderboardAroundEntityResultEvent; + public event PlayFabRequestEvent OnProgressionGetLeaderboardDefinitionRequestEvent; + public event PlayFabResultEvent OnProgressionGetLeaderboardDefinitionResultEvent; + public event PlayFabRequestEvent OnProgressionGetLeaderboardForEntitiesRequestEvent; + public event PlayFabResultEvent OnProgressionGetLeaderboardForEntitiesResultEvent; + public event PlayFabRequestEvent OnProgressionGetStatisticDefinitionRequestEvent; + public event PlayFabResultEvent OnProgressionGetStatisticDefinitionResultEvent; + public event PlayFabRequestEvent OnProgressionGetStatisticsRequestEvent; + public event PlayFabResultEvent OnProgressionGetStatisticsResultEvent; + public event PlayFabRequestEvent OnProgressionGetStatisticsForEntitiesRequestEvent; + public event PlayFabResultEvent OnProgressionGetStatisticsForEntitiesResultEvent; + public event PlayFabRequestEvent OnProgressionIncrementLeaderboardVersionRequestEvent; + public event PlayFabResultEvent OnProgressionIncrementLeaderboardVersionResultEvent; + public event PlayFabRequestEvent OnProgressionIncrementStatisticVersionRequestEvent; + public event PlayFabResultEvent OnProgressionIncrementStatisticVersionResultEvent; + public event PlayFabRequestEvent OnProgressionListLeaderboardDefinitionsRequestEvent; + public event PlayFabResultEvent OnProgressionListLeaderboardDefinitionsResultEvent; + public event PlayFabRequestEvent OnProgressionListStatisticDefinitionsRequestEvent; + public event PlayFabResultEvent OnProgressionListStatisticDefinitionsResultEvent; + public event PlayFabRequestEvent OnProgressionUnlinkLeaderboardFromStatisticRequestEvent; + public event PlayFabResultEvent OnProgressionUnlinkLeaderboardFromStatisticResultEvent; + public event PlayFabRequestEvent OnProgressionUpdateLeaderboardEntriesRequestEvent; + public event PlayFabResultEvent OnProgressionUpdateLeaderboardEntriesResultEvent; + public event PlayFabRequestEvent OnProgressionUpdateStatisticsRequestEvent; + public event PlayFabResultEvent OnProgressionUpdateStatisticsResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Progression/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Progression/PlayFabEvents.cs.meta new file mode 100644 index 00000000..03f473a1 --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0baf01ae0e5700e41a23409b4e548524 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Progression/PlayFabProgressionAPI.cs b/Assets/PlayFabSDK/Progression/PlayFabProgressionAPI.cs new file mode 100644 index 00000000..a8f83eea --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabProgressionAPI.cs @@ -0,0 +1,313 @@ +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.ProgressionModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// Manage entity statistics Manage entity leaderboards + /// + public static class PlayFabProgressionAPI + { + static PlayFabProgressionAPI() {} + + + /// + /// Verify entity login. + /// + public static bool IsEntityLoggedIn() + { + return PlayFabSettings.staticPlayer.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// Creates a new leaderboard definition. + /// + public static void CreateLeaderboardDefinition(CreateLeaderboardDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/CreateLeaderboardDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Create a new entity statistic definition. + /// + public static void CreateStatisticDefinition(CreateStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/CreateStatisticDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a leaderboard definition. + /// + public static void DeleteLeaderboardDefinition(DeleteLeaderboardDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/DeleteLeaderboardDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the specified entries from the given leaderboard. + /// + public static void DeleteLeaderboardEntries(DeleteLeaderboardEntriesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/DeleteLeaderboardEntries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete an entity statistic definition. Will delete all statistics on entity profiles and leaderboards. + /// + public static void DeleteStatisticDefinition(DeleteStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/DeleteStatisticDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Delete statistics on an entity profile. This will remove all rankings from associated leaderboards. + /// + public static void DeleteStatistics(DeleteStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/DeleteStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the friend leaderboard for the specified entity. A maximum of 25 friend entries are listed in the leaderboard. + /// + public static void GetFriendLeaderboardForEntity(GetFriendLeaderboardForEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/GetFriendLeaderboardForEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the leaderboard for a specific entity type and statistic. + /// + public static void GetLeaderboard(GetEntityLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboard", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the leaderboard around a specific entity. + /// + public static void GetLeaderboardAroundEntity(GetLeaderboardAroundEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboardAroundEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets the specified leaderboard definition. + /// + public static void GetLeaderboardDefinition(GetLeaderboardDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboardDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get the leaderboard limited to a set of entities. + /// + public static void GetLeaderboardForEntities(GetLeaderboardForEntitiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboardForEntities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get current statistic definition information + /// + public static void GetStatisticDefinition(GetStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/GetStatisticDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets statistics for the specified entity. + /// + public static void GetStatistics(GetStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/GetStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets statistics for the specified collection of entities. + /// + public static void GetStatisticsForEntities(GetStatisticsForEntitiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/GetStatisticsForEntities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Increment a leaderboard version. + /// + public static void IncrementLeaderboardVersion(IncrementLeaderboardVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/IncrementLeaderboardVersion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Increment an entity statistic definition version. + /// + public static void IncrementStatisticVersion(IncrementStatisticVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/IncrementStatisticVersion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists the leaderboard definitions defined for the Title. + /// + public static void ListLeaderboardDefinitions(ListLeaderboardDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/ListLeaderboardDefinitions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get all current statistic definitions information + /// + public static void ListStatisticDefinitions(ListStatisticDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/ListStatisticDefinitions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks a leaderboard definition from it's linked statistic definition. + /// + public static void UnlinkLeaderboardFromStatistic(UnlinkLeaderboardFromStatisticRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/UnlinkLeaderboardFromStatistic", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds or updates entries on the specified leaderboard. + /// + public static void UpdateLeaderboardEntries(UpdateLeaderboardEntriesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Leaderboard/UpdateLeaderboardEntries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update statistics on an entity profile. Depending on the statistic definition, this may result in entity being ranked on + /// various leaderboards. + /// + public static void UpdateStatistics(UpdateStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + + + PlayFabHttp.MakeApiCall("/Statistic/UpdateStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Progression/PlayFabProgressionAPI.cs.meta b/Assets/PlayFabSDK/Progression/PlayFabProgressionAPI.cs.meta new file mode 100644 index 00000000..ea6b3eb0 --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabProgressionAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 77a7d66f0cc99ad40a5068f8a1e2865f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Progression/PlayFabProgressionInstanceAPI.cs b/Assets/PlayFabSDK/Progression/PlayFabProgressionInstanceAPI.cs new file mode 100644 index 00000000..30470ddd --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabProgressionInstanceAPI.cs @@ -0,0 +1,289 @@ +#if !DISABLE_PLAYFABENTITY_API + +using System; +using System.Collections.Generic; +using PlayFab.ProgressionModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// Manage entity statistics Manage entity leaderboards + /// + public class PlayFabProgressionInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabProgressionInstanceAPI(PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + authenticationContext = context; + } + + public PlayFabProgressionInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + if (context == null) + throw new PlayFabException(PlayFabExceptionCode.AuthContextRequired, "Context cannot be null, create a PlayFabAuthenticationContext for each player in advance, or call .GetAuthenticationContext()"); + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Verify entity login. + /// + public bool IsEntityLoggedIn() + { + return authenticationContext == null ? false : authenticationContext.IsEntityLoggedIn(); + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// Creates a new leaderboard definition. + /// + public void CreateLeaderboardDefinition(CreateLeaderboardDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/CreateLeaderboardDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Create a new entity statistic definition. + /// + public void CreateStatisticDefinition(CreateStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/CreateStatisticDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a leaderboard definition. + /// + public void DeleteLeaderboardDefinition(DeleteLeaderboardDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/DeleteLeaderboardDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the specified entries from the given leaderboard. + /// + public void DeleteLeaderboardEntries(DeleteLeaderboardEntriesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/DeleteLeaderboardEntries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete an entity statistic definition. Will delete all statistics on entity profiles and leaderboards. + /// + public void DeleteStatisticDefinition(DeleteStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/DeleteStatisticDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Delete statistics on an entity profile. This will remove all rankings from associated leaderboards. + /// + public void DeleteStatistics(DeleteStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/DeleteStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the friend leaderboard for the specified entity. A maximum of 25 friend entries are listed in the leaderboard. + /// + public void GetFriendLeaderboardForEntity(GetFriendLeaderboardForEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/GetFriendLeaderboardForEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the leaderboard for a specific entity type and statistic. + /// + public void GetLeaderboard(GetEntityLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboard", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the leaderboard around a specific entity. + /// + public void GetLeaderboardAroundEntity(GetLeaderboardAroundEntityRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboardAroundEntity", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets the specified leaderboard definition. + /// + public void GetLeaderboardDefinition(GetLeaderboardDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboardDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get the leaderboard limited to a set of entities. + /// + public void GetLeaderboardForEntities(GetLeaderboardForEntitiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/GetLeaderboardForEntities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get current statistic definition information + /// + public void GetStatisticDefinition(GetStatisticDefinitionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/GetStatisticDefinition", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets statistics for the specified entity. + /// + public void GetStatistics(GetStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/GetStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets statistics for the specified collection of entities. + /// + public void GetStatisticsForEntities(GetStatisticsForEntitiesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/GetStatisticsForEntities", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Increment a leaderboard version. + /// + public void IncrementLeaderboardVersion(IncrementLeaderboardVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/IncrementLeaderboardVersion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Increment an entity statistic definition version. + /// + public void IncrementStatisticVersion(IncrementStatisticVersionRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/IncrementStatisticVersion", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists the leaderboard definitions defined for the Title. + /// + public void ListLeaderboardDefinitions(ListLeaderboardDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/ListLeaderboardDefinitions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get all current statistic definitions information + /// + public void ListStatisticDefinitions(ListStatisticDefinitionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/ListStatisticDefinitions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks a leaderboard definition from it's linked statistic definition. + /// + public void UnlinkLeaderboardFromStatistic(UnlinkLeaderboardFromStatisticRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/UnlinkLeaderboardFromStatistic", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds or updates entries on the specified leaderboard. + /// + public void UpdateLeaderboardEntries(UpdateLeaderboardEntriesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Leaderboard/UpdateLeaderboardEntries", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update statistics on an entity profile. Depending on the statistic definition, this may result in entity being ranked on + /// various leaderboards. + /// + public void UpdateStatistics(UpdateStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method"); + PlayFabHttp.MakeApiCall("/Statistic/UpdateStatistics", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Progression/PlayFabProgressionInstanceAPI.cs.meta b/Assets/PlayFabSDK/Progression/PlayFabProgressionInstanceAPI.cs.meta new file mode 100644 index 00000000..cb592500 --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabProgressionInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9b633860fe71fc24dacbbfe3f943e227 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Progression/PlayFabProgressionModels.cs b/Assets/PlayFabSDK/Progression/PlayFabProgressionModels.cs new file mode 100644 index 00000000..f8e91df7 --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabProgressionModels.cs @@ -0,0 +1,897 @@ +#if !DISABLE_PLAYFABENTITY_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.ProgressionModels +{ + [Serializable] + public class CreateLeaderboardDefinitionRequest : PlayFabRequestCommon + { + /// + /// Leaderboard columns describing the sort directions, cannot be changed after creation. + /// + public List Columns; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity type being represented on the leaderboard. If it doesn't correspond to the PlayFab entity types, use + /// 'external' as the type. + /// + public string EntityType; + /// + /// A name for the leaderboard, unique per title. + /// + public string Name; + /// + /// Maximum number of entries on this leaderboard + /// + public int SizeLimit; + /// + /// The version reset configuration for the leaderboard definition. + /// + public VersionConfiguration VersionConfiguration; + } + + [Serializable] + public class CreateStatisticDefinitionRequest : PlayFabRequestCommon + { + /// + /// The columns for the statistic defining the aggregation method for each column. + /// + public List Columns; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entity type allowed to have score(s) for this statistic. + /// + public string EntityType; + /// + /// Name of the statistic. Must be less than 150 characters. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'. + /// + public string Name; + /// + /// The version reset configuration for the statistic definition. + /// + public VersionConfiguration VersionConfiguration; + } + + [Serializable] + public class DeleteLeaderboardDefinitionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the leaderboard definition to delete. + /// + public string Name; + } + + [Serializable] + public class DeleteLeaderboardEntriesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The unique Ids of the entries to delete from the leaderboard. + /// + public List EntityIds; + /// + /// The name of the leaderboard. + /// + public string Name; + } + + [Serializable] + public class DeleteStatisticDefinitionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Name of the statistic to delete. + /// + public string Name; + } + + [Serializable] + public class DeleteStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// Collection of statistics to remove from this entity. + /// + public List Statistics; + } + + [Serializable] + public class DeleteStatisticsResponse : PlayFabResultCommon + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + /// + /// Individual rank of an entity in a leaderboard + /// + [Serializable] + public class EntityLeaderboardEntry : PlayFabBaseModel + { + /// + /// Entity's display name. + /// + public string DisplayName; + /// + /// Entity identifier. + /// + public EntityKey Entity; + /// + /// The time at which the last update to the entry was recorded on the server. + /// + public DateTime LastUpdated; + /// + /// An opaque blob of data stored on the leaderboard entry. Note that the metadata is not used for ranking purposes. + /// + public string Metadata; + /// + /// Position on the leaderboard. + /// + public int Rank; + /// + /// Scores for the entry. + /// + public List Scores; + } + + [Serializable] + public class EntityStatistics : PlayFabBaseModel + { + /// + /// Entity key + /// + public EntityKey EntityKey; + /// + /// All statistics for the given entitykey + /// + public List Statistics; + } + + [Serializable] + public class EntityStatisticValue : PlayFabBaseModel + { + /// + /// Metadata associated with the Statistic. + /// + public string Metadata; + /// + /// Statistic name + /// + public string Name; + /// + /// Statistic scores + /// + public List Scores; + /// + /// Statistic version + /// + public int Version; + } + + public enum ExternalFriendSources + { + None, + Steam, + Facebook, + Xbox, + Psn, + All + } + + /// + /// Request to load a leaderboard. + /// + [Serializable] + public class GetEntityLeaderboardRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Name of the leaderboard. + /// + public string LeaderboardName; + /// + /// Maximum number of results to return from the leaderboard. Minimum 1, maximum 1,000. + /// + public uint PageSize; + /// + /// Index position to start from. 1 is beginning of leaderboard. + /// + public uint? StartingPosition; + /// + /// Optional version of the leaderboard, defaults to current version. + /// + public uint? Version; + } + + /// + /// Leaderboard response + /// + [Serializable] + public class GetEntityLeaderboardResponse : PlayFabResultCommon + { + /// + /// Leaderboard columns describing the sort directions. + /// + public List Columns; + /// + /// The number of entries on the leaderboard. + /// + public uint EntryCount; + /// + /// Individual entity rankings in the leaderboard, in sorted order by rank. + /// + public List Rankings; + /// + /// Version of the leaderboard being returned. + /// + public uint Version; + } + + [Serializable] + public class GetFriendLeaderboardForEntityRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// Indicates which other platforms' friends should be included in the response. In HTTP, it is represented as a + /// comma-separated list of platforms. + /// + public ExternalFriendSources? ExternalFriendSources; + /// + /// Name of the leaderboard. + /// + public string LeaderboardName; + /// + /// Optional version of the leaderboard, defaults to current version. + /// + public uint? Version; + /// + /// Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab. + /// + public string XboxToken; + } + + /// + /// Request to load a section of a leaderboard centered on a specific entity. + /// + [Serializable] + public class GetLeaderboardAroundEntityRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// Name of the leaderboard. + /// + public string LeaderboardName; + /// + /// Number of surrounding entries to return (in addition to specified entity). In general, the number of ranks above and + /// below will be split into half. For example, if the specified value is 10, 5 ranks above and 5 ranks below will be + /// retrieved. However, the numbers will get skewed in either direction when the specified entity is towards the top or + /// bottom of the leaderboard. Also, the number of entries returned can be lower than the value specified for entries at the + /// bottom of the leaderboard. + /// + public uint MaxSurroundingEntries; + /// + /// Optional version of the leaderboard, defaults to current. + /// + public uint? Version; + } + + [Serializable] + public class GetLeaderboardDefinitionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the leaderboard to retrieve the definition for. + /// + public string Name; + } + + [Serializable] + public class GetLeaderboardDefinitionResponse : PlayFabResultCommon + { + /// + /// Sort direction of the leaderboard columns, cannot be changed after creation. + /// + public List Columns; + /// + /// Created time, in UTC + /// + public DateTime Created; + /// + /// The entity type being represented on the leaderboard. If it doesn't correspond to the PlayFab entity types, use + /// 'external' as the type. + /// + public string EntityType; + /// + /// Last time, in UTC, leaderboard version was incremented. + /// + public DateTime? LastResetTime; + /// + /// A name for the leaderboard, unique per title. + /// + public string Name; + /// + /// Maximum number of entries on this leaderboard + /// + public int SizeLimit; + /// + /// Latest Leaderboard version. + /// + public uint Version; + /// + /// The version reset configuration for the leaderboard definition. + /// + public VersionConfiguration VersionConfiguration; + } + + /// + /// Request a leaderboard limited to a collection of entities. + /// + [Serializable] + public class GetLeaderboardForEntitiesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Collection of Entity IDs to include in the leaderboard. + /// + public List EntityIds; + /// + /// Name of the leaderboard. + /// + public string LeaderboardName; + /// + /// Optional version of the leaderboard, defaults to current. + /// + public uint? Version; + } + + [Serializable] + public class GetStatisticDefinitionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Name of the statistic. Must be less than 150 characters. + /// + public string Name; + } + + [Serializable] + public class GetStatisticDefinitionResponse : PlayFabResultCommon + { + /// + /// The columns for the statistic defining the aggregation method for each column. + /// + public List Columns; + /// + /// Created time, in UTC + /// + public DateTime Created; + /// + /// The entity type that can have this statistic. + /// + public string EntityType; + /// + /// Last time, in UTC, statistic version was incremented. + /// + public DateTime? LastResetTime; + /// + /// The list of leaderboards that are linked to this statistic definition. + /// + public List LinkedLeaderboardNames; + /// + /// Name of the statistic. + /// + public string Name; + /// + /// Statistic version. + /// + public uint Version; + /// + /// The version reset configuration for the leaderboard definition. + /// + public VersionConfiguration VersionConfiguration; + } + + [Serializable] + public class GetStatisticsForEntitiesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Collection of Entity IDs to retrieve statistics for. + /// + public List Entities; + } + + [Serializable] + public class GetStatisticsForEntitiesResponse : PlayFabResultCommon + { + /// + /// A mapping of statistic name to the columns defined in the corresponding definition. + /// + public Dictionary ColumnDetails; + /// + /// List of entities mapped to their statistics. Only the latest version of a statistic is returned. + /// + public List EntitiesStatistics; + } + + [Serializable] + public class GetStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + } + + [Serializable] + public class GetStatisticsResponse : PlayFabResultCommon + { + /// + /// A mapping of statistic name to the columns defined in the corresponding definition. + /// + public Dictionary ColumnDetails; + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// List of statistics keyed by Name. Only the latest version of a statistic is returned. + /// + public Dictionary Statistics; + } + + [Serializable] + public class IncrementLeaderboardVersionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the leaderboard to increment the version for. + /// + public string Name; + } + + [Serializable] + public class IncrementLeaderboardVersionResponse : PlayFabResultCommon + { + /// + /// New Leaderboard version. + /// + public uint Version; + } + + [Serializable] + public class IncrementStatisticVersionRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Name of the statistic to increment the version of. + /// + public string Name; + } + + [Serializable] + public class IncrementStatisticVersionResponse : PlayFabResultCommon + { + /// + /// New statistic version. + /// + public uint Version; + } + + [Serializable] + public class LeaderboardColumn : PlayFabBaseModel + { + /// + /// If the value for this column is sourced from a statistic, details of the linked column. Null if the leaderboard is not + /// linked. + /// + public LinkedStatisticColumn LinkedStatisticColumn; + /// + /// A name for the leaderboard column, unique per leaderboard definition. + /// + public string Name; + /// + /// The sort direction for this column. + /// + public LeaderboardSortDirection SortDirection; + } + + [Serializable] + public class LeaderboardDefinition : PlayFabBaseModel + { + /// + /// Sort direction of the leaderboard columns, cannot be changed after creation. + /// + public List Columns; + /// + /// Created time, in UTC + /// + public DateTime Created; + /// + /// The entity type being represented on the leaderboard. If it doesn't correspond to the PlayFab entity types, use + /// 'external' as the type. + /// + public string EntityType; + /// + /// Last time, in UTC, leaderboard version was incremented. + /// + public DateTime? LastResetTime; + /// + /// A name for the leaderboard, unique per title. + /// + public string Name; + /// + /// Maximum number of entries on this leaderboard + /// + public int SizeLimit; + /// + /// Latest Leaderboard version. + /// + public uint Version; + /// + /// The version reset configuration for the leaderboard definition. + /// + public VersionConfiguration VersionConfiguration; + } + + [Serializable] + public class LeaderboardEntryUpdate : PlayFabBaseModel + { + /// + /// The unique Id for the entry. If using PlayFab Entities, this would be the entityId of the entity. + /// + public string EntityId; + /// + /// Arbitrary metadata to store along side the leaderboard entry, will be returned by all Leaderboard APIs. Must be less + /// than 50 UTF8 encoded characters. + /// + public string Metadata; + /// + /// The scores for the leaderboard. The number of values provided here must match the number of columns in the Leaderboard + /// definition. + /// + public List Scores; + } + + public enum LeaderboardSortDirection + { + Descending, + Ascending + } + + [Serializable] + public class LinkedStatisticColumn : PlayFabBaseModel + { + /// + /// The name of the statistic column that this leaderboard column is sourced from. + /// + public string LinkedStatisticColumnName; + /// + /// The name of the statistic. + /// + public string LinkedStatisticName; + } + + [Serializable] + public class ListLeaderboardDefinitionsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class ListLeaderboardDefinitionsResponse : PlayFabResultCommon + { + /// + /// List of leaderboard definitions for the title. + /// + public List LeaderboardDefinitions; + } + + [Serializable] + public class ListStatisticDefinitionsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class ListStatisticDefinitionsResponse : PlayFabResultCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// List of statistic definitions for the title. + /// + public List StatisticDefinitions; + } + + public enum ResetInterval + { + Manual, + Hour, + Day, + Week, + Month + } + + public enum StatisticAggregationMethod + { + Last, + Min, + Max, + Sum + } + + [Serializable] + public class StatisticColumn : PlayFabBaseModel + { + /// + /// Aggregation method for calculating new value of a statistic. + /// + public StatisticAggregationMethod AggregationMethod; + /// + /// Name of the statistic column, as originally configured. + /// + public string Name; + } + + [Serializable] + public class StatisticColumnCollection : PlayFabBaseModel + { + /// + /// Columns for the statistic defining the aggregation method for each column. + /// + public List Columns; + } + + [Serializable] + public class StatisticDefinition : PlayFabBaseModel + { + /// + /// The columns for the statistic defining the aggregation method for each column. + /// + public List Columns; + /// + /// Created time, in UTC + /// + public DateTime Created; + /// + /// The entity type that can have this statistic. + /// + public string EntityType; + /// + /// Last time, in UTC, statistic version was incremented. + /// + public DateTime? LastResetTime; + /// + /// The list of leaderboards that are linked to this statistic definition. + /// + public List LinkedLeaderboardNames; + /// + /// Name of the statistic. + /// + public string Name; + /// + /// Statistic version. + /// + public uint Version; + /// + /// The version reset configuration for the leaderboard definition. + /// + public VersionConfiguration VersionConfiguration; + } + + [Serializable] + public class StatisticDelete : PlayFabBaseModel + { + /// + /// Name of the statistic, as originally configured. + /// + public string Name; + } + + [Serializable] + public class StatisticUpdate : PlayFabBaseModel + { + /// + /// Arbitrary metadata to store along side the statistic, will be returned by all Leaderboard APIs. Must be less than 50 + /// UTF8 encoded characters. + /// + public string Metadata; + /// + /// Name of the statistic, as originally configured. + /// + public string Name; + /// + /// Statistic scores for the entity. This will be used in accordance with the aggregation method configured for the + /// statistics.The maximum value allowed for each individual score is 9223372036854775807. The minimum value for each + /// individual score is -9223372036854775807The values are formatted as strings to avoid interop issues with client + /// libraries unable to handle 64bit integers. + /// + public List Scores; + /// + /// Optional field to indicate the version of the statistic to set. When empty defaults to the statistic's current version. + /// + public uint? Version; + } + + [Serializable] + public class UnlinkLeaderboardFromStatisticRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the leaderboard definition to unlink. + /// + public string Name; + /// + /// The name of the statistic definition to unlink. + /// + public string StatisticName; + } + + [Serializable] + public class UpdateLeaderboardEntriesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The entries to add or update on the leaderboard. + /// + public List Entries; + /// + /// The name of the leaderboard. + /// + public string LeaderboardName; + } + + [Serializable] + public class UpdateStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The optional entity to perform this action on. Defaults to the currently logged in entity. + /// + public EntityKey Entity; + /// + /// Collection of statistics to update, maximum 50. + /// + public List Statistics; + } + + [Serializable] + public class UpdateStatisticsResponse : PlayFabResultCommon + { + /// + /// A mapping of statistic name to the columns defined in the corresponding definition. + /// + public Dictionary ColumnDetails; + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// Updated entity profile statistics. + /// + public Dictionary Statistics; + } + + [Serializable] + public class VersionConfiguration : PlayFabBaseModel + { + /// + /// The maximum number of versions of this leaderboard/statistic that can be queried. + /// + public int MaxQueryableVersions; + /// + /// Reset interval that statistics or leaderboards will reset on. When using Manual intervalthe reset can only be increased + /// by calling the Increase version API. When using Hour interval the resetwill occur at the start of the next hour UTC + /// time. When using Day interval the reset will occur at thestart of the next day in UTC time. When using the Week interval + /// the reset will occur at the start ofthe next Monday in UTC time. When using Month interval the reset will occur at the + /// start of the nextmonth in UTC time. + /// + public ResetInterval ResetInterval; + } +} +#endif diff --git a/Assets/PlayFabSDK/Progression/PlayFabProgressionModels.cs.meta b/Assets/PlayFabSDK/Progression/PlayFabProgressionModels.cs.meta new file mode 100644 index 00000000..382d715d --- /dev/null +++ b/Assets/PlayFabSDK/Progression/PlayFabProgressionModels.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 98dd4b7b25d8a1c4481a206e643cb9e3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Server.meta b/Assets/PlayFabSDK/Server.meta new file mode 100644 index 00000000..6b50bbf5 --- /dev/null +++ b/Assets/PlayFabSDK/Server.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: be1738c19ed8d48468d5163ea56f2b1e +folderAsset: yes +timeCreated: 1468524875 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Server/PlayFabEvents.cs b/Assets/PlayFabSDK/Server/PlayFabEvents.cs new file mode 100644 index 00000000..f64b6b39 --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabEvents.cs @@ -0,0 +1,284 @@ +#if ENABLE_PLAYFABSERVER_API +using PlayFab.ServerModels; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public event PlayFabRequestEvent OnServerAddCharacterVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnServerAddCharacterVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnServerAddFriendRequestEvent; + public event PlayFabResultEvent OnServerAddFriendResultEvent; + public event PlayFabRequestEvent OnServerAddGenericIDRequestEvent; + public event PlayFabResultEvent OnServerAddGenericIDResultEvent; + public event PlayFabRequestEvent OnServerAddPlayerTagRequestEvent; + public event PlayFabResultEvent OnServerAddPlayerTagResultEvent; + public event PlayFabRequestEvent OnServerAddSharedGroupMembersRequestEvent; + public event PlayFabResultEvent OnServerAddSharedGroupMembersResultEvent; + public event PlayFabRequestEvent OnServerAddUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnServerAddUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnServerAuthenticateSessionTicketRequestEvent; + public event PlayFabResultEvent OnServerAuthenticateSessionTicketResultEvent; + public event PlayFabRequestEvent OnServerAwardSteamAchievementRequestEvent; + public event PlayFabResultEvent OnServerAwardSteamAchievementResultEvent; + public event PlayFabRequestEvent OnServerBanUsersRequestEvent; + public event PlayFabResultEvent OnServerBanUsersResultEvent; + public event PlayFabRequestEvent OnServerConsumeItemRequestEvent; + public event PlayFabResultEvent OnServerConsumeItemResultEvent; + public event PlayFabRequestEvent OnServerCreateSharedGroupRequestEvent; + public event PlayFabResultEvent OnServerCreateSharedGroupResultEvent; + public event PlayFabRequestEvent OnServerDeleteCharacterFromUserRequestEvent; + public event PlayFabResultEvent OnServerDeleteCharacterFromUserResultEvent; + public event PlayFabRequestEvent OnServerDeletePlayerRequestEvent; + public event PlayFabResultEvent OnServerDeletePlayerResultEvent; + public event PlayFabRequestEvent OnServerDeletePushNotificationTemplateRequestEvent; + public event PlayFabResultEvent OnServerDeletePushNotificationTemplateResultEvent; + public event PlayFabRequestEvent OnServerDeleteSharedGroupRequestEvent; + public event PlayFabResultEvent OnServerDeleteSharedGroupResultEvent; + public event PlayFabRequestEvent OnServerEvaluateRandomResultTableRequestEvent; + public event PlayFabResultEvent OnServerEvaluateRandomResultTableResultEvent; + public event PlayFabRequestEvent OnServerExecuteCloudScriptRequestEvent; + public event PlayFabResultEvent OnServerExecuteCloudScriptResultEvent; + public event PlayFabRequestEvent OnServerGetAllSegmentsRequestEvent; + public event PlayFabResultEvent OnServerGetAllSegmentsResultEvent; + public event PlayFabRequestEvent OnServerGetAllUsersCharactersRequestEvent; + public event PlayFabResultEvent OnServerGetAllUsersCharactersResultEvent; + public event PlayFabRequestEvent OnServerGetCatalogItemsRequestEvent; + public event PlayFabResultEvent OnServerGetCatalogItemsResultEvent; + public event PlayFabRequestEvent OnServerGetCharacterDataRequestEvent; + public event PlayFabResultEvent OnServerGetCharacterDataResultEvent; + public event PlayFabRequestEvent OnServerGetCharacterInternalDataRequestEvent; + public event PlayFabResultEvent OnServerGetCharacterInternalDataResultEvent; + public event PlayFabRequestEvent OnServerGetCharacterInventoryRequestEvent; + public event PlayFabResultEvent OnServerGetCharacterInventoryResultEvent; + public event PlayFabRequestEvent OnServerGetCharacterLeaderboardRequestEvent; + public event PlayFabResultEvent OnServerGetCharacterLeaderboardResultEvent; + public event PlayFabRequestEvent OnServerGetCharacterReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnServerGetCharacterReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnServerGetCharacterStatisticsRequestEvent; + public event PlayFabResultEvent OnServerGetCharacterStatisticsResultEvent; + public event PlayFabRequestEvent OnServerGetContentDownloadUrlRequestEvent; + public event PlayFabResultEvent OnServerGetContentDownloadUrlResultEvent; + public event PlayFabRequestEvent OnServerGetFriendLeaderboardRequestEvent; + public event PlayFabResultEvent OnServerGetFriendLeaderboardResultEvent; + public event PlayFabRequestEvent OnServerGetFriendsListRequestEvent; + public event PlayFabResultEvent OnServerGetFriendsListResultEvent; + public event PlayFabRequestEvent OnServerGetLeaderboardRequestEvent; + public event PlayFabResultEvent OnServerGetLeaderboardResultEvent; + public event PlayFabRequestEvent OnServerGetLeaderboardAroundCharacterRequestEvent; + public event PlayFabResultEvent OnServerGetLeaderboardAroundCharacterResultEvent; + public event PlayFabRequestEvent OnServerGetLeaderboardAroundUserRequestEvent; + public event PlayFabResultEvent OnServerGetLeaderboardAroundUserResultEvent; + public event PlayFabRequestEvent OnServerGetLeaderboardForUserCharactersRequestEvent; + public event PlayFabResultEvent OnServerGetLeaderboardForUserCharactersResultEvent; + public event PlayFabRequestEvent OnServerGetPlayerCombinedInfoRequestEvent; + public event PlayFabResultEvent OnServerGetPlayerCombinedInfoResultEvent; + public event PlayFabRequestEvent OnServerGetPlayerProfileRequestEvent; + public event PlayFabResultEvent OnServerGetPlayerProfileResultEvent; + public event PlayFabRequestEvent OnServerGetPlayerSegmentsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayerSegmentsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayersInSegmentRequestEvent; + public event PlayFabResultEvent OnServerGetPlayersInSegmentResultEvent; + public event PlayFabRequestEvent OnServerGetPlayerStatisticsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayerStatisticsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayerStatisticVersionsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayerStatisticVersionsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayerTagsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayerTagsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromFacebookIDsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromFacebookIDsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromGenericIDsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromGenericIDsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromPSNAccountIDsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromPSNAccountIDsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromPSNOnlineIDsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromPSNOnlineIDsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromSteamIDsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromSteamIDsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromTwitchIDsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromTwitchIDsResultEvent; + public event PlayFabRequestEvent OnServerGetPlayFabIDsFromXboxLiveIDsRequestEvent; + public event PlayFabResultEvent OnServerGetPlayFabIDsFromXboxLiveIDsResultEvent; + public event PlayFabRequestEvent OnServerGetPublisherDataRequestEvent; + public event PlayFabResultEvent OnServerGetPublisherDataResultEvent; + public event PlayFabRequestEvent OnServerGetRandomResultTablesRequestEvent; + public event PlayFabResultEvent OnServerGetRandomResultTablesResultEvent; + public event PlayFabRequestEvent OnServerGetServerCustomIDsFromPlayFabIDsRequestEvent; + public event PlayFabResultEvent OnServerGetServerCustomIDsFromPlayFabIDsResultEvent; + public event PlayFabRequestEvent OnServerGetSharedGroupDataRequestEvent; + public event PlayFabResultEvent OnServerGetSharedGroupDataResultEvent; + public event PlayFabRequestEvent OnServerGetStoreItemsRequestEvent; + public event PlayFabResultEvent OnServerGetStoreItemsResultEvent; + public event PlayFabRequestEvent OnServerGetTimeRequestEvent; + public event PlayFabResultEvent OnServerGetTimeResultEvent; + public event PlayFabRequestEvent OnServerGetTitleDataRequestEvent; + public event PlayFabResultEvent OnServerGetTitleDataResultEvent; + public event PlayFabRequestEvent OnServerGetTitleInternalDataRequestEvent; + public event PlayFabResultEvent OnServerGetTitleInternalDataResultEvent; + public event PlayFabRequestEvent OnServerGetTitleNewsRequestEvent; + public event PlayFabResultEvent OnServerGetTitleNewsResultEvent; + public event PlayFabRequestEvent OnServerGetUserAccountInfoRequestEvent; + public event PlayFabResultEvent OnServerGetUserAccountInfoResultEvent; + public event PlayFabRequestEvent OnServerGetUserBansRequestEvent; + public event PlayFabResultEvent OnServerGetUserBansResultEvent; + public event PlayFabRequestEvent OnServerGetUserDataRequestEvent; + public event PlayFabResultEvent OnServerGetUserDataResultEvent; + public event PlayFabRequestEvent OnServerGetUserInternalDataRequestEvent; + public event PlayFabResultEvent OnServerGetUserInternalDataResultEvent; + public event PlayFabRequestEvent OnServerGetUserInventoryRequestEvent; + public event PlayFabResultEvent OnServerGetUserInventoryResultEvent; + public event PlayFabRequestEvent OnServerGetUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnServerGetUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnServerGetUserPublisherInternalDataRequestEvent; + public event PlayFabResultEvent OnServerGetUserPublisherInternalDataResultEvent; + public event PlayFabRequestEvent OnServerGetUserPublisherReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnServerGetUserPublisherReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnServerGetUserReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnServerGetUserReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnServerGrantCharacterToUserRequestEvent; + public event PlayFabResultEvent OnServerGrantCharacterToUserResultEvent; + public event PlayFabRequestEvent OnServerGrantItemsToCharacterRequestEvent; + public event PlayFabResultEvent OnServerGrantItemsToCharacterResultEvent; + public event PlayFabRequestEvent OnServerGrantItemsToUserRequestEvent; + public event PlayFabResultEvent OnServerGrantItemsToUserResultEvent; + public event PlayFabRequestEvent OnServerGrantItemsToUsersRequestEvent; + public event PlayFabResultEvent OnServerGrantItemsToUsersResultEvent; + public event PlayFabRequestEvent OnServerLinkNintendoServiceAccountRequestEvent; + public event PlayFabResultEvent OnServerLinkNintendoServiceAccountResultEvent; + public event PlayFabRequestEvent OnServerLinkNintendoServiceAccountSubjectRequestEvent; + public event PlayFabResultEvent OnServerLinkNintendoServiceAccountSubjectResultEvent; + public event PlayFabRequestEvent OnServerLinkNintendoSwitchDeviceIdRequestEvent; + public event PlayFabResultEvent OnServerLinkNintendoSwitchDeviceIdResultEvent; + public event PlayFabRequestEvent OnServerLinkPSNAccountRequestEvent; + public event PlayFabResultEvent OnServerLinkPSNAccountResultEvent; + public event PlayFabRequestEvent OnServerLinkPSNIdRequestEvent; + public event PlayFabResultEvent OnServerLinkPSNIdResultEvent; + public event PlayFabRequestEvent OnServerLinkServerCustomIdRequestEvent; + public event PlayFabResultEvent OnServerLinkServerCustomIdResultEvent; + public event PlayFabRequestEvent OnServerLinkSteamIdRequestEvent; + public event PlayFabResultEvent OnServerLinkSteamIdResultEvent; + public event PlayFabRequestEvent OnServerLinkXboxAccountRequestEvent; + public event PlayFabResultEvent OnServerLinkXboxAccountResultEvent; + public event PlayFabRequestEvent OnServerLoginWithPSNRequestEvent; + public event PlayFabResultEvent OnServerLoginWithPSNResultEvent; + public event PlayFabRequestEvent OnServerLoginWithServerCustomIdRequestEvent; + public event PlayFabResultEvent OnServerLoginWithServerCustomIdResultEvent; + public event PlayFabRequestEvent OnServerLoginWithSteamIdRequestEvent; + public event PlayFabResultEvent OnServerLoginWithSteamIdResultEvent; + public event PlayFabRequestEvent OnServerLoginWithXboxRequestEvent; + public event PlayFabResultEvent OnServerLoginWithXboxResultEvent; + public event PlayFabRequestEvent OnServerLoginWithXboxIdRequestEvent; + public event PlayFabResultEvent OnServerLoginWithXboxIdResultEvent; + public event PlayFabRequestEvent OnServerModifyItemUsesRequestEvent; + public event PlayFabResultEvent OnServerModifyItemUsesResultEvent; + public event PlayFabRequestEvent OnServerMoveItemToCharacterFromCharacterRequestEvent; + public event PlayFabResultEvent OnServerMoveItemToCharacterFromCharacterResultEvent; + public event PlayFabRequestEvent OnServerMoveItemToCharacterFromUserRequestEvent; + public event PlayFabResultEvent OnServerMoveItemToCharacterFromUserResultEvent; + public event PlayFabRequestEvent OnServerMoveItemToUserFromCharacterRequestEvent; + public event PlayFabResultEvent OnServerMoveItemToUserFromCharacterResultEvent; + public event PlayFabRequestEvent OnServerRedeemCouponRequestEvent; + public event PlayFabResultEvent OnServerRedeemCouponResultEvent; + public event PlayFabRequestEvent OnServerRemoveFriendRequestEvent; + public event PlayFabResultEvent OnServerRemoveFriendResultEvent; + public event PlayFabRequestEvent OnServerRemoveGenericIDRequestEvent; + public event PlayFabResultEvent OnServerRemoveGenericIDResultEvent; + public event PlayFabRequestEvent OnServerRemovePlayerTagRequestEvent; + public event PlayFabResultEvent OnServerRemovePlayerTagResultEvent; + public event PlayFabRequestEvent OnServerRemoveSharedGroupMembersRequestEvent; + public event PlayFabResultEvent OnServerRemoveSharedGroupMembersResultEvent; + public event PlayFabRequestEvent OnServerReportPlayerRequestEvent; + public event PlayFabResultEvent OnServerReportPlayerResultEvent; + public event PlayFabRequestEvent OnServerRevokeAllBansForUserRequestEvent; + public event PlayFabResultEvent OnServerRevokeAllBansForUserResultEvent; + public event PlayFabRequestEvent OnServerRevokeBansRequestEvent; + public event PlayFabResultEvent OnServerRevokeBansResultEvent; + public event PlayFabRequestEvent OnServerRevokeInventoryItemRequestEvent; + public event PlayFabResultEvent OnServerRevokeInventoryItemResultEvent; + public event PlayFabRequestEvent OnServerRevokeInventoryItemsRequestEvent; + public event PlayFabResultEvent OnServerRevokeInventoryItemsResultEvent; + public event PlayFabRequestEvent OnServerSavePushNotificationTemplateRequestEvent; + public event PlayFabResultEvent OnServerSavePushNotificationTemplateResultEvent; + public event PlayFabRequestEvent OnServerSendCustomAccountRecoveryEmailRequestEvent; + public event PlayFabResultEvent OnServerSendCustomAccountRecoveryEmailResultEvent; + public event PlayFabRequestEvent OnServerSendEmailFromTemplateRequestEvent; + public event PlayFabResultEvent OnServerSendEmailFromTemplateResultEvent; + public event PlayFabRequestEvent OnServerSendPushNotificationRequestEvent; + public event PlayFabResultEvent OnServerSendPushNotificationResultEvent; + public event PlayFabRequestEvent OnServerSendPushNotificationFromTemplateRequestEvent; + public event PlayFabResultEvent OnServerSendPushNotificationFromTemplateResultEvent; + public event PlayFabRequestEvent OnServerSetFriendTagsRequestEvent; + public event PlayFabResultEvent OnServerSetFriendTagsResultEvent; + public event PlayFabRequestEvent OnServerSetPlayerSecretRequestEvent; + public event PlayFabResultEvent OnServerSetPlayerSecretResultEvent; + public event PlayFabRequestEvent OnServerSetPublisherDataRequestEvent; + public event PlayFabResultEvent OnServerSetPublisherDataResultEvent; + public event PlayFabRequestEvent OnServerSetTitleDataRequestEvent; + public event PlayFabResultEvent OnServerSetTitleDataResultEvent; + public event PlayFabRequestEvent OnServerSetTitleInternalDataRequestEvent; + public event PlayFabResultEvent OnServerSetTitleInternalDataResultEvent; + public event PlayFabRequestEvent OnServerSubtractCharacterVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnServerSubtractCharacterVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnServerSubtractUserVirtualCurrencyRequestEvent; + public event PlayFabResultEvent OnServerSubtractUserVirtualCurrencyResultEvent; + public event PlayFabRequestEvent OnServerUnlinkNintendoServiceAccountRequestEvent; + public event PlayFabResultEvent OnServerUnlinkNintendoServiceAccountResultEvent; + public event PlayFabRequestEvent OnServerUnlinkNintendoSwitchDeviceIdRequestEvent; + public event PlayFabResultEvent OnServerUnlinkNintendoSwitchDeviceIdResultEvent; + public event PlayFabRequestEvent OnServerUnlinkPSNAccountRequestEvent; + public event PlayFabResultEvent OnServerUnlinkPSNAccountResultEvent; + public event PlayFabRequestEvent OnServerUnlinkServerCustomIdRequestEvent; + public event PlayFabResultEvent OnServerUnlinkServerCustomIdResultEvent; + public event PlayFabRequestEvent OnServerUnlinkSteamIdRequestEvent; + public event PlayFabResultEvent OnServerUnlinkSteamIdResultEvent; + public event PlayFabRequestEvent OnServerUnlinkXboxAccountRequestEvent; + public event PlayFabResultEvent OnServerUnlinkXboxAccountResultEvent; + public event PlayFabRequestEvent OnServerUnlockContainerInstanceRequestEvent; + public event PlayFabResultEvent OnServerUnlockContainerInstanceResultEvent; + public event PlayFabRequestEvent OnServerUnlockContainerItemRequestEvent; + public event PlayFabResultEvent OnServerUnlockContainerItemResultEvent; + public event PlayFabRequestEvent OnServerUpdateAvatarUrlRequestEvent; + public event PlayFabResultEvent OnServerUpdateAvatarUrlResultEvent; + public event PlayFabRequestEvent OnServerUpdateBansRequestEvent; + public event PlayFabResultEvent OnServerUpdateBansResultEvent; + public event PlayFabRequestEvent OnServerUpdateCharacterDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateCharacterDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateCharacterInternalDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateCharacterInternalDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateCharacterReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateCharacterReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateCharacterStatisticsRequestEvent; + public event PlayFabResultEvent OnServerUpdateCharacterStatisticsResultEvent; + public event PlayFabRequestEvent OnServerUpdatePlayerStatisticsRequestEvent; + public event PlayFabResultEvent OnServerUpdatePlayerStatisticsResultEvent; + public event PlayFabRequestEvent OnServerUpdateSharedGroupDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateSharedGroupDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateUserDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateUserDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateUserInternalDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateUserInternalDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateUserInventoryItemCustomDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateUserInventoryItemCustomDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateUserPublisherDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateUserPublisherDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateUserPublisherInternalDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateUserPublisherInternalDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateUserPublisherReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateUserPublisherReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnServerUpdateUserReadOnlyDataRequestEvent; + public event PlayFabResultEvent OnServerUpdateUserReadOnlyDataResultEvent; + public event PlayFabRequestEvent OnServerWriteCharacterEventRequestEvent; + public event PlayFabResultEvent OnServerWriteCharacterEventResultEvent; + public event PlayFabRequestEvent OnServerWritePlayerEventRequestEvent; + public event PlayFabResultEvent OnServerWritePlayerEventResultEvent; + public event PlayFabRequestEvent OnServerWriteTitleEventRequestEvent; + public event PlayFabResultEvent OnServerWriteTitleEventResultEvent; + } +} +#endif diff --git a/Assets/PlayFabSDK/Server/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Server/PlayFabEvents.cs.meta new file mode 100644 index 00000000..0cac239c --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d5076be1f923f141a2a5ea2a53a1385 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Server/PlayFabServerAPI.cs b/Assets/PlayFabSDK/Server/PlayFabServerAPI.cs new file mode 100644 index 00000000..317d6b70 --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabServerAPI.cs @@ -0,0 +1,1921 @@ +#if ENABLE_PLAYFABSERVER_API && !DISABLE_PLAYFAB_STATIC_API + +using System; +using System.Collections.Generic; +using PlayFab.ServerModels; +using PlayFab.Internal; + +namespace PlayFab +{ + /// + /// Provides functionality to allow external (developer-controlled) servers to interact with user inventories and data in a + /// trusted manner, and to handle matchmaking and client connection orchestration + /// + public static class PlayFabServerAPI + { + static PlayFabServerAPI() {} + + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public static void ForgetAllCredentials() + { + PlayFabSettings.staticPlayer.ForgetAllCredentials(); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the character's balance of the specified virtual currency by the stated amount + /// + public static void AddCharacterVirtualCurrency(AddCharacterVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AddCharacterVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the Friend user to the friendlist of the user with PlayFabId. At least one of + /// FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + /// + public static void AddFriend(AddFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AddFriend", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab + /// ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as + /// authentication credentials, as the intent is that it is easily accessible by other players. + /// + public static void AddGenericID(AddGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AddGenericID", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public static void AddPlayerTag(AddPlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AddPlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users + /// in the group (and the server) can add new members. Shared Groups are designed for sharing data between a very small + /// number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void AddSharedGroupMembers(AddSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AddSharedGroupMembers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the user's balance of the specified virtual currency by the stated amount + /// + public static void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AddUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Validated a client's session ticket, and if successful, returns details for that user + /// + public static void AuthenticateSessionTicket(AuthenticateSessionTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AuthenticateSessionTicket", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Awards the specified users the specified Steam achievements + /// + public static void AwardSteamAchievement(AwardSteamAchievementRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/AwardSteamAchievement", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. + /// + public static void BanUsers(BanUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/BanUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's + /// inventory. + /// + public static void ConsumeItem(ConsumeItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/ConsumeItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the + /// group. When created by a server, the group will initially have no members. Shared Groups are designed for sharing data + /// between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void CreateSharedGroup(CreateSharedGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/CreateSharedGroup", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes the specific character ID from the specified user. + /// + public static void DeleteCharacterFromUser(DeleteCharacterFromUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/DeleteCharacterFromUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes a user's player account from a title and deletes all associated data + /// + public static void DeletePlayer(DeletePlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/DeletePlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes push notification template for title + /// + public static void DeletePushNotificationTemplate(DeletePushNotificationTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/DeletePushNotificationTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Deletes a shared group, freeing up the shared group ID to be reused for a new group. Shared Groups are designed for + /// sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void DeleteSharedGroup(DeleteSharedGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/DeleteSharedGroup", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Returns the result of an evaluation of a Random Result Table - the ItemId from the game Catalog which would + /// have been added to the player inventory, if the Random Result Table were added via a Bundle or a call to + /// UnlockContainer. + /// + public static void EvaluateRandomResultTable(EvaluateRandomResultTableRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/EvaluateRandomResultTable", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player. The + /// PlayFab ID is the entity ID of the player's master_player_account entity. + /// + public static void ExecuteCloudScript(ExecuteCloudScriptServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/ExecuteCloudScript", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + public static void ExecuteCloudScript(ExecuteCloudScriptServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); + Action wrappedResultCallback = (wrappedResult) => + { + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var wrappedJson = serializer.SerializeObject(wrappedResult.FunctionResult); + try { + wrappedResult.FunctionResult = serializer.DeserializeObject(wrappedJson); + } catch (Exception) { + wrappedResult.FunctionResult = wrappedJson; + wrappedResult.Logs.Add(new LogStatement { Level = "Warning", Data = wrappedJson, Message = "Sdk Message: Could not deserialize result as: " + typeof(TOut).Name }); + } + resultCallback(wrappedResult); + }; + PlayFabHttp.MakeApiCall("/Server/ExecuteCloudScript", request, AuthType.DevSecretKey, wrappedResultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as + /// GetPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not change. + /// + public static void GetAllSegments(GetAllSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetAllSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be + /// evaluated with the parent PlayFabId to guarantee uniqueness. + /// + public static void GetAllUsersCharacters(ListUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetAllUsersCharacters", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public static void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public static void GetCharacterData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetCharacterData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user's character which cannot be accessed by the client + /// + public static void GetCharacterInternalData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetCharacterInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified character's current inventory of virtual goods + /// + public static void GetCharacterInventory(GetCharacterInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetCharacterInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard + /// + public static void GetCharacterLeaderboard(GetCharacterLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetCharacterLeaderboard", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user's character which can only be read by the client + /// + public static void GetCharacterReadOnlyData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetCharacterReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the details of all title-specific statistics for the specific character + /// + public static void GetCharacterStatistics(GetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned + /// URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the + /// content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, + /// the query to retrieve the data will fail. See this post for more information: + /// https://community.playfab.com/hc/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also, + /// please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply. + /// + public static void GetContentDownloadUrl(GetContentDownloadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetContentDownloadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the + /// leaderboard + /// + public static void GetFriendLeaderboard(GetFriendLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetFriendLeaderboard", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from + /// linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + /// + public static void GetFriendsList(GetFriendsListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetFriendsList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard + /// + public static void GetLeaderboard(GetLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetLeaderboard", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, centered on the requested user + /// + public static void GetLeaderboardAroundCharacter(GetLeaderboardAroundCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetLeaderboardAroundCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of ranked users for the given statistic, centered on the currently signed-in user + /// + public static void GetLeaderboardAroundUser(GetLeaderboardAroundUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetLeaderboardAroundUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves a list of all of the user's characters for the given statistic. + /// + public static void GetLeaderboardForUserCharacters(GetLeaderboardForUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetLeaderboardForUserCharacters", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Returns whatever info is requested in the response for the user. Note that PII (like email address, facebook id) may be + /// returned. All parameters default to false. + /// + public static void GetPlayerCombinedInfo(GetPlayerCombinedInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayerCombinedInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the player's profile + /// + public static void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayerProfile", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public static void GetPlayerSegments(GetPlayersSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayerSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Allows for paging through all players in a given segment. This API creates a snapshot of all player profiles that match + /// the segment definition at the time of its creation and lives through the Total Seconds to Live, refreshing its life span + /// on each subsequent use of the Continuation Token. Profiles that change during the course of paging will not be reflected + /// in the results. AB Test segments are currently not supported by this operation. NOTE: This API is limited to being + /// called 30 times in one minute. You will be returned an error if you exceed this threshold. + /// + public static void GetPlayersInSegment(GetPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the current version and values for the indicated statistics, for the local player. + /// + public static void GetPlayerStatistics(GetPlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayerStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public static void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayerStatisticVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public static void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayerTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers. + /// + public static void GetPlayFabIDsFromFacebookIDs(GetPlayFabIDsFromFacebookIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromFacebookIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook Instant Games identifiers. + /// + public static void GetPlayFabIDsFromFacebookInstantGamesIds(GetPlayFabIDsFromFacebookInstantGamesIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromFacebookInstantGamesIds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the + /// service name plus the service-specific ID for the player, as specified by the title when the generic identifier was + /// added to the player account. + /// + public static void GetPlayFabIDsFromGenericIDs(GetPlayFabIDsFromGenericIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromGenericIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Service Account identifiers. + /// + public static void GetPlayFabIDsFromNintendoServiceAccountIds(GetPlayFabIDsFromNintendoServiceAccountIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromNintendoServiceAccountIds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Switch Device identifiers. + /// + public static void GetPlayFabIDsFromNintendoSwitchDeviceIds(GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromNintendoSwitchDeviceIds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public static void GetPlayFabIDsFromPSNAccountIDs(GetPlayFabIDsFromPSNAccountIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromPSNAccountIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public static void GetPlayFabIDsFromPSNOnlineIDs(GetPlayFabIDsFromPSNOnlineIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromPSNOnlineIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile + /// IDs for the user accounts, available as SteamId in the Steamworks Community API calls. + /// + public static void GetPlayFabIDsFromSteamIDs(GetPlayFabIDsFromSteamIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromSteamIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for + /// the user accounts, available as "_id" from the Twitch API methods (ex: + /// https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser). + /// + public static void GetPlayFabIDsFromTwitchIDs(GetPlayFabIDsFromTwitchIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromTwitchIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of XboxLive identifiers. + /// + public static void GetPlayFabIDsFromXboxLiveIDs(GetPlayFabIDsFromXboxLiveIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromXboxLiveIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public static void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the configuration information for the specified random results tables for the title, including all + /// ItemId values and weights + /// + public static void GetRandomResultTables(GetRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the associated PlayFab account identifiers for the given set of server custom identifiers. + /// + public static void GetServerCustomIDsFromPlayFabIDs(GetServerCustomIDsFromPlayFabIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetServerCustomIDsFromPlayFabIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves data stored in a shared group object, as well as the list of members in the group. The server can access all + /// public and private group data. Shared Groups are designed for sharing data between a very small number of players, + /// please see our guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void GetSharedGroupData(GetSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetSharedGroupData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the set of items defined for the specified store, including all prices defined, for the specified + /// player + /// + public static void GetStoreItems(GetStoreItemsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the current server time + /// + public static void GetTime(GetTimeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetTime", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom title settings + /// + public static void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the key-value store of custom internal title settings + /// + public static void GetTitleInternalData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title news feed, as configured in the developer portal + /// + public static void GetTitleNews(GetTitleNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetTitleNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the relevant details for a specified user + /// + public static void GetUserAccountInfo(GetUserAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserAccountInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Gets all bans for a user. + /// + public static void GetUserBans(GetUserBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which cannot be accessed by the client + /// + public static void GetUserInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified user's current inventory of virtual goods + /// + public static void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which cannot be accessed by the client + /// + public static void GetUserPublisherInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public static void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public static void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GetUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated + /// with the parent PlayFabId to guarantee uniqueness. + /// + public static void GrantCharacterToUser(GrantCharacterToUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GrantCharacterToUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified character's inventory + /// + public static void GrantItemsToCharacter(GrantItemsToCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GrantItemsToCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified user's inventory + /// + public static void GrantItemsToUser(GrantItemsToUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GrantItemsToUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified user inventories + /// + public static void GrantItemsToUsers(GrantItemsToUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/GrantItemsToUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Nintendo account associated with the token to the user's PlayFab account + /// + public static void LinkNintendoServiceAccount(LinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkNintendoServiceAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Nintendo account associated with the Nintendo Service Account subject or id to the user's PlayFab account + /// + public static void LinkNintendoServiceAccountSubject(LinkNintendoServiceAccountSubjectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkNintendoServiceAccountSubject", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the NintendoSwitchDeviceId to the user's PlayFab account + /// + public static void LinkNintendoSwitchDeviceId(LinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkNintendoSwitchDeviceId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the PlayStation :tm: Network account associated with the provided access code to the user's PlayFab account + /// + public static void LinkPSNAccount(LinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkPSNAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the PlayStation :tm: Network account associated with the provided user id to the user's PlayFab account + /// + public static void LinkPSNId(LinkPSNIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkPSNId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the custom server identifier, generated by the title, to the user's PlayFab account. + /// + public static void LinkServerCustomId(LinkServerCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkServerCustomId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Steam account associated with the provided Steam ID to the user's PlayFab account + /// + public static void LinkSteamId(LinkSteamIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkSteamId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Links the Xbox Live account associated with the provided access code to the user's PlayFab account + /// + public static void LinkXboxAccount(LinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LinkXboxAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a PlayStation :tm: Network authentication code, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public static void LoginWithPSN(LoginWithPSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LoginWithPSN", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Securely login a game client from an external server backend using a custom identifier for that player. Server Custom ID + /// and Client Custom ID are mutually exclusive and cannot be used to retrieve the same player account. + /// + public static void LoginWithServerCustomId(LoginWithServerCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LoginWithServerCustomId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using an Steam ID, returning a session identifier that can subsequently be used for API calls which + /// require an authenticated user + /// + public static void LoginWithSteamId(LoginWithSteamIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LoginWithSteamId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using a Xbox Live Token from an external server backend, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public static void LoginWithXbox(LoginWithXboxRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LoginWithXbox", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Signs the user in using an Xbox ID and Sandbox ID, returning a session identifier that can subsequently be used for API + /// calls which require an authenticated user + /// + public static void LoginWithXboxId(LoginWithXboxIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/LoginWithXboxId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Modifies the number of remaining uses of a player's inventory item + /// + public static void ModifyItemUses(ModifyItemUsesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/ModifyItemUses", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Moves an item from a character's inventory into another of the users's character's inventory. + /// + public static void MoveItemToCharacterFromCharacter(MoveItemToCharacterFromCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/MoveItemToCharacterFromCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Moves an item from a user's inventory into their character's inventory. + /// + public static void MoveItemToCharacterFromUser(MoveItemToCharacterFromUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/MoveItemToCharacterFromUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Moves an item from a character's inventory into the owning user's inventory. + /// + public static void MoveItemToUserFromCharacter(MoveItemToUserFromCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/MoveItemToUserFromCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the + /// Economy->Catalogs tab in the PlayFab Game Manager. + /// + public static void RedeemCoupon(RedeemCouponRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RedeemCoupon", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes the specified friend from the the user's friend list + /// + public static void RemoveFriend(RemoveFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RemoveFriend", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes the specified generic service identifier from the player's PlayFab account. + /// + public static void RemoveGenericID(RemoveGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RemoveGenericID", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public static void RemovePlayerTag(RemovePlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RemovePlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the + /// group can remove members. If as a result of the call, zero users remain with access, the group and its associated data + /// will be deleted. Shared Groups are designed for sharing data between a very small number of players, please see our + /// guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void RemoveSharedGroupMembers(RemoveSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RemoveSharedGroupMembers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service + /// representatives for the title can take action concerning potentially toxic players. + /// + public static void ReportPlayer(ReportPlayerServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/ReportPlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revoke all active bans for a user. + /// + public static void RevokeAllBansForUser(RevokeAllBansForUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RevokeAllBansForUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Revoke all active bans specified with BanId. + /// + public static void RevokeBans(RevokeBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RevokeBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access to an item in a user's inventory + /// + public static void RevokeInventoryItem(RevokeInventoryItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RevokeInventoryItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access for up to 25 items across multiple users and characters. + /// + public static void RevokeInventoryItems(RevokeInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/RevokeInventoryItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Saves push notification template for title + /// + public static void SavePushNotificationTemplate(SavePushNotificationTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SavePushNotificationTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Forces an email to be sent to the registered contact email address for the user's account based on an account recovery + /// email template + /// + public static void SendCustomAccountRecoveryEmail(SendCustomAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SendCustomAccountRecoveryEmail", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sends an email based on an email template to a player's contact email + /// + public static void SendEmailFromTemplate(SendEmailFromTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SendEmailFromTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sends an iOS/Android Push Notification to a specific user, if that user's device has been configured for Push + /// Notifications in PlayFab. If a user has linked both Android and iOS devices, both will be notified. + /// + public static void SendPushNotification(SendPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SendPushNotification", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sends an iOS/Android Push Notification template to a specific user, if that user's device has been configured for Push + /// Notifications in PlayFab. If a user has linked both Android and iOS devices, both will be notified. + /// + public static void SendPushNotificationFromTemplate(SendPushNotificationFromTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SendPushNotificationFromTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the tag list for a specified user in the friend list of another user + /// + public static void SetFriendTags(SetFriendTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SetFriendTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's + /// secret use the Admin or Server API method SetPlayerSecret. + /// + public static void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SetPlayerSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the key-value store of custom publisher settings + /// + public static void SetPublisherData(SetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the key-value store of custom title settings + /// + public static void SetTitleData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the key-value store of custom title settings + /// + public static void SetTitleInternalData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the character's balance of the specified virtual currency by the stated amount. It is possible to + /// make a VC balance negative with this API. + /// + public static void SubtractCharacterVirtualCurrency(SubtractCharacterVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SubtractCharacterVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make + /// a VC balance negative with this API. + /// + public static void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/SubtractUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Nintendo account from the user's PlayFab account + /// + public static void UnlinkNintendoServiceAccount(UnlinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlinkNintendoServiceAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related NintendoSwitchDeviceId from the user's PlayFab account + /// + public static void UnlinkNintendoSwitchDeviceId(UnlinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlinkNintendoSwitchDeviceId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related PlayStation :tm: Network account from the user's PlayFab account + /// + public static void UnlinkPSNAccount(UnlinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlinkPSNAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the custom server identifier from the user's PlayFab account. + /// + public static void UnlinkServerCustomId(UnlinkServerCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlinkServerCustomId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the Steam account associated with the provided Steam ID to the user's PlayFab account + /// + public static void UnlinkSteamId(UnlinkSteamIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlinkSteamId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Unlinks the related Xbox Live account from the user's PlayFab account + /// + public static void UnlinkXboxAccount(UnlinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlinkXboxAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when + /// required), and returns the contents of the opened container. If the container (and key when relevant) are consumable + /// (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + /// + public static void UnlockContainerInstance(UnlockContainerInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlockContainerInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary + /// unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when + /// relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of + /// ConsumeItem. + /// + public static void UnlockContainerItem(UnlockContainerItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UnlockContainerItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Update the avatar URL of the specified player + /// + public static void UpdateAvatarUrl(UpdateAvatarUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateAvatarUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates information of a list of existing bans specified with Ban Ids. + /// + public static void UpdateBans(UpdateBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user's character which is readable and writable by the client + /// + public static void UpdateCharacterData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user's character which cannot be accessed by the client + /// + public static void UpdateCharacterInternalData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user's character which can only be read by the client + /// + public static void UpdateCharacterReadOnlyData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the values of the specified title-specific statistics for the specific character + /// + public static void UpdateCharacterStatistics(UpdateCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the values of the specified title-specific statistics for the user + /// + public static void UpdatePlayerStatistics(UpdatePlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdatePlayerStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated + /// or added in this call will be readable by users not in the group. By default, data permissions are set to Private. + /// Regardless of the permission setting, only members of the group (and the server) can update the data. Shared Groups are + /// designed for sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public static void UpdateSharedGroupData(UpdateSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateSharedGroupData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which cannot be accessed by the client + /// + public static void UpdateUserInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates the key-value pair data tagged to the specified item, which is read-only from the client. + /// + public static void UpdateUserInventoryItemCustomData(UpdateUserInventoryItemDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateUserInventoryItemCustomData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public static void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which cannot be accessed by the client + /// + public static void UpdateUserPublisherInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the publisher-specific custom data for the user which can only be read by the client + /// + public static void UpdateUserPublisherReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Updates the title-specific custom data for the user which can only be read by the client + /// + public static void UpdateUserReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/UpdateUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Writes a character-based event into PlayStream. + /// + public static void WriteCharacterEvent(WriteServerCharacterEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/WriteCharacterEvent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Writes a player-based event into PlayStream. + /// + public static void WritePlayerEvent(WriteServerPlayerEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/WritePlayerEvent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + /// + /// Writes a title-based event into PlayStream. + /// + public static void WriteTitleEvent(WriteTitleEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; + var callSettings = PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + + + PlayFabHttp.MakeApiCall("/Server/WriteTitleEvent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings); + } + + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Server/PlayFabServerAPI.cs.meta b/Assets/PlayFabSDK/Server/PlayFabServerAPI.cs.meta new file mode 100644 index 00000000..259a32e7 --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabServerAPI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d1e12172e1632754fa9cf42f58d7bc9e +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Server/PlayFabServerInstanceAPI.cs b/Assets/PlayFabSDK/Server/PlayFabServerInstanceAPI.cs new file mode 100644 index 00000000..7c7771d2 --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabServerInstanceAPI.cs @@ -0,0 +1,1668 @@ +#if ENABLE_PLAYFABSERVER_API + +using System; +using System.Collections.Generic; +using PlayFab.ServerModels; +using PlayFab.Internal; +using PlayFab.SharedModels; + +namespace PlayFab +{ + /// + /// Provides functionality to allow external (developer-controlled) servers to interact with user inventories and data in a + /// trusted manner, and to handle matchmaking and client connection orchestration + /// + public class PlayFabServerInstanceAPI : IPlayFabInstanceApi + { + public readonly PlayFabApiSettings apiSettings = null; + public readonly PlayFabAuthenticationContext authenticationContext = null; + + public PlayFabServerInstanceAPI() { } + + public PlayFabServerInstanceAPI(PlayFabApiSettings settings) + { + apiSettings = settings; + } + + public PlayFabServerInstanceAPI(PlayFabAuthenticationContext context) + { + authenticationContext = context; + } + + public PlayFabServerInstanceAPI(PlayFabApiSettings settings, PlayFabAuthenticationContext context) + { + apiSettings = settings; + authenticationContext = context; + } + + /// + /// Clear the Client SessionToken which allows this Client to call API calls requiring login. + /// A new/fresh login will be required after calling this. + /// + public void ForgetAllCredentials() + { + if (authenticationContext != null) + { + authenticationContext.ForgetAllCredentials(); + } + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the character's balance of the specified virtual currency by the stated amount + /// + public void AddCharacterVirtualCurrency(AddCharacterVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AddCharacterVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds the Friend user to the friendlist of the user with PlayFabId. At least one of + /// FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized. + /// + public void AddFriend(AddFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AddFriend", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab + /// ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as + /// authentication credentials, as the intent is that it is easily accessible by other players. + /// + public void AddGenericID(AddGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AddGenericID", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public void AddPlayerTag(AddPlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AddPlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users + /// in the group (and the server) can add new members. Shared Groups are designed for sharing data between a very small + /// number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void AddSharedGroupMembers(AddSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AddSharedGroupMembers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Increments the user's balance of the specified virtual currency by the stated amount + /// + public void AddUserVirtualCurrency(AddUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AddUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Validated a client's session ticket, and if successful, returns details for that user + /// + public void AuthenticateSessionTicket(AuthenticateSessionTicketRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AuthenticateSessionTicket", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Awards the specified users the specified Steam achievements + /// + public void AwardSteamAchievement(AwardSteamAchievementRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/AwardSteamAchievement", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. + /// + public void BanUsers(BanUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/BanUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's + /// inventory. + /// + public void ConsumeItem(ConsumeItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/ConsumeItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the + /// group. When created by a server, the group will initially have no members. Shared Groups are designed for sharing data + /// between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void CreateSharedGroup(CreateSharedGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/CreateSharedGroup", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes the specific character ID from the specified user. + /// + public void DeleteCharacterFromUser(DeleteCharacterFromUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/DeleteCharacterFromUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes a user's player account from a title and deletes all associated data + /// + public void DeletePlayer(DeletePlayerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/DeletePlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes push notification template for title + /// + public void DeletePushNotificationTemplate(DeletePushNotificationTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/DeletePushNotificationTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Deletes a shared group, freeing up the shared group ID to be reused for a new group. Shared Groups are designed for + /// sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void DeleteSharedGroup(DeleteSharedGroupRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/DeleteSharedGroup", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Returns the result of an evaluation of a Random Result Table - the ItemId from the game Catalog which would + /// have been added to the player inventory, if the Random Result Table were added via a Bundle or a call to + /// UnlockContainer. + /// + public void EvaluateRandomResultTable(EvaluateRandomResultTableRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/EvaluateRandomResultTable", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player. The + /// PlayFab ID is the entity ID of the player's master_player_account entity. + /// + public void ExecuteCloudScript(ExecuteCloudScriptServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/ExecuteCloudScript", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + public void ExecuteCloudScript(ExecuteCloudScriptServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); + Action wrappedResultCallback = (wrappedResult) => + { + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var wrappedJson = serializer.SerializeObject(wrappedResult.FunctionResult); + try { + wrappedResult.FunctionResult = serializer.DeserializeObject(wrappedJson); + } catch (Exception) { + wrappedResult.FunctionResult = wrappedJson; + wrappedResult.Logs.Add(new LogStatement { Level = "Warning", Data = wrappedJson, Message = "Sdk Message: Could not deserialize result as: " + typeof(TOut).Name }); + } + resultCallback(wrappedResult); + }; + PlayFabHttp.MakeApiCall("/Server/ExecuteCloudScript", request, AuthType.DevSecretKey, wrappedResultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as + /// GetPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not change. + /// + public void GetAllSegments(GetAllSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetAllSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be + /// evaluated with the parent PlayFabId to guarantee uniqueness. + /// + public void GetAllUsersCharacters(ListUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetAllUsersCharacters", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified version of the title's catalog of virtual goods, including all defined properties + /// + public void GetCatalogItems(GetCatalogItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetCatalogItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public void GetCharacterData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetCharacterData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user's character which cannot be accessed by the client + /// + public void GetCharacterInternalData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetCharacterInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified character's current inventory of virtual goods + /// + public void GetCharacterInventory(GetCharacterInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetCharacterInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard + /// + public void GetCharacterLeaderboard(GetCharacterLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetCharacterLeaderboard", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user's character which can only be read by the client + /// + public void GetCharacterReadOnlyData(GetCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetCharacterReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the details of all title-specific statistics for the specific character + /// + public void GetCharacterStatistics(GetCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned + /// URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the + /// content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, + /// the query to retrieve the data will fail. See this post for more information: + /// https://community.playfab.com/hc/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also, + /// please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply. + /// + public void GetContentDownloadUrl(GetContentDownloadUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetContentDownloadUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the + /// leaderboard + /// + public void GetFriendLeaderboard(GetFriendLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetFriendLeaderboard", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from + /// linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends. + /// + public void GetFriendsList(GetFriendsListRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetFriendsList", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard + /// + public void GetLeaderboard(GetLeaderboardRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetLeaderboard", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked characters for the given statistic, centered on the requested user + /// + public void GetLeaderboardAroundCharacter(GetLeaderboardAroundCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetLeaderboardAroundCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of ranked users for the given statistic, centered on the currently signed-in user + /// + public void GetLeaderboardAroundUser(GetLeaderboardAroundUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetLeaderboardAroundUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves a list of all of the user's characters for the given statistic. + /// + public void GetLeaderboardForUserCharacters(GetLeaderboardForUsersCharactersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetLeaderboardForUserCharacters", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Returns whatever info is requested in the response for the user. Note that PII (like email address, facebook id) may be + /// returned. All parameters default to false. + /// + public void GetPlayerCombinedInfo(GetPlayerCombinedInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayerCombinedInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the player's profile + /// + public void GetPlayerProfile(GetPlayerProfileRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayerProfile", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// List all segments that a player currently belongs to at this moment in time. + /// + public void GetPlayerSegments(GetPlayersSegmentsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayerSegments", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Allows for paging through all players in a given segment. This API creates a snapshot of all player profiles that match + /// the segment definition at the time of its creation and lives through the Total Seconds to Live, refreshing its life span + /// on each subsequent use of the Continuation Token. Profiles that change during the course of paging will not be reflected + /// in the results. AB Test segments are currently not supported by this operation. NOTE: This API is limited to being + /// called 30 times in one minute. You will be returned an error if you exceed this threshold. + /// + public void GetPlayersInSegment(GetPlayersInSegmentRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayersInSegment", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the current version and values for the indicated statistics, for the local player. + /// + public void GetPlayerStatistics(GetPlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayerStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the information on the available versions of the specified statistic. + /// + public void GetPlayerStatisticVersions(GetPlayerStatisticVersionsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayerStatisticVersions", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Get all tags with a given Namespace (optional) from a player profile. + /// + public void GetPlayerTags(GetPlayerTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayerTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers. + /// + public void GetPlayFabIDsFromFacebookIDs(GetPlayFabIDsFromFacebookIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromFacebookIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Facebook Instant Games identifiers. + /// + public void GetPlayFabIDsFromFacebookInstantGamesIds(GetPlayFabIDsFromFacebookInstantGamesIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromFacebookInstantGamesIds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the + /// service name plus the service-specific ID for the player, as specified by the title when the generic identifier was + /// added to the player account. + /// + public void GetPlayFabIDsFromGenericIDs(GetPlayFabIDsFromGenericIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromGenericIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Service Account identifiers. + /// + public void GetPlayFabIDsFromNintendoServiceAccountIds(GetPlayFabIDsFromNintendoServiceAccountIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromNintendoServiceAccountIds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Nintendo Switch Device identifiers. + /// + public void GetPlayFabIDsFromNintendoSwitchDeviceIds(GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromNintendoSwitchDeviceIds", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public void GetPlayFabIDsFromPSNAccountIDs(GetPlayFabIDsFromPSNAccountIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromPSNAccountIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers. + /// + public void GetPlayFabIDsFromPSNOnlineIDs(GetPlayFabIDsFromPSNOnlineIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromPSNOnlineIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile + /// IDs for the user accounts, available as SteamId in the Steamworks Community API calls. + /// + public void GetPlayFabIDsFromSteamIDs(GetPlayFabIDsFromSteamIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromSteamIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for + /// the user accounts, available as "_id" from the Twitch API methods (ex: + /// https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser). + /// + public void GetPlayFabIDsFromTwitchIDs(GetPlayFabIDsFromTwitchIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromTwitchIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the unique PlayFab identifiers for the given set of XboxLive identifiers. + /// + public void GetPlayFabIDsFromXboxLiveIDs(GetPlayFabIDsFromXboxLiveIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPlayFabIDsFromXboxLiveIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom publisher settings + /// + public void GetPublisherData(GetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the configuration information for the specified random results tables for the title, including all + /// ItemId values and weights + /// + public void GetRandomResultTables(GetRandomResultTablesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetRandomResultTables", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the associated PlayFab account identifiers for the given set of server custom identifiers. + /// + public void GetServerCustomIDsFromPlayFabIDs(GetServerCustomIDsFromPlayFabIDsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetServerCustomIDsFromPlayFabIDs", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves data stored in a shared group object, as well as the list of members in the group. The server can access all + /// public and private group data. Shared Groups are designed for sharing data between a very small number of players, + /// please see our guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void GetSharedGroupData(GetSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetSharedGroupData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the set of items defined for the specified store, including all prices defined, for the specified + /// player + /// + public void GetStoreItems(GetStoreItemsServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetStoreItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the current server time + /// + public void GetTime(GetTimeRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetTime", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom title settings + /// + public void GetTitleData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the key-value store of custom internal title settings + /// + public void GetTitleInternalData(GetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title news feed, as configured in the developer portal + /// + public void GetTitleNews(GetTitleNewsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetTitleNews", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the relevant details for a specified user + /// + public void GetUserAccountInfo(GetUserAccountInfoRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserAccountInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Gets all bans for a user. + /// + public void GetUserBans(GetUserBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which is readable and writable by the client + /// + public void GetUserData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which cannot be accessed by the client + /// + public void GetUserInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Retrieves the specified user's current inventory of virtual goods + /// + public void GetUserInventory(GetUserInventoryRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserInventory", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which is readable and writable by the client + /// + public void GetUserPublisherData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which cannot be accessed by the client + /// + public void GetUserPublisherInternalData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the publisher-specific custom data for the user which can only be read by the client + /// + public void GetUserPublisherReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Retrieves the title-specific custom data for the user which can only be read by the client + /// + public void GetUserReadOnlyData(GetUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GetUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated + /// with the parent PlayFabId to guarantee uniqueness. + /// + public void GrantCharacterToUser(GrantCharacterToUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GrantCharacterToUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified character's inventory + /// + public void GrantItemsToCharacter(GrantItemsToCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GrantItemsToCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified user's inventory + /// + public void GrantItemsToUser(GrantItemsToUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GrantItemsToUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the specified items to the specified user inventories + /// + public void GrantItemsToUsers(GrantItemsToUsersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/GrantItemsToUsers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Nintendo account associated with the token to the user's PlayFab account + /// + public void LinkNintendoServiceAccount(LinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkNintendoServiceAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Nintendo account associated with the Nintendo Service Account subject or id to the user's PlayFab account + /// + public void LinkNintendoServiceAccountSubject(LinkNintendoServiceAccountSubjectRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkNintendoServiceAccountSubject", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the NintendoSwitchDeviceId to the user's PlayFab account + /// + public void LinkNintendoSwitchDeviceId(LinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkNintendoSwitchDeviceId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the PlayStation :tm: Network account associated with the provided access code to the user's PlayFab account + /// + public void LinkPSNAccount(LinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkPSNAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the PlayStation :tm: Network account associated with the provided user id to the user's PlayFab account + /// + public void LinkPSNId(LinkPSNIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkPSNId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the custom server identifier, generated by the title, to the user's PlayFab account. + /// + public void LinkServerCustomId(LinkServerCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkServerCustomId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Steam account associated with the provided Steam ID to the user's PlayFab account + /// + public void LinkSteamId(LinkSteamIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkSteamId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Links the Xbox Live account associated with the provided access code to the user's PlayFab account + /// + public void LinkXboxAccount(LinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LinkXboxAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a PlayStation :tm: Network authentication code, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public void LoginWithPSN(LoginWithPSNRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LoginWithPSN", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Securely login a game client from an external server backend using a custom identifier for that player. Server Custom ID + /// and Client Custom ID are mutually exclusive and cannot be used to retrieve the same player account. + /// + public void LoginWithServerCustomId(LoginWithServerCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LoginWithServerCustomId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using an Steam ID, returning a session identifier that can subsequently be used for API calls which + /// require an authenticated user + /// + public void LoginWithSteamId(LoginWithSteamIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LoginWithSteamId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using a Xbox Live Token from an external server backend, returning a session identifier that can + /// subsequently be used for API calls which require an authenticated user + /// + public void LoginWithXbox(LoginWithXboxRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LoginWithXbox", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Signs the user in using an Xbox ID and Sandbox ID, returning a session identifier that can subsequently be used for API + /// calls which require an authenticated user + /// + public void LoginWithXboxId(LoginWithXboxIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/LoginWithXboxId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Modifies the number of remaining uses of a player's inventory item + /// + public void ModifyItemUses(ModifyItemUsesRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/ModifyItemUses", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Moves an item from a character's inventory into another of the users's character's inventory. + /// + public void MoveItemToCharacterFromCharacter(MoveItemToCharacterFromCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/MoveItemToCharacterFromCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Moves an item from a user's inventory into their character's inventory. + /// + public void MoveItemToCharacterFromUser(MoveItemToCharacterFromUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/MoveItemToCharacterFromUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Moves an item from a character's inventory into the owning user's inventory. + /// + public void MoveItemToUserFromCharacter(MoveItemToUserFromCharacterRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/MoveItemToUserFromCharacter", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the + /// Economy->Catalogs tab in the PlayFab Game Manager. + /// + public void RedeemCoupon(RedeemCouponRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RedeemCoupon", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes the specified friend from the the user's friend list + /// + public void RemoveFriend(RemoveFriendRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RemoveFriend", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes the specified generic service identifier from the player's PlayFab account. + /// + public void RemoveGenericID(RemoveGenericIDRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RemoveGenericID", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag. + /// + public void RemovePlayerTag(RemovePlayerTagRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RemovePlayerTag", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the + /// group can remove members. If as a result of the call, zero users remain with access, the group and its associated data + /// will be deleted. Shared Groups are designed for sharing data between a very small number of players, please see our + /// guide: https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void RemoveSharedGroupMembers(RemoveSharedGroupMembersRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RemoveSharedGroupMembers", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service + /// representatives for the title can take action concerning potentially toxic players. + /// + public void ReportPlayer(ReportPlayerServerRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/ReportPlayer", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revoke all active bans for a user. + /// + public void RevokeAllBansForUser(RevokeAllBansForUserRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RevokeAllBansForUser", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Revoke all active bans specified with BanId. + /// + public void RevokeBans(RevokeBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RevokeBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access to an item in a user's inventory + /// + public void RevokeInventoryItem(RevokeInventoryItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RevokeInventoryItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Revokes access for up to 25 items across multiple users and characters. + /// + public void RevokeInventoryItems(RevokeInventoryItemsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/RevokeInventoryItems", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Saves push notification template for title + /// + public void SavePushNotificationTemplate(SavePushNotificationTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SavePushNotificationTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Forces an email to be sent to the registered contact email address for the user's account based on an account recovery + /// email template + /// + public void SendCustomAccountRecoveryEmail(SendCustomAccountRecoveryEmailRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SendCustomAccountRecoveryEmail", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sends an email based on an email template to a player's contact email + /// + public void SendEmailFromTemplate(SendEmailFromTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SendEmailFromTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sends an iOS/Android Push Notification to a specific user, if that user's device has been configured for Push + /// Notifications in PlayFab. If a user has linked both Android and iOS devices, both will be notified. + /// + public void SendPushNotification(SendPushNotificationRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SendPushNotification", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sends an iOS/Android Push Notification template to a specific user, if that user's device has been configured for Push + /// Notifications in PlayFab. If a user has linked both Android and iOS devices, both will be notified. + /// + public void SendPushNotificationFromTemplate(SendPushNotificationFromTemplateRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SendPushNotificationFromTemplate", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the tag list for a specified user in the friend list of another user + /// + public void SetFriendTags(SetFriendTagsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SetFriendTags", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's + /// secret use the Admin or Server API method SetPlayerSecret. + /// + public void SetPlayerSecret(SetPlayerSecretRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SetPlayerSecret", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the key-value store of custom publisher settings + /// + public void SetPublisherData(SetPublisherDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SetPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the key-value store of custom title settings + /// + public void SetTitleData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SetTitleData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the key-value store of custom title settings + /// + public void SetTitleInternalData(SetTitleDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SetTitleInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the character's balance of the specified virtual currency by the stated amount. It is possible to + /// make a VC balance negative with this API. + /// + public void SubtractCharacterVirtualCurrency(SubtractCharacterVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SubtractCharacterVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make + /// a VC balance negative with this API. + /// + public void SubtractUserVirtualCurrency(SubtractUserVirtualCurrencyRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/SubtractUserVirtualCurrency", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Nintendo account from the user's PlayFab account + /// + public void UnlinkNintendoServiceAccount(UnlinkNintendoServiceAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlinkNintendoServiceAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related NintendoSwitchDeviceId from the user's PlayFab account + /// + public void UnlinkNintendoSwitchDeviceId(UnlinkNintendoSwitchDeviceIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlinkNintendoSwitchDeviceId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related PlayStation :tm: Network account from the user's PlayFab account + /// + public void UnlinkPSNAccount(UnlinkPSNAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlinkPSNAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the custom server identifier from the user's PlayFab account. + /// + public void UnlinkServerCustomId(UnlinkServerCustomIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlinkServerCustomId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the Steam account associated with the provided Steam ID to the user's PlayFab account + /// + public void UnlinkSteamId(UnlinkSteamIdRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlinkSteamId", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Unlinks the related Xbox Live account from the user's PlayFab account + /// + public void UnlinkXboxAccount(UnlinkXboxAccountRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlinkXboxAccount", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when + /// required), and returns the contents of the opened container. If the container (and key when relevant) are consumable + /// (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + /// + public void UnlockContainerInstance(UnlockContainerInstanceRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlockContainerInstance", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary + /// unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when + /// relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of + /// ConsumeItem. + /// + public void UnlockContainerItem(UnlockContainerItemRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UnlockContainerItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Update the avatar URL of the specified player + /// + public void UpdateAvatarUrl(UpdateAvatarUrlRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateAvatarUrl", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates information of a list of existing bans specified with Ban Ids. + /// + public void UpdateBans(UpdateBansRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateBans", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user's character which is readable and writable by the client + /// + public void UpdateCharacterData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user's character which cannot be accessed by the client + /// + public void UpdateCharacterInternalData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user's character which can only be read by the client + /// + public void UpdateCharacterReadOnlyData(UpdateCharacterDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the values of the specified title-specific statistics for the specific character + /// + public void UpdateCharacterStatistics(UpdateCharacterStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateCharacterStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the values of the specified title-specific statistics for the user + /// + public void UpdatePlayerStatistics(UpdatePlayerStatisticsRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdatePlayerStatistics", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated + /// or added in this call will be readable by users not in the group. By default, data permissions are set to Private. + /// Regardless of the permission setting, only members of the group (and the server) can update the data. Shared Groups are + /// designed for sharing data between a very small number of players, please see our guide: + /// https://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data + /// + public void UpdateSharedGroupData(UpdateSharedGroupDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateSharedGroupData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateUserData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which cannot be accessed by the client + /// + public void UpdateUserInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateUserInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// _NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for + /// version 2._ Updates the key-value pair data tagged to the specified item, which is read-only from the client. + /// + public void UpdateUserInventoryItemCustomData(UpdateUserInventoryItemDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateUserInventoryItemCustomData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which is readable and writable by the client + /// + public void UpdateUserPublisherData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateUserPublisherData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which cannot be accessed by the client + /// + public void UpdateUserPublisherInternalData(UpdateUserInternalDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateUserPublisherInternalData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the publisher-specific custom data for the user which can only be read by the client + /// + public void UpdateUserPublisherReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateUserPublisherReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Updates the title-specific custom data for the user which can only be read by the client + /// + public void UpdateUserReadOnlyData(UpdateUserDataRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/UpdateUserReadOnlyData", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Writes a character-based event into PlayStream. + /// + public void WriteCharacterEvent(WriteServerCharacterEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/WriteCharacterEvent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Writes a player-based event into PlayStream. + /// + public void WritePlayerEvent(WriteServerPlayerEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/WritePlayerEvent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + /// + /// Writes a title-based event into PlayStream. + /// + public void WriteTitleEvent(WriteTitleEventRequest request, Action resultCallback, Action errorCallback, object customData = null, Dictionary extraHeaders = null) + { + var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; + var callSettings = apiSettings ?? PlayFabSettings.staticSettings; + if (string.IsNullOrEmpty(callSettings.DeveloperSecretKey)) { throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "Must set DeveloperSecretKey in settings to call this method"); } + PlayFabHttp.MakeApiCall("/Server/WriteTitleEvent", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); + } + + } +} + +#endif diff --git a/Assets/PlayFabSDK/Server/PlayFabServerInstanceAPI.cs.meta b/Assets/PlayFabSDK/Server/PlayFabServerInstanceAPI.cs.meta new file mode 100644 index 00000000..c087b059 --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabServerInstanceAPI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 76d4a622fa263d34b9f73488c0095f8b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Server/PlayFabServerModels.cs b/Assets/PlayFabSDK/Server/PlayFabServerModels.cs new file mode 100644 index 00000000..518490d5 --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabServerModels.cs @@ -0,0 +1,7374 @@ +#if ENABLE_PLAYFABSERVER_API +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.ServerModels +{ + [Serializable] + public class AdCampaignAttribution : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + [Serializable] + public class AdCampaignAttributionModel : PlayFabBaseModel + { + /// + /// UTC time stamp of attribution + /// + public DateTime AttributedAt; + /// + /// Attribution campaign identifier + /// + public string CampaignId; + /// + /// Attribution network name + /// + public string Platform; + } + + [Serializable] + public class AddCharacterVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be added to the character balance of the specified virtual currency. Maximum VC balance is Int32 + /// (2,147,483,647). Any increase over this value will be discarded. + /// + public int Amount; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab unique identifier of the user whose virtual currency balance is to be incremented. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be incremented. + /// + public string VirtualCurrency; + } + + [Serializable] + public class AddFriendRequest : PlayFabRequestCommon + { + /// + /// Email address of the user being added. + /// + public string FriendEmail; + /// + /// The PlayFab identifier of the user being added. + /// + public string FriendPlayFabId; + /// + /// Title-specific display name of the user to being added. + /// + public string FriendTitleDisplayName; + /// + /// The PlayFab username of the user being added + /// + public string FriendUsername; + /// + /// PlayFab identifier of the player to add a new friend. + /// + public string PlayFabId; + } + + [Serializable] + public class AddGenericIDRequest : PlayFabRequestCommon + { + /// + /// Generic service identifier to add to the player account. + /// + public GenericServiceId GenericId; + /// + /// PlayFabId of the user to link. + /// + public string PlayFabId; + } + + /// + /// This API will trigger a player_tag_added event and add a tag with the given TagName and PlayFabID to the corresponding + /// player profile. TagName can be used for segmentation and it is limited to 256 characters. Also there is a limit on the + /// number of tags a title can have. + /// + [Serializable] + public class AddPlayerTagRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique tag for player profile. + /// + public string TagName; + } + + [Serializable] + public class AddPlayerTagResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddSharedGroupMembersRequest : PlayFabRequestCommon + { + /// + /// An array of unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public List PlayFabIds; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class AddSharedGroupMembersResult : PlayFabResultCommon + { + } + + [Serializable] + public class AddUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be added to the user balance of the specified virtual currency. Maximum VC balance is Int32 (2,147,483,647). + /// Any increase over this value will be discarded. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab unique identifier of the user whose virtual currency balance is to be increased. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be incremented. + /// + public string VirtualCurrency; + } + + [Serializable] + public class AdvancedPushPlatformMsg : PlayFabBaseModel + { + /// + /// Stops GoogleCloudMessaging notifications from including both notification and data properties and instead only sends the + /// data property. + /// + public bool? GCMDataOnly; + /// + /// The Json the platform should receive. + /// + public string Json; + /// + /// The platform that should receive the Json. + /// + public PushNotificationPlatform Platform; + } + + /// + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class AuthenticateSessionTicketRequest : PlayFabRequestCommon + { + /// + /// Session ticket as issued by a PlayFab client login API. + /// + public string SessionTicket; + } + + [Serializable] + public class AuthenticateSessionTicketResult : PlayFabResultCommon + { + /// + /// Indicates if token was expired at request time. + /// + public bool? IsSessionTicketExpired; + /// + /// Account info for the user whose session ticket was supplied. + /// + public UserAccountInfo UserInfo; + } + + [Serializable] + public class AwardSteamAchievementItem : PlayFabBaseModel + { + /// + /// Unique Steam achievement name. + /// + public string AchievementName; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Result of the award attempt (only valid on response, not on request). + /// + public bool Result; + } + + [Serializable] + public class AwardSteamAchievementRequest : PlayFabRequestCommon + { + /// + /// Array of achievements to grant and the users to whom they are to be granted. + /// + public List Achievements; + } + + [Serializable] + public class AwardSteamAchievementResult : PlayFabResultCommon + { + /// + /// Array of achievements granted. + /// + public List AchievementResults; + } + + /// + /// Contains information for a ban. + /// + [Serializable] + public class BanInfo : PlayFabBaseModel + { + /// + /// The active state of this ban. Expired bans may still have this value set to true but they will have no effect. + /// + public bool Active; + /// + /// The unique Ban Id associated with this ban. + /// + public string BanId; + /// + /// The time when this ban was applied. + /// + public DateTime? Created; + /// + /// The time when this ban expires. Permanent bans do not have expiration date. + /// + public DateTime? Expires; + /// + /// The IP address on which the ban was applied. May affect multiple players. + /// + public string IPAddress; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The reason why this ban was applied. + /// + public string Reason; + /// + /// The family type of the suer that is included in the ban. + /// + public string UserFamilyType; + } + + /// + /// Represents a single ban request. + /// + [Serializable] + public class BanRequest : PlayFabBaseModel + { + /// + /// The duration in hours for the ban. Leave this blank for a permanent ban. + /// + public uint? DurationInHours; + /// + /// IP address to be banned. May affect multiple players. + /// + public string IPAddress; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The reason for this ban. Maximum 140 characters. + /// + public string Reason; + /// + /// The family type of the user that should be included in the ban if applicable. May affect multiple players. + /// + public UserFamilyType? UserFamilyType; + } + + /// + /// The existence of each user will not be verified. When banning by IP or MAC address, multiple players may be affected, so + /// use this feature with caution. Returns information about the new bans. + /// + [Serializable] + public class BanUsersRequest : PlayFabRequestCommon + { + /// + /// List of ban requests to be applied. Maximum 100. + /// + public List Bans; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + } + + [Serializable] + public class BanUsersResult : PlayFabResultCommon + { + /// + /// Information on the bans that were applied + /// + public List BanData; + } + + /// + /// A purchasable item from the item catalog + /// + [Serializable] + public class CatalogItem : PlayFabBaseModel + { + /// + /// defines the bundle properties for the item - bundles are items which contain other items, including random drop tables + /// and virtual currencies + /// + public CatalogItemBundleInfo Bundle; + /// + /// if true, then an item instance of this type can be used to grant a character to a user. + /// + public bool CanBecomeCharacter; + /// + /// catalog version for this item + /// + public string CatalogVersion; + /// + /// defines the consumable properties (number of uses, timeout) for the item + /// + public CatalogItemConsumableInfo Consumable; + /// + /// defines the container properties for the item - what items it contains, including random drop tables and virtual + /// currencies, and what item (if any) is required to open it via the UnlockContainerItem API + /// + public CatalogItemContainerInfo Container; + /// + /// game specific custom data + /// + public string CustomData; + /// + /// text description of item, to show in-game + /// + public string Description; + /// + /// text name for the item, to show in-game + /// + public string DisplayName; + /// + /// If the item has IsLImitedEdition set to true, and this is the first time this ItemId has been defined as a limited + /// edition item, this value determines the total number of instances to allocate for the title. Once this limit has been + /// reached, no more instances of this ItemId can be created, and attempts to purchase or grant it will return a Result of + /// false for that ItemId. If the item has already been defined to have a limited edition count, or if this value is less + /// than zero, it will be ignored. + /// + public int InitialLimitedEditionCount; + /// + /// BETA: If true, then only a fixed number can ever be granted. + /// + public bool IsLimitedEdition; + /// + /// if true, then only one item instance of this type will exist and its remaininguses will be incremented instead. + /// RemainingUses will cap out at Int32.Max (2,147,483,647). All subsequent increases will be discarded + /// + public bool IsStackable; + /// + /// if true, then an item instance of this type can be traded between players using the trading APIs + /// + public bool IsTradable; + /// + /// class to which the item belongs + /// + public string ItemClass; + /// + /// unique identifier for this item + /// + public string ItemId; + /// + /// URL to the item image. For Facebook purchase to display the image on the item purchase page, this must be set to an HTTP + /// URL. + /// + public string ItemImageUrl; + /// + /// override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// list of item tags + /// + public List Tags; + /// + /// price of this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + [Serializable] + public class CatalogItemBundleInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory when the bundle is added + /// + public List BundledItems; + /// + /// unique TableId values for all RandomResultTable objects which are part of the bundle (random tables will be resolved and + /// add the relevant items to the player inventory when the bundle is added) + /// + public List BundledResultTables; + /// + /// virtual currency types and balances which will be added to the player inventory when the bundle is added + /// + public Dictionary BundledVirtualCurrencies; + } + + [Serializable] + public class CatalogItemConsumableInfo : PlayFabBaseModel + { + /// + /// number of times this object can be used, after which it will be removed from the player inventory + /// + public uint? UsageCount; + /// + /// duration in seconds for how long the item will remain in the player inventory - once elapsed, the item will be removed + /// (recommended minimum value is 5 seconds, as lower values can cause the item to expire before operations depending on + /// this item's details have completed) + /// + public uint? UsagePeriod; + /// + /// all inventory item instances in the player inventory sharing a non-null UsagePeriodGroup have their UsagePeriod values + /// added together, and share the result - when that period has elapsed, all the items in the group will be removed + /// + public string UsagePeriodGroup; + } + + /// + /// Containers are inventory items that can hold other items defined in the catalog, as well as virtual currency, which is + /// added to the player inventory when the container is unlocked, using the UnlockContainerItem API. The items can be + /// anything defined in the catalog, as well as RandomResultTable objects which will be resolved when the container is + /// unlocked. Containers and their keys should be defined as Consumable (having a limited number of uses) in their catalog + /// defintiions, unless the intent is for the player to be able to re-use them infinitely. + /// + [Serializable] + public class CatalogItemContainerInfo : PlayFabBaseModel + { + /// + /// unique ItemId values for all items which will be added to the player inventory, once the container has been unlocked + /// + public List ItemContents; + /// + /// ItemId for the catalog item used to unlock the container, if any (if not specified, a call to UnlockContainerItem will + /// open the container, adding the contents to the player inventory and currency balances) + /// + public string KeyItemId; + /// + /// unique TableId values for all RandomResultTable objects which are part of the container (once unlocked, random tables + /// will be resolved and add the relevant items to the player inventory) + /// + public List ResultTableContents; + /// + /// virtual currency types and balances which will be added to the player inventory when the container is unlocked + /// + public Dictionary VirtualCurrencyContents; + } + + [Serializable] + public class CharacterInventory : PlayFabBaseModel + { + /// + /// The id of this character. + /// + public string CharacterId; + /// + /// The inventory of this character. + /// + public List Inventory; + } + + [Serializable] + public class CharacterLeaderboardEntry : PlayFabBaseModel + { + /// + /// PlayFab unique identifier of the character that belongs to the user for this leaderboard entry. + /// + public string CharacterId; + /// + /// Title-specific display name of the character for this leaderboard entry. + /// + public string CharacterName; + /// + /// Name of the character class for this entry. + /// + public string CharacterType; + /// + /// Title-specific display name of the user for this leaderboard entry. + /// + public string DisplayName; + /// + /// PlayFab unique identifier of the user for this leaderboard entry. + /// + public string PlayFabId; + /// + /// User's overall position in the leaderboard. + /// + public int Position; + /// + /// Specific value of the user's statistic. + /// + public int StatValue; + } + + [Serializable] + public class CharacterResult : PlayFabBaseModel + { + /// + /// The id for this character on this player. + /// + public string CharacterId; + /// + /// The name of this character. + /// + public string CharacterName; + /// + /// The type-string that was given to this character on creation. + /// + public string CharacterType; + } + + public enum ChurnRiskLevel + { + NoData, + LowRisk, + MediumRisk, + HighRisk + } + + public enum CloudScriptRevisionOption + { + Live, + Latest, + Specific + } + + [Serializable] + public class ConsumeItemRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Number of uses to consume from the item. + /// + public int ConsumeCount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique instance identifier of the item to be consumed. + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ConsumeItemResult : PlayFabResultCommon + { + /// + /// Unique instance identifier of the item with uses consumed. + /// + public string ItemInstanceId; + /// + /// Number of uses remaining on the item. + /// + public int RemainingUses; + } + + [Serializable] + public class ContactEmailInfo : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + [Serializable] + public class ContactEmailInfoModel : PlayFabBaseModel + { + /// + /// The email address + /// + public string EmailAddress; + /// + /// The name of the email info data + /// + public string Name; + /// + /// The verification status of the email + /// + public EmailVerificationStatus? VerificationStatus; + } + + public enum ContinentCode + { + AF, + AN, + AS, + EU, + NA, + OC, + SA, + Unknown + } + + public enum CountryCode + { + AF, + AX, + AL, + DZ, + AS, + AD, + AO, + AI, + AQ, + AG, + AR, + AM, + AW, + AU, + AT, + AZ, + BS, + BH, + BD, + BB, + BY, + BE, + BZ, + BJ, + BM, + BT, + BO, + BQ, + BA, + BW, + BV, + BR, + IO, + BN, + BG, + BF, + BI, + KH, + CM, + CA, + CV, + KY, + CF, + TD, + CL, + CN, + CX, + CC, + CO, + KM, + CG, + CD, + CK, + CR, + CI, + HR, + CU, + CW, + CY, + CZ, + DK, + DJ, + DM, + DO, + EC, + EG, + SV, + GQ, + ER, + EE, + ET, + FK, + FO, + FJ, + FI, + FR, + GF, + PF, + TF, + GA, + GM, + GE, + DE, + GH, + GI, + GR, + GL, + GD, + GP, + GU, + GT, + GG, + GN, + GW, + GY, + HT, + HM, + VA, + HN, + HK, + HU, + IS, + IN, + ID, + IR, + IQ, + IE, + IM, + IL, + IT, + JM, + JP, + JE, + JO, + KZ, + KE, + KI, + KP, + KR, + KW, + KG, + LA, + LV, + LB, + LS, + LR, + LY, + LI, + LT, + LU, + MO, + MK, + MG, + MW, + MY, + MV, + ML, + MT, + MH, + MQ, + MR, + MU, + YT, + MX, + FM, + MD, + MC, + MN, + ME, + MS, + MA, + MZ, + MM, + NA, + NR, + NP, + NL, + NC, + NZ, + NI, + NE, + NG, + NU, + NF, + MP, + NO, + OM, + PK, + PW, + PS, + PA, + PG, + PY, + PE, + PH, + PN, + PL, + PT, + PR, + QA, + RE, + RO, + RU, + RW, + BL, + SH, + KN, + LC, + MF, + PM, + VC, + WS, + SM, + ST, + SA, + SN, + RS, + SC, + SL, + SG, + SX, + SK, + SI, + SB, + SO, + ZA, + GS, + SS, + ES, + LK, + SD, + SR, + SJ, + SZ, + SE, + CH, + SY, + TW, + TJ, + TZ, + TH, + TL, + TG, + TK, + TO, + TT, + TN, + TR, + TM, + TC, + TV, + UG, + UA, + AE, + GB, + US, + UM, + UY, + UZ, + VU, + VE, + VN, + VG, + VI, + WF, + EH, + YE, + ZM, + ZW, + Unknown + } + + /// + /// If SharedGroupId is specified, the service will attempt to create a group with that identifier, and will return an error + /// if it is already in use. If no SharedGroupId is specified, a random identifier will be assigned. + /// + [Serializable] + public class CreateSharedGroupRequest : PlayFabRequestCommon + { + /// + /// Unique identifier for the shared group (a random identifier will be assigned, if one is not specified). + /// + public string SharedGroupId; + } + + [Serializable] + public class CreateSharedGroupResult : PlayFabResultCommon + { + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + public enum Currency + { + AED, + AFN, + ALL, + AMD, + ANG, + AOA, + ARS, + AUD, + AWG, + AZN, + BAM, + BBD, + BDT, + BGN, + BHD, + BIF, + BMD, + BND, + BOB, + BRL, + BSD, + BTN, + BWP, + BYR, + BZD, + CAD, + CDF, + CHF, + CLP, + CNY, + COP, + CRC, + CUC, + CUP, + CVE, + CZK, + DJF, + DKK, + DOP, + DZD, + EGP, + ERN, + ETB, + EUR, + FJD, + FKP, + GBP, + GEL, + GGP, + GHS, + GIP, + GMD, + GNF, + GTQ, + GYD, + HKD, + HNL, + HRK, + HTG, + HUF, + IDR, + ILS, + IMP, + INR, + IQD, + IRR, + ISK, + JEP, + JMD, + JOD, + JPY, + KES, + KGS, + KHR, + KMF, + KPW, + KRW, + KWD, + KYD, + KZT, + LAK, + LBP, + LKR, + LRD, + LSL, + LYD, + MAD, + MDL, + MGA, + MKD, + MMK, + MNT, + MOP, + MRO, + MUR, + MVR, + MWK, + MXN, + MYR, + MZN, + NAD, + NGN, + NIO, + NOK, + NPR, + NZD, + OMR, + PAB, + PEN, + PGK, + PHP, + PKR, + PLN, + PYG, + QAR, + RON, + RSD, + RUB, + RWF, + SAR, + SBD, + SCR, + SDG, + SEK, + SGD, + SHP, + SLL, + SOS, + SPL, + SRD, + STD, + SVC, + SYP, + SZL, + THB, + TJS, + TMT, + TND, + TOP, + TRY, + TTD, + TVD, + TWD, + TZS, + UAH, + UGX, + USD, + UYU, + UZS, + VEF, + VND, + VUV, + WST, + XAF, + XCD, + XDR, + XOF, + XPF, + YER, + ZAR, + ZMW, + ZWD + } + + /// + /// This function will delete the specified character from the list allowed by the user, and will also delete any inventory + /// or VC currently held by that character. It will NOT delete any statistics associated for this character, in order to + /// preserve leaderboard integrity. + /// + [Serializable] + public class DeleteCharacterFromUserRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// If true, the character's inventory will be transferred up to the owning user; otherwise, this request will purge those + /// items. + /// + public bool SaveCharacterInventory; + } + + [Serializable] + public class DeleteCharacterFromUserResult : PlayFabResultCommon + { + } + + /// + /// Deletes all data associated with the player, including statistics, custom data, inventory, purchases, virtual currency + /// balances, characters and shared group memberships. Removes the player from all leaderboards and player search indexes. + /// Does not delete PlayStream event history associated with the player. Does not delete the publisher user account that + /// created the player in the title nor associated data such as username, password, email address, account linkages, or + /// friends list. Note, this API queues the player for deletion and returns immediately. It may take several minutes or more + /// before all player data is fully deleted. Until the player data is fully deleted, attempts to recreate the player with + /// the same user account in the same title will fail with the 'AccountDeleted' error. This API must be enabled for use as + /// an option in the game manager website. It is disabled by default. + /// + [Serializable] + public class DeletePlayerRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class DeletePlayerResult : PlayFabResultCommon + { + } + + /// + /// Represents the request to delete a push notification template. + /// + [Serializable] + public class DeletePushNotificationTemplateRequest : PlayFabRequestCommon + { + /// + /// Id of the push notification template to be deleted. + /// + public string PushNotificationTemplateId; + } + + [Serializable] + public class DeletePushNotificationTemplateResult : PlayFabResultCommon + { + } + + [Serializable] + public class DeleteSharedGroupRequest : PlayFabRequestCommon + { + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + public enum EmailVerificationStatus + { + Unverified, + Pending, + Confirmed + } + + [Serializable] + public class EmptyResponse : PlayFabResultCommon + { + } + + [Serializable] + public class EmptyResult : PlayFabResultCommon + { + } + + /// + /// Combined entity type and ID structure which uniquely identifies a single entity. + /// + [Serializable] + public class EntityKey : PlayFabBaseModel + { + /// + /// Unique ID of the entity. + /// + public string Id; + /// + /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types + /// + public string Type; + } + + [Serializable] + public class EntityTokenResponse : PlayFabBaseModel + { + /// + /// The entity id and type. + /// + public EntityKey Entity; + /// + /// The token used to set X-EntityToken for all entity based API calls. + /// + public string EntityToken; + /// + /// The time the token will expire, if it is an expiring token, in UTC. + /// + public DateTime? TokenExpiration; + } + + [Serializable] + public class EvaluateRandomResultTableRequest : PlayFabRequestCommon + { + /// + /// Specifies the catalog version that should be used to evaluate the Random Result Table. If unspecified, uses + /// default/primary catalog. + /// + public string CatalogVersion; + /// + /// The unique identifier of the Random Result Table to use. + /// + public string TableId; + } + + /// + /// Note that if the Random Result Table contains no entries, or does not exist for the catalog specified (the Primary + /// catalog if one is not specified), an InvalidDropTable error will be returned. + /// + [Serializable] + public class EvaluateRandomResultTableResult : PlayFabResultCommon + { + /// + /// Unique identifier for the item returned from the Random Result Table evaluation, for the given catalog. + /// + public string ResultItemId; + } + + [Serializable] + public class ExecuteCloudScriptResult : PlayFabResultCommon + { + /// + /// Number of PlayFab API requests issued by the CloudScript function + /// + public int APIRequestsIssued; + /// + /// Information about the error, if any, that occurred during execution + /// + public ScriptExecutionError Error; + public double ExecutionTimeSeconds; + /// + /// The name of the function that executed + /// + public string FunctionName; + /// + /// The object returned from the CloudScript function, if any + /// + public object FunctionResult; + /// + /// Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if + /// the total event size is larger than 350KB. + /// + public bool? FunctionResultTooLarge; + /// + /// Number of external HTTP requests issued by the CloudScript function + /// + public int HttpRequestsIssued; + /// + /// Entries logged during the function execution. These include both entries logged in the function code using log.info() + /// and log.error() and error entries for API and HTTP request failures. + /// + public List Logs; + /// + /// Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total + /// event size is larger than 350KB after the FunctionResult was removed. + /// + public bool? LogsTooLarge; + public uint MemoryConsumedBytes; + /// + /// Processor time consumed while executing the function. This does not include time spent waiting on API calls or HTTP + /// requests. + /// + public double ProcessorTimeSeconds; + /// + /// The revision of the CloudScript that executed + /// + public int Revision; + } + + [Serializable] + public class ExecuteCloudScriptServerRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the CloudScript function to execute + /// + public string FunctionName; + /// + /// Object that is passed in to the function as the first argument + /// + public object FunctionParameter; + /// + /// Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other + /// contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager. + /// + public bool? GeneratePlayStreamEvent; + /// + /// The unique user identifier for the player on whose behalf the script is being run + /// + public string PlayFabId; + /// + /// Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' + /// executes the current live, published revision, and 'Specific' executes the specified revision. The default value is + /// 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'. + /// + public CloudScriptRevisionOption? RevisionSelection; + /// + /// The specivic revision to execute, when RevisionSelection is set to 'Specific' + /// + public int? SpecificRevision; + } + + public enum ExternalFriendSources + { + None, + Steam, + Facebook, + Xbox, + Psn, + All + } + + [Serializable] + public class FacebookInstantGamesPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Facebook Instant Games identifier for a user. + /// + public string FacebookInstantGamesId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Facebook Instant Games identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class FacebookPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Facebook identifier for a user. + /// + public string FacebookId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Facebook identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class FriendInfo : PlayFabBaseModel + { + /// + /// Available Facebook information (if the user and connected Facebook friend both have PlayFab Accounts in the same title). + /// + public UserFacebookInfo FacebookInfo; + /// + /// PlayFab unique identifier for this friend. + /// + public string FriendPlayFabId; + /// + /// Available Game Center information (if the user and connected Game Center friend both have PlayFab Accounts in the same + /// title). + /// + public UserGameCenterInfo GameCenterInfo; + /// + /// The profile of the user, if requested. + /// + public PlayerProfileModel Profile; + /// + /// Available PlayStation :tm: Network information, if the user connected PlayStation :tm Network friend both have PlayFab + /// Accounts in the same title. + /// + public UserPsnInfo PSNInfo; + /// + /// Available Steam information (if the user and connected Steam friend both have PlayFab Accounts in the same title). + /// + public UserSteamInfo SteamInfo; + /// + /// Tags which have been associated with this friend. + /// + public List Tags; + /// + /// Title-specific display name for this friend. + /// + public string TitleDisplayName; + /// + /// PlayFab unique username for this friend. + /// + public string Username; + /// + /// Available Xbox information, (if the user and connected Xbox Live friend both have PlayFab Accounts in the same title). + /// + public UserXboxInfo XboxInfo; + } + + public enum GenericErrorCodes + { + Success, + UnkownError, + InvalidParams, + AccountNotFound, + AccountBanned, + InvalidUsernameOrPassword, + InvalidTitleId, + InvalidEmailAddress, + EmailAddressNotAvailable, + InvalidUsername, + InvalidPassword, + UsernameNotAvailable, + InvalidSteamTicket, + AccountAlreadyLinked, + LinkedAccountAlreadyClaimed, + InvalidFacebookToken, + AccountNotLinked, + FailedByPaymentProvider, + CouponCodeNotFound, + InvalidContainerItem, + ContainerNotOwned, + KeyNotOwned, + InvalidItemIdInTable, + InvalidReceipt, + ReceiptAlreadyUsed, + ReceiptCancelled, + GameNotFound, + GameModeNotFound, + InvalidGoogleToken, + UserIsNotPartOfDeveloper, + InvalidTitleForDeveloper, + TitleNameConflicts, + UserisNotValid, + ValueAlreadyExists, + BuildNotFound, + PlayerNotInGame, + InvalidTicket, + InvalidDeveloper, + InvalidOrderInfo, + RegistrationIncomplete, + InvalidPlatform, + UnknownError, + SteamApplicationNotOwned, + WrongSteamAccount, + TitleNotActivated, + RegistrationSessionNotFound, + NoSuchMod, + FileNotFound, + DuplicateEmail, + ItemNotFound, + ItemNotOwned, + ItemNotRecycleable, + ItemNotAffordable, + InvalidVirtualCurrency, + WrongVirtualCurrency, + WrongPrice, + NonPositiveValue, + InvalidRegion, + RegionAtCapacity, + ServerFailedToStart, + NameNotAvailable, + InsufficientFunds, + InvalidDeviceID, + InvalidPushNotificationToken, + NoRemainingUses, + InvalidPaymentProvider, + PurchaseInitializationFailure, + DuplicateUsername, + InvalidBuyerInfo, + NoGameModeParamsSet, + BodyTooLarge, + ReservedWordInBody, + InvalidTypeInBody, + InvalidRequest, + ReservedEventName, + InvalidUserStatistics, + NotAuthenticated, + StreamAlreadyExists, + ErrorCreatingStream, + StreamNotFound, + InvalidAccount, + PurchaseDoesNotExist, + InvalidPurchaseTransactionStatus, + APINotEnabledForGameClientAccess, + NoPushNotificationARNForTitle, + BuildAlreadyExists, + BuildPackageDoesNotExist, + CustomAnalyticsEventsNotEnabledForTitle, + InvalidSharedGroupId, + NotAuthorized, + MissingTitleGoogleProperties, + InvalidItemProperties, + InvalidPSNAuthCode, + InvalidItemId, + PushNotEnabledForAccount, + PushServiceError, + ReceiptDoesNotContainInAppItems, + ReceiptContainsMultipleInAppItems, + InvalidBundleID, + JavascriptException, + InvalidSessionTicket, + UnableToConnectToDatabase, + InternalServerError, + InvalidReportDate, + ReportNotAvailable, + DatabaseThroughputExceeded, + InvalidGameTicket, + ExpiredGameTicket, + GameTicketDoesNotMatchLobby, + LinkedDeviceAlreadyClaimed, + DeviceAlreadyLinked, + DeviceNotLinked, + PartialFailure, + PublisherNotSet, + ServiceUnavailable, + VersionNotFound, + RevisionNotFound, + InvalidPublisherId, + DownstreamServiceUnavailable, + APINotIncludedInTitleUsageTier, + DAULimitExceeded, + APIRequestLimitExceeded, + InvalidAPIEndpoint, + BuildNotAvailable, + ConcurrentEditError, + ContentNotFound, + CharacterNotFound, + CloudScriptNotFound, + ContentQuotaExceeded, + InvalidCharacterStatistics, + PhotonNotEnabledForTitle, + PhotonApplicationNotFound, + PhotonApplicationNotAssociatedWithTitle, + InvalidEmailOrPassword, + FacebookAPIError, + InvalidContentType, + KeyLengthExceeded, + DataLengthExceeded, + TooManyKeys, + FreeTierCannotHaveVirtualCurrency, + MissingAmazonSharedKey, + AmazonValidationError, + InvalidPSNIssuerId, + PSNInaccessible, + ExpiredAuthToken, + FailedToGetEntitlements, + FailedToConsumeEntitlement, + TradeAcceptingUserNotAllowed, + TradeInventoryItemIsAssignedToCharacter, + TradeInventoryItemIsBundle, + TradeStatusNotValidForCancelling, + TradeStatusNotValidForAccepting, + TradeDoesNotExist, + TradeCancelled, + TradeAlreadyFilled, + TradeWaitForStatusTimeout, + TradeInventoryItemExpired, + TradeMissingOfferedAndAcceptedItems, + TradeAcceptedItemIsBundle, + TradeAcceptedItemIsStackable, + TradeInventoryItemInvalidStatus, + TradeAcceptedCatalogItemInvalid, + TradeAllowedUsersInvalid, + TradeInventoryItemDoesNotExist, + TradeInventoryItemIsConsumed, + TradeInventoryItemIsStackable, + TradeAcceptedItemsMismatch, + InvalidKongregateToken, + FeatureNotConfiguredForTitle, + NoMatchingCatalogItemForReceipt, + InvalidCurrencyCode, + NoRealMoneyPriceForCatalogItem, + TradeInventoryItemIsNotTradable, + TradeAcceptedCatalogItemIsNotTradable, + UsersAlreadyFriends, + LinkedIdentifierAlreadyClaimed, + CustomIdNotLinked, + TotalDataSizeExceeded, + DeleteKeyConflict, + InvalidXboxLiveToken, + ExpiredXboxLiveToken, + ResettableStatisticVersionRequired, + NotAuthorizedByTitle, + NoPartnerEnabled, + InvalidPartnerResponse, + APINotEnabledForGameServerAccess, + StatisticNotFound, + StatisticNameConflict, + StatisticVersionClosedForWrites, + StatisticVersionInvalid, + APIClientRequestRateLimitExceeded, + InvalidJSONContent, + InvalidDropTable, + StatisticVersionAlreadyIncrementedForScheduledInterval, + StatisticCountLimitExceeded, + StatisticVersionIncrementRateExceeded, + ContainerKeyInvalid, + CloudScriptExecutionTimeLimitExceeded, + NoWritePermissionsForEvent, + CloudScriptFunctionArgumentSizeExceeded, + CloudScriptAPIRequestCountExceeded, + CloudScriptAPIRequestError, + CloudScriptHTTPRequestError, + InsufficientGuildRole, + GuildNotFound, + OverLimit, + EventNotFound, + InvalidEventField, + InvalidEventName, + CatalogNotConfigured, + OperationNotSupportedForPlatform, + SegmentNotFound, + StoreNotFound, + InvalidStatisticName, + TitleNotQualifiedForLimit, + InvalidServiceLimitLevel, + ServiceLimitLevelInTransition, + CouponAlreadyRedeemed, + GameServerBuildSizeLimitExceeded, + GameServerBuildCountLimitExceeded, + VirtualCurrencyCountLimitExceeded, + VirtualCurrencyCodeExists, + TitleNewsItemCountLimitExceeded, + InvalidTwitchToken, + TwitchResponseError, + ProfaneDisplayName, + UserAlreadyAdded, + InvalidVirtualCurrencyCode, + VirtualCurrencyCannotBeDeleted, + IdentifierAlreadyClaimed, + IdentifierNotLinked, + InvalidContinuationToken, + ExpiredContinuationToken, + InvalidSegment, + InvalidSessionId, + SessionLogNotFound, + InvalidSearchTerm, + TwoFactorAuthenticationTokenRequired, + GameServerHostCountLimitExceeded, + PlayerTagCountLimitExceeded, + RequestAlreadyRunning, + ActionGroupNotFound, + MaximumSegmentBulkActionJobsRunning, + NoActionsOnPlayersInSegmentJob, + DuplicateStatisticName, + ScheduledTaskNameConflict, + ScheduledTaskCreateConflict, + InvalidScheduledTaskName, + InvalidTaskSchedule, + SteamNotEnabledForTitle, + LimitNotAnUpgradeOption, + NoSecretKeyEnabledForCloudScript, + TaskNotFound, + TaskInstanceNotFound, + InvalidIdentityProviderId, + MisconfiguredIdentityProvider, + InvalidScheduledTaskType, + BillingInformationRequired, + LimitedEditionItemUnavailable, + InvalidAdPlacementAndReward, + AllAdPlacementViewsAlreadyConsumed, + GoogleOAuthNotConfiguredForTitle, + GoogleOAuthError, + UserNotFriend, + InvalidSignature, + InvalidPublicKey, + GoogleOAuthNoIdTokenIncludedInResponse, + StatisticUpdateInProgress, + LeaderboardVersionNotAvailable, + StatisticAlreadyHasPrizeTable, + PrizeTableHasOverlappingRanks, + PrizeTableHasMissingRanks, + PrizeTableRankStartsAtZero, + InvalidStatistic, + ExpressionParseFailure, + ExpressionInvokeFailure, + ExpressionTooLong, + DataUpdateRateExceeded, + RestrictedEmailDomain, + EncryptionKeyDisabled, + EncryptionKeyMissing, + EncryptionKeyBroken, + NoSharedSecretKeyConfigured, + SecretKeyNotFound, + PlayerSecretAlreadyConfigured, + APIRequestsDisabledForTitle, + InvalidSharedSecretKey, + PrizeTableHasNoRanks, + ProfileDoesNotExist, + ContentS3OriginBucketNotConfigured, + InvalidEnvironmentForReceipt, + EncryptedRequestNotAllowed, + SignedRequestNotAllowed, + RequestViewConstraintParamsNotAllowed, + BadPartnerConfiguration, + XboxBPCertificateFailure, + XboxXASSExchangeFailure, + InvalidEntityId, + StatisticValueAggregationOverflow, + EmailMessageFromAddressIsMissing, + EmailMessageToAddressIsMissing, + SmtpServerAuthenticationError, + SmtpServerLimitExceeded, + SmtpServerInsufficientStorage, + SmtpServerCommunicationError, + SmtpServerGeneralFailure, + EmailClientTimeout, + EmailClientCanceledTask, + EmailTemplateMissing, + InvalidHostForTitleId, + EmailConfirmationTokenDoesNotExist, + EmailConfirmationTokenExpired, + AccountDeleted, + PlayerSecretNotConfigured, + InvalidSignatureTime, + NoContactEmailAddressFound, + InvalidAuthToken, + AuthTokenDoesNotExist, + AuthTokenExpired, + AuthTokenAlreadyUsedToResetPassword, + MembershipNameTooLong, + MembershipNotFound, + GoogleServiceAccountInvalid, + GoogleServiceAccountParseFailure, + EntityTokenMissing, + EntityTokenInvalid, + EntityTokenExpired, + EntityTokenRevoked, + InvalidProductForSubscription, + XboxInaccessible, + SubscriptionAlreadyTaken, + SmtpAddonNotEnabled, + APIConcurrentRequestLimitExceeded, + XboxRejectedXSTSExchangeRequest, + VariableNotDefined, + TemplateVersionNotDefined, + FileTooLarge, + TitleDeleted, + TitleContainsUserAccounts, + TitleDeletionPlayerCleanupFailure, + EntityFileOperationPending, + NoEntityFileOperationPending, + EntityProfileVersionMismatch, + TemplateVersionTooOld, + MembershipDefinitionInUse, + PaymentPageNotConfigured, + FailedLoginAttemptRateLimitExceeded, + EntityBlockedByGroup, + RoleDoesNotExist, + EntityIsAlreadyMember, + DuplicateRoleId, + GroupInvitationNotFound, + GroupApplicationNotFound, + OutstandingInvitationAcceptedInstead, + OutstandingApplicationAcceptedInstead, + RoleIsGroupDefaultMember, + RoleIsGroupAdmin, + RoleNameNotAvailable, + GroupNameNotAvailable, + EmailReportAlreadySent, + EmailReportRecipientBlacklisted, + EventNamespaceNotAllowed, + EventEntityNotAllowed, + InvalidEntityType, + NullTokenResultFromAad, + InvalidTokenResultFromAad, + NoValidCertificateForAad, + InvalidCertificateForAad, + DuplicateDropTableId, + MultiplayerServerError, + MultiplayerServerTooManyRequests, + MultiplayerServerNoContent, + MultiplayerServerBadRequest, + MultiplayerServerUnauthorized, + MultiplayerServerForbidden, + MultiplayerServerNotFound, + MultiplayerServerConflict, + MultiplayerServerInternalServerError, + MultiplayerServerUnavailable, + ExplicitContentDetected, + PIIContentDetected, + InvalidScheduledTaskParameter, + PerEntityEventRateLimitExceeded, + TitleDefaultLanguageNotSet, + EmailTemplateMissingDefaultVersion, + FacebookInstantGamesIdNotLinked, + InvalidFacebookInstantGamesSignature, + FacebookInstantGamesAuthNotConfiguredForTitle, + EntityProfileConstraintValidationFailed, + TelemetryIngestionKeyPending, + TelemetryIngestionKeyNotFound, + StatisticChildNameInvalid, + DataIntegrityError, + VirtualCurrencyCannotBeSetToOlderVersion, + VirtualCurrencyMustBeWithinIntegerRange, + EmailTemplateInvalidSyntax, + EmailTemplateMissingCallback, + PushNotificationTemplateInvalidPayload, + InvalidLocalizedPushNotificationLanguage, + MissingLocalizedPushNotificationMessage, + PushNotificationTemplateMissingPlatformPayload, + PushNotificationTemplatePayloadContainsInvalidJson, + PushNotificationTemplateContainsInvalidIosPayload, + PushNotificationTemplateContainsInvalidAndroidPayload, + PushNotificationTemplateIosPayloadMissingNotificationBody, + PushNotificationTemplateAndroidPayloadMissingNotificationBody, + PushNotificationTemplateNotFound, + PushNotificationTemplateMissingDefaultVersion, + PushNotificationTemplateInvalidSyntax, + PushNotificationTemplateNoCustomPayloadForV1, + NoLeaderboardForStatistic, + TitleNewsMissingDefaultLanguage, + TitleNewsNotFound, + TitleNewsDuplicateLanguage, + TitleNewsMissingTitleOrBody, + TitleNewsInvalidLanguage, + EmailRecipientBlacklisted, + InvalidGameCenterAuthRequest, + GameCenterAuthenticationFailed, + CannotEnablePartiesForTitle, + PartyError, + PartyRequests, + PartyNoContent, + PartyBadRequest, + PartyUnauthorized, + PartyForbidden, + PartyNotFound, + PartyConflict, + PartyInternalServerError, + PartyUnavailable, + PartyTooManyRequests, + PushNotificationTemplateMissingName, + CannotEnableMultiplayerServersForTitle, + WriteAttemptedDuringExport, + MultiplayerServerTitleQuotaCoresExceeded, + AutomationRuleNotFound, + EntityAPIKeyLimitExceeded, + EntityAPIKeyNotFound, + EntityAPIKeyOrSecretInvalid, + EconomyServiceUnavailable, + EconomyServiceInternalError, + QueryRateLimitExceeded, + EntityAPIKeyCreationDisabledForEntity, + ForbiddenByEntityPolicy, + UpdateInventoryRateLimitExceeded, + StudioCreationRateLimited, + StudioCreationInProgress, + DuplicateStudioName, + StudioNotFound, + StudioDeleted, + StudioDeactivated, + StudioActivated, + TitleCreationRateLimited, + TitleCreationInProgress, + DuplicateTitleName, + TitleActivationRateLimited, + TitleActivationInProgress, + TitleDeactivated, + TitleActivated, + CloudScriptAzureFunctionsExecutionTimeLimitExceeded, + CloudScriptAzureFunctionsArgumentSizeExceeded, + CloudScriptAzureFunctionsReturnSizeExceeded, + CloudScriptAzureFunctionsHTTPRequestError, + VirtualCurrencyBetaGetError, + VirtualCurrencyBetaCreateError, + VirtualCurrencyBetaInitialDepositSaveError, + VirtualCurrencyBetaSaveError, + VirtualCurrencyBetaDeleteError, + VirtualCurrencyBetaRestoreError, + VirtualCurrencyBetaSaveConflict, + VirtualCurrencyBetaUpdateError, + InsightsManagementDatabaseNotFound, + InsightsManagementOperationNotFound, + InsightsManagementErrorPendingOperationExists, + InsightsManagementSetPerformanceLevelInvalidParameter, + InsightsManagementSetStorageRetentionInvalidParameter, + InsightsManagementGetStorageUsageInvalidParameter, + InsightsManagementGetOperationStatusInvalidParameter, + DuplicatePurchaseTransactionId, + EvaluationModePlayerCountExceeded, + GetPlayersInSegmentRateLimitExceeded, + CloudScriptFunctionNameSizeExceeded, + PaidInsightsFeaturesNotEnabled, + CloudScriptAzureFunctionsQueueRequestError, + EvaluationModeTitleCountExceeded, + InsightsManagementTitleNotInFlight, + LimitNotFound, + LimitNotAvailableViaAPI, + InsightsManagementSetStorageRetentionBelowMinimum, + InsightsManagementSetStorageRetentionAboveMaximum, + AppleNotEnabledForTitle, + InsightsManagementNewActiveEventExportLimitInvalid, + InsightsManagementSetPerformanceRateLimited, + PartyRequestsThrottledFromRateLimiter, + XboxServiceTooManyRequests, + NintendoSwitchNotEnabledForTitle, + RequestMultiplayerServersThrottledFromRateLimiter, + TitleDataOverrideNotFound, + DuplicateKeys, + WasNotCreatedWithCloudRoot, + LegacyMultiplayerServersDeprecated, + VirtualCurrencyCurrentlyUnavailable, + SteamUserNotFound, + ElasticSearchOperationFailed, + NotImplemented, + PublisherNotFound, + PublisherDeleted, + ApiDisabledForMigration, + ResourceNameUpdateNotAllowed, + ApiNotEnabledForTitle, + DuplicateTitleNameForPublisher, + AzureTitleCreationInProgress, + TitleConstraintsPublisherDeletion, + InvalidPlayerAccountPoolId, + PlayerAccountPoolNotFound, + PlayerAccountPoolDeleted, + TitleCleanupInProgress, + AzureResourceConcurrentOperationInProgress, + TitlePublisherUpdateNotAllowed, + AzureResourceManagerNotSupportedInStamp, + ApiNotIncludedInAzurePlayFabFeatureSet, + GoogleServiceAccountFailedAuth, + GoogleAPIServiceUnavailable, + GoogleAPIServiceUnknownError, + NoValidIdentityForAad, + PlayerIdentityLinkNotFound, + PhotonApplicationIdAlreadyInUse, + CloudScriptUnableToDeleteProductionRevision, + CustomIdNotFound, + AutomationInvalidInput, + AutomationInvalidRuleName, + AutomationRuleAlreadyExists, + AutomationRuleLimitExceeded, + InvalidGooglePlayGamesServerAuthCode, + PlayStreamConnectionFailed, + InvalidEventContents, + InsightsV1Deprecated, + AnalysisSubscriptionNotFound, + AnalysisSubscriptionFailed, + AnalysisSubscriptionFoundAlready, + AnalysisSubscriptionManagementInvalidInput, + InvalidGameCenterId, + InvalidNintendoSwitchAccountId, + EntityAPIKeysNotSupported, + IpAddressBanned, + EntityLineageBanned, + NamespaceMismatch, + InvalidServiceConfiguration, + InvalidNamespaceMismatch, + LeaderboardColumnLengthMismatch, + InvalidStatisticScore, + LeaderboardColumnsNotSpecified, + LeaderboardMaxSizeTooLarge, + InvalidAttributeStatisticsSpecified, + LeaderboardNotFound, + TokenSigningKeyNotFound, + LeaderboardNameConflict, + LinkedStatisticColumnMismatch, + NoLinkedStatisticToLeaderboard, + StatDefinitionAlreadyLinkedToLeaderboard, + LinkingStatsNotAllowedForEntityType, + LeaderboardCountLimitExceeded, + LeaderboardSizeLimitExceeded, + LeaderboardDefinitionModificationNotAllowedWhileLinked, + StatisticDefinitionModificationNotAllowedWhileLinked, + LeaderboardUpdateNotAllowedWhileLinked, + CloudScriptAzureFunctionsEventHubRequestError, + ExternalEntityNotAllowedForTier, + InvalidBaseTimeForInterval, + EntityTypeMismatchWithStatDefinition, + SpecifiedVersionLeaderboardNotFound, + LeaderboardColumnLengthMismatchWithStatDefinition, + DuplicateColumnNameFound, + LinkedStatisticColumnNotFound, + LinkedStatisticColumnRequired, + MultipleLinkedStatisticsNotAllowed, + DuplicateLinkedStatisticColumnNameFound, + AggregationTypeNotAllowedForMultiColumnStatistic, + MaxQueryableVersionsValueNotAllowedForTier, + StatisticDefinitionHasNullOrEmptyVersionConfiguration, + StatisticColumnLengthMismatch, + MatchmakingEntityInvalid, + MatchmakingPlayerAttributesInvalid, + MatchmakingQueueNotFound, + MatchmakingMatchNotFound, + MatchmakingTicketNotFound, + MatchmakingAlreadyJoinedTicket, + MatchmakingTicketAlreadyCompleted, + MatchmakingQueueConfigInvalid, + MatchmakingMemberProfileInvalid, + NintendoSwitchDeviceIdNotLinked, + MatchmakingNotEnabled, + MatchmakingPlayerAttributesTooLarge, + MatchmakingNumberOfPlayersInTicketTooLarge, + MatchmakingAttributeInvalid, + MatchmakingPlayerHasNotJoinedTicket, + MatchmakingRateLimitExceeded, + MatchmakingTicketMembershipLimitExceeded, + MatchmakingUnauthorized, + MatchmakingQueueLimitExceeded, + MatchmakingRequestTypeMismatch, + MatchmakingBadRequest, + PubSubFeatureNotEnabledForTitle, + PubSubTooManyRequests, + PubSubConnectionNotFoundForEntity, + PubSubConnectionHandleInvalid, + PubSubSubscriptionLimitExceeded, + TitleConfigNotFound, + TitleConfigUpdateConflict, + TitleConfigSerializationError, + CatalogApiNotImplemented, + CatalogEntityInvalid, + CatalogTitleIdMissing, + CatalogPlayerIdMissing, + CatalogClientIdentityInvalid, + CatalogOneOrMoreFilesInvalid, + CatalogItemMetadataInvalid, + CatalogItemIdInvalid, + CatalogSearchParameterInvalid, + CatalogFeatureDisabled, + CatalogConfigInvalid, + CatalogItemTypeInvalid, + CatalogBadRequest, + CatalogTooManyRequests, + InvalidCatalogItemConfiguration, + ExportInvalidStatusUpdate, + ExportInvalidPrefix, + ExportBlobContainerDoesNotExist, + ExportNotFound, + ExportCouldNotUpdate, + ExportInvalidStorageType, + ExportAmazonBucketDoesNotExist, + ExportInvalidBlobStorage, + ExportKustoException, + ExportKustoConnectionFailed, + ExportUnknownError, + ExportCantEditPendingExport, + ExportLimitExports, + ExportLimitEvents, + ExportInvalidPartitionStatusModification, + ExportCouldNotCreate, + ExportNoBackingDatabaseFound, + ExportCouldNotDelete, + ExportCannotDetermineEventQuery, + ExportInvalidQuerySchemaModification, + ExportQuerySchemaMissingRequiredColumns, + ExportCannotParseQuery, + ExportControlCommandsNotAllowed, + ExportQueryMissingTableReference, + ExportInsightsV1Deprecated, + ExplorerBasicInvalidQueryName, + ExplorerBasicInvalidQueryDescription, + ExplorerBasicInvalidQueryConditions, + ExplorerBasicInvalidQueryStartDate, + ExplorerBasicInvalidQueryEndDate, + ExplorerBasicInvalidQueryGroupBy, + ExplorerBasicInvalidQueryAggregateType, + ExplorerBasicInvalidQueryAggregateProperty, + ExplorerBasicLoadQueriesError, + ExplorerBasicLoadQueryError, + ExplorerBasicCreateQueryError, + ExplorerBasicDeleteQueryError, + ExplorerBasicUpdateQueryError, + ExplorerBasicSavedQueriesLimit, + ExplorerBasicSavedQueryNotFound, + TenantShardMapperShardNotFound, + TitleNotEnabledForParty, + PartyVersionNotFound, + MultiplayerServerBuildReferencedByMatchmakingQueue, + MultiplayerServerBuildReferencedByBuildAlias, + MultiplayerServerBuildAliasReferencedByMatchmakingQueue, + PartySerializationError, + ExperimentationExperimentStopped, + ExperimentationExperimentRunning, + ExperimentationExperimentNotFound, + ExperimentationExperimentNeverStarted, + ExperimentationExperimentDeleted, + ExperimentationClientTimeout, + ExperimentationInvalidVariantConfiguration, + ExperimentationInvalidVariableConfiguration, + ExperimentInvalidId, + ExperimentationNoScorecard, + ExperimentationTreatmentAssignmentFailed, + ExperimentationTreatmentAssignmentDisabled, + ExperimentationInvalidDuration, + ExperimentationMaxExperimentsReached, + ExperimentationExperimentSchedulingInProgress, + ExperimentationInvalidEndDate, + ExperimentationInvalidStartDate, + ExperimentationMaxDurationExceeded, + ExperimentationExclusionGroupNotFound, + ExperimentationExclusionGroupInsufficientCapacity, + ExperimentationExclusionGroupCannotDelete, + ExperimentationExclusionGroupInvalidTrafficAllocation, + ExperimentationExclusionGroupInvalidName, + MaxActionDepthExceeded, + TitleNotOnUpdatedPricingPlan, + SegmentManagementTitleNotInFlight, + SegmentManagementNoExpressionTree, + SegmentManagementTriggerActionCountOverLimit, + SegmentManagementSegmentCountOverLimit, + SegmentManagementInvalidSegmentId, + SegmentManagementInvalidInput, + SegmentManagementInvalidSegmentName, + DeleteSegmentRateLimitExceeded, + CreateSegmentRateLimitExceeded, + UpdateSegmentRateLimitExceeded, + GetSegmentsRateLimitExceeded, + AsyncExportNotInFlight, + AsyncExportNotFound, + AsyncExportRateLimitExceeded, + AnalyticsSegmentCountOverLimit, + SnapshotNotFound, + InventoryApiNotImplemented, + LobbyDoesNotExist, + LobbyRateLimitExceeded, + LobbyPlayerAlreadyJoined, + LobbyNotJoinable, + LobbyMemberCannotRejoin, + LobbyCurrentPlayersMoreThanMaxPlayers, + LobbyPlayerNotPresent, + LobbyBadRequest, + LobbyPlayerMaxLobbyLimitExceeded, + LobbyNewOwnerMustBeConnected, + LobbyCurrentOwnerStillConnected, + LobbyMemberIsNotOwner, + LobbyServerMismatch, + LobbyServerNotFound, + LobbyDifferentServerAlreadyJoined, + LobbyServerAlreadyJoined, + LobbyIsNotClientOwned, + LobbyDoesNotUseConnections, + EventSamplingInvalidRatio, + EventSamplingInvalidEventNamespace, + EventSamplingInvalidEventName, + EventSamplingRatioNotFound, + TelemetryKeyNotFound, + TelemetryKeyInvalidName, + TelemetryKeyAlreadyExists, + TelemetryKeyInvalid, + TelemetryKeyCountOverLimit, + TelemetryKeyDeactivated, + TelemetryKeyLongInsightsRetentionNotAllowed, + EventSinkConnectionInvalid, + EventSinkConnectionUnauthorized, + EventSinkRegionInvalid, + EventSinkLimitExceeded, + EventSinkSasTokenInvalid, + EventSinkNotFound, + EventSinkNameInvalid, + EventSinkSasTokenPermissionInvalid, + EventSinkSecretInvalid, + EventSinkTenantNotFound, + EventSinkAadNotFound, + EventSinkDatabaseNotFound, + EventSinkTitleUnauthorized, + EventSinkInsufficientRoleAssignment, + EventSinkContainerNotFound, + EventSinkTenantIdInvalid, + OperationCanceled, + InvalidDisplayNameRandomSuffixLength, + AllowNonUniquePlayerDisplayNamesDisableNotAllowed, + PartitionedEventInvalid, + PartitionedEventCountOverLimit, + ManageEventNamespaceInvalid, + ManageEventNameInvalid, + ManagedEventNotFound, + ManageEventsInvalidRatio, + ManagedEventInvalid, + PlayerCustomPropertiesPropertyNameTooLong, + PlayerCustomPropertiesPropertyNameIsInvalid, + PlayerCustomPropertiesStringPropertyValueTooLong, + PlayerCustomPropertiesValueIsInvalidType, + PlayerCustomPropertiesVersionMismatch, + PlayerCustomPropertiesPropertyCountTooHigh, + PlayerCustomPropertiesDuplicatePropertyName, + PlayerCustomPropertiesPropertyDoesNotExist, + AddonAlreadyExists, + AddonDoesntExist, + CopilotDisabled, + CopilotInvalidRequest, + TrueSkillUnauthorized, + TrueSkillInvalidTitleId, + TrueSkillInvalidScenarioId, + TrueSkillInvalidModelId, + TrueSkillInvalidModelName, + TrueSkillInvalidPlayerIds, + TrueSkillInvalidEntityKey, + TrueSkillInvalidConditionKey, + TrueSkillInvalidConditionValue, + TrueSkillInvalidConditionAffinityWeight, + TrueSkillInvalidEventName, + TrueSkillMatchResultCreated, + TrueSkillMatchResultAlreadySubmitted, + TrueSkillBadPlayerIdInMatchResult, + TrueSkillInvalidBotIdInMatchResult, + TrueSkillDuplicatePlayerInMatchResult, + TrueSkillNoPlayerInMatchResultTeam, + TrueSkillPlayersInMatchResultExceedingLimit, + TrueSkillInvalidPreMatchPartyInMatchResult, + TrueSkillInvalidTimestampInMatchResult, + TrueSkillStartTimeMissingInMatchResult, + TrueSkillEndTimeMissingInMatchResult, + TrueSkillInvalidPlayerSecondsPlayedInMatchResult, + TrueSkillNoTeamInMatchResult, + TrueSkillNotEnoughTeamsInMatchResult, + TrueSkillInvalidRanksInMatchResult, + TrueSkillNoWinnerInMatchResult, + TrueSkillMissingRequiredCondition, + TrueSkillMissingRequiredEvent, + TrueSkillUnknownEventName, + TrueSkillInvalidEventCount, + TrueSkillUnknownConditionKey, + TrueSkillUnknownConditionValue, + TrueSkillScenarioConfigDoesNotExist, + TrueSkillUnknownModelId, + TrueSkillNoModelInScenario, + TrueSkillNotSupportedForTitle, + TrueSkillModelIsNotActive, + TrueSkillUnauthorizedToQueryOtherPlayerSkills, + TrueSkillInvalidMaxIterations, + TrueSkillEndTimeBeforeStartTime, + TrueSkillInvalidJobId, + TrueSkillInvalidMetadataId, + TrueSkillMissingBuildVerison, + TrueSkillJobAlreadyExists, + TrueSkillJobNotFound, + TrueSkillOperationCanceled, + TrueSkillActiveModelLimitExceeded, + TrueSkillTotalModelLimitExceeded, + TrueSkillUnknownInitialModelId, + TrueSkillUnauthorizedForJob, + TrueSkillInvalidScenarioName, + TrueSkillConditionStateIsRequired, + TrueSkillEventStateIsRequired, + TrueSkillDuplicateEvent, + TrueSkillDuplicateCondition, + TrueSkillInvalidAnomalyThreshold, + TrueSkillConditionKeyLimitExceeded, + TrueSkillConditionValuePerKeyLimitExceeded, + TrueSkillInvalidTimestamp, + TrueSkillEventLimitExceeded, + TrueSkillInvalidPlayers, + TrueSkillTrueSkillPlayerNull, + TrueSkillInvalidPlayerId, + TrueSkillInvalidSquadSize, + TrueSkillConditionSetNotInModel, + TrueSkillModelStateInvalidForOperation, + TrueSkillScenarioContainsActiveModel, + GameSaveManifestNotFound, + GameSaveManifestVersionAlreadyExists, + GameSaveConflictUpdatingManifest, + GameSaveManifestUpdatesNotAllowed, + GameSaveFileAlreadyExists, + GameSaveManifestVersionNotFinalized, + GameSaveUnknownFileInManifest, + GameSaveFileExceededReportedSize, + GameSaveFileNotUploaded, + GameSaveBadRequest, + GameSaveOperationNotAllowed, + StateShareForbidden, + StateShareTitleNotInFlight, + StateShareStateNotFound, + StateShareLinkNotFound, + StateShareStateRedemptionLimitExceeded, + StateShareStateRedemptionLimitNotUpdated, + StateShareCreatedStatesLimitExceeded, + StateShareIdMissingOrMalformed + } + + [Serializable] + public class GenericPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique generic service identifier for a user. + /// + public GenericServiceId GenericId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the given generic identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class GenericServiceId : PlayFabBaseModel + { + /// + /// Name of the service for which the player has a unique identifier. + /// + public string ServiceName; + /// + /// Unique identifier of the player in that service. + /// + public string UserId; + } + + /// + /// Request has no paramaters. + /// + [Serializable] + public class GetAllSegmentsRequest : PlayFabRequestCommon + { + } + + [Serializable] + public class GetAllSegmentsResult : PlayFabResultCommon + { + /// + /// Array of segments for this title. + /// + public List Segments; + } + + [Serializable] + public class GetCatalogItemsRequest : PlayFabRequestCommon + { + /// + /// Which catalog is being requested. If null, uses the default catalog. + /// + public string CatalogVersion; + } + + [Serializable] + public class GetCatalogItemsResult : PlayFabResultCommon + { + /// + /// Array of items which can be purchased. + /// + public List Catalog; + } + + /// + /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain + /// the data specific to the indicated Keys. Otherwise, the full set of custom user data will be returned. + /// + [Serializable] + public class GetCharacterDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The version that currently exists according to the caller. The call will return the data for all of the keys if the + /// version in the system is greater than this. + /// + public uint? IfChangedFromDataVersion; + /// + /// Specific keys to search for in the custom user data. + /// + public List Keys; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetCharacterDataResult : PlayFabResultCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// User specific data for this title. + /// + public Dictionary Data; + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// All items currently in the character inventory will be returned, irrespective of how they were acquired (via purchasing, + /// grants, coupons, etc.). Items that are expired, fully consumed, or are no longer valid are not considered to be in the + /// user's current inventory, and so will not be not included. Also returns their virtual currency balances. + /// + [Serializable] + public class GetCharacterInventoryRequest : PlayFabRequestCommon + { + /// + /// Used to limit results to only those from a specific catalog version. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetCharacterInventoryResult : PlayFabResultCommon + { + /// + /// Unique identifier of the character for this inventory. + /// + public string CharacterId; + /// + /// Array of inventory items belonging to the character. + /// + public List Inventory; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Array of virtual currency balance(s) belonging to the character. + /// + public Dictionary VirtualCurrency; + /// + /// Array of remaining times and timestamps for virtual currencies. + /// + public Dictionary VirtualCurrencyRechargeTimes; + } + + [Serializable] + public class GetCharacterLeaderboardRequest : PlayFabRequestCommon + { + /// + /// Maximum number of entries to retrieve. + /// + public int MaxResultsCount; + /// + /// First entry in the leaderboard to be retrieved. + /// + public int StartPosition; + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + } + + /// + /// Note that the Position of the character in the results is for the overall leaderboard. + /// + [Serializable] + public class GetCharacterLeaderboardResult : PlayFabResultCommon + { + /// + /// Ordered list of leaderboard entries. + /// + public List Leaderboard; + } + + /// + /// Character statistics are similar to user statistics in that they are numeric values which may only be updated by a + /// server operation, in order to minimize the opportunity for unauthorized changes. In addition to being available for use + /// by the title, the statistics are used for all leaderboard operations in PlayFab. + /// + [Serializable] + public class GetCharacterStatisticsRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetCharacterStatisticsResult : PlayFabResultCommon + { + /// + /// Unique identifier of the character for the statistics. + /// + public string CharacterId; + /// + /// Character statistics for the requested user. + /// + public Dictionary CharacterStatistics; + /// + /// PlayFab unique identifier of the user whose character statistics are being returned. + /// + public string PlayFabId; + } + + [Serializable] + public class GetContentDownloadUrlRequest : PlayFabRequestCommon + { + /// + /// HTTP method to fetch item - GET or HEAD. Use HEAD when only fetching metadata. Default is GET. + /// + public string HttpMethod; + /// + /// Key of the content item to fetch, usually formatted as a path, e.g. images/a.png + /// + public string Key; + /// + /// True to download through CDN. CDN provides higher download bandwidth and lower latency. However, if you want the latest, + /// non-cached version of the content during development, set this to false. Default is true. + /// + public bool? ThruCDN; + } + + [Serializable] + public class GetContentDownloadUrlResult : PlayFabResultCommon + { + /// + /// URL for downloading content via HTTP GET or HEAD method. The URL will expire in approximately one hour. + /// + public string URL; + } + + [Serializable] + public class GetFriendLeaderboardRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates which other platforms' friends should be included in the response. In HTTP, it is represented as a + /// comma-separated list of platforms. + /// + public ExternalFriendSources? ExternalPlatformFriends; + /// + /// Maximum number of entries to retrieve. + /// + public int MaxResultsCount; + /// + /// The player whose friend leaderboard to get + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Position in the leaderboard to start this listing (defaults to the first entry). + /// + public int StartPosition; + /// + /// Statistic used to rank friends for this leaderboard. + /// + public string StatisticName; + /// + /// The version of the leaderboard to get. + /// + public int? Version; + /// + /// Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab. + /// + public string XboxToken; + } + + [Serializable] + public class GetFriendsListRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates which other platforms' friends should be included in the response. In HTTP, it is represented as a + /// comma-separated list of platforms. + /// + public ExternalFriendSources? ExternalPlatformFriends; + /// + /// PlayFab identifier of the player whose friend list to get. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab. + /// + public string XboxToken; + } + + /// + /// If any additional services are queried for the user's friends, those friends who also have a PlayFab account registered + /// for the title will be returned in the results. For Facebook, user has to have logged into the title's Facebook app + /// recently, and only friends who also plays this game will be included. For Xbox Live, user has to have logged into the + /// Xbox Live recently, and only friends who also play this game will be included. + /// + [Serializable] + public class GetFriendsListResult : PlayFabResultCommon + { + /// + /// Array of friends found. + /// + public List Friends; + } + + [Serializable] + public class GetLeaderboardAroundCharacterRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Maximum number of entries to retrieve. + /// + public int MaxResultsCount; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + } + + /// + /// Note: When calling 'GetLeaderboardAround...' APIs, the position of the character defaults to 0 when the character does + /// not have the corresponding statistic. + /// + [Serializable] + public class GetLeaderboardAroundCharacterResult : PlayFabResultCommon + { + /// + /// Ordered list of leaderboard entries. + /// + public List Leaderboard; + } + + [Serializable] + public class GetLeaderboardAroundUserRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Maximum number of entries to retrieve. + /// + public int MaxResultsCount; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + /// + /// The version of the leaderboard to get. + /// + public int? Version; + } + + /// + /// Note: When calling 'GetLeaderboardAround...' APIs, the position of the user defaults to 0 when the user does not have + /// the corresponding statistic. + /// + [Serializable] + public class GetLeaderboardAroundUserResult : PlayFabResultCommon + { + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard; + /// + /// The time the next scheduled reset will occur. Null if the leaderboard does not reset on a schedule. + /// + public DateTime? NextReset; + /// + /// The version of the leaderboard returned. + /// + public int Version; + } + + [Serializable] + public class GetLeaderboardForUsersCharactersRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + } + + /// + /// NOTE: The position of the character in the results is relative to the other characters for that specific user. This mean + /// the values will always be between 0 and one less than the number of characters returned regardless of the size of the + /// actual leaderboard. + /// + [Serializable] + public class GetLeaderboardForUsersCharactersResult : PlayFabResultCommon + { + /// + /// Ordered list of leaderboard entries. + /// + public List Leaderboard; + } + + [Serializable] + public class GetLeaderboardRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Maximum number of entries to retrieve. + /// + public int MaxResultsCount; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// First entry in the leaderboard to be retrieved. + /// + public int StartPosition; + /// + /// Unique identifier for the title-specific statistic for the leaderboard. + /// + public string StatisticName; + /// + /// The version of the leaderboard to get. + /// + public int? Version; + } + + /// + /// Note that the Position of the user in the results is for the overall leaderboard. + /// + [Serializable] + public class GetLeaderboardResult : PlayFabResultCommon + { + /// + /// Ordered listing of users and their positions in the requested leaderboard. + /// + public List Leaderboard; + /// + /// The time the next scheduled reset will occur. Null if the leaderboard does not reset on a schedule. + /// + public DateTime? NextReset; + /// + /// The version of the leaderboard returned. + /// + public int Version; + } + + [Serializable] + public class GetPlayerCombinedInfoRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// PlayFabId of the user whose data will be returned + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerCombinedInfoRequestParams : PlayFabBaseModel + { + /// + /// Whether to get character inventories. Defaults to false. + /// + public bool GetCharacterInventories; + /// + /// Whether to get the list of characters. Defaults to false. + /// + public bool GetCharacterList; + /// + /// Whether to get player profile. Defaults to false. Has no effect for a new player. + /// + public bool GetPlayerProfile; + /// + /// Whether to get player statistics. Defaults to false. + /// + public bool GetPlayerStatistics; + /// + /// Whether to get title data. Defaults to false. + /// + public bool GetTitleData; + /// + /// Whether to get the player's account Info. Defaults to false + /// + public bool GetUserAccountInfo; + /// + /// Whether to get the player's custom data. Defaults to false + /// + public bool GetUserData; + /// + /// Whether to get the player's inventory. Defaults to false + /// + public bool GetUserInventory; + /// + /// Whether to get the player's read only data. Defaults to false + /// + public bool GetUserReadOnlyData; + /// + /// Whether to get the player's virtual currency balances. Defaults to false + /// + public bool GetUserVirtualCurrency; + /// + /// Specific statistics to retrieve. Leave null to get all keys. Has no effect if GetPlayerStatistics is false + /// + public List PlayerStatisticNames; + /// + /// Specifies the properties to return from the player profile. Defaults to returning the player's display name. + /// + public PlayerProfileViewConstraints ProfileConstraints; + /// + /// Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetTitleData is false + /// + public List TitleDataKeys; + /// + /// Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetUserData is false + /// + public List UserDataKeys; + /// + /// Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetUserReadOnlyData is + /// false + /// + public List UserReadOnlyDataKeys; + } + + [Serializable] + public class GetPlayerCombinedInfoResult : PlayFabResultCommon + { + /// + /// Results for requested info. + /// + public GetPlayerCombinedInfoResultPayload InfoResultPayload; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerCombinedInfoResultPayload : PlayFabBaseModel + { + /// + /// Account information for the user. This is always retrieved. + /// + public UserAccountInfo AccountInfo; + /// + /// Inventories for each character for the user. + /// + public List CharacterInventories; + /// + /// List of characters for the user. + /// + public List CharacterList; + /// + /// The profile of the players. This profile is not guaranteed to be up-to-date. For a new player, this profile will not + /// exist. + /// + public PlayerProfileModel PlayerProfile; + /// + /// List of statistics for this player. + /// + public List PlayerStatistics; + /// + /// Title data for this title. + /// + public Dictionary TitleData; + /// + /// User specific custom data. + /// + public Dictionary UserData; + /// + /// The version of the UserData that was returned. + /// + public uint UserDataVersion; + /// + /// Array of inventory items in the user's current inventory. + /// + public List UserInventory; + /// + /// User specific read-only data. + /// + public Dictionary UserReadOnlyData; + /// + /// The version of the Read-Only UserData that was returned. + /// + public uint UserReadOnlyDataVersion; + /// + /// Dictionary of virtual currency balance(s) belonging to the user. + /// + public Dictionary UserVirtualCurrency; + /// + /// Dictionary of remaining times and timestamps for virtual currencies. + /// + public Dictionary UserVirtualCurrencyRechargeTimes; + } + + /// + /// This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class GetPlayerProfileRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, + /// only the allowed client profile properties for the title may be requested. These allowed properties are configured in + /// the Game Manager "Client Profile Options" tab in the "Settings" section. + /// + public PlayerProfileViewConstraints ProfileConstraints; + } + + [Serializable] + public class GetPlayerProfileResult : PlayFabResultCommon + { + /// + /// The profile of the player. This profile is not guaranteed to be up-to-date. For a new player, this profile will not + /// exist. + /// + public PlayerProfileModel PlayerProfile; + } + + [Serializable] + public class GetPlayerSegmentsResult : PlayFabResultCommon + { + /// + /// Array of segments the requested player currently belongs to. + /// + public List Segments; + } + + /// + /// Initial request must contain at least a Segment ID. Subsequent requests must contain the Segment ID as well as the + /// Continuation Token. Failure to send the Continuation Token will result in a new player segment list being generated. + /// Each time the Continuation Token is passed in the length of the Total Seconds to Live is refreshed. If too much time + /// passes between requests to the point that a subsequent request is past the Total Seconds to Live an error will be + /// returned and paging will be terminated. This API is resource intensive and should not be used in scenarios which might + /// generate high request volumes. Only one request to this API at a time should be made per title. Concurrent requests to + /// the API may be rejected with the APIConcurrentRequestLimitExceeded error. + /// + [Serializable] + public class GetPlayersInSegmentRequest : PlayFabRequestCommon + { + /// + /// Continuation token if retrieving subsequent pages of results. + /// + public string ContinuationToken; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If set to true, the profiles are loaded asynchronously and the response will include a continuation token and + /// approximate profile count until the first batch of profiles is loaded. Use this parameter to help avoid network + /// timeouts. + /// + public bool? GetProfilesAsync; + /// + /// Maximum is 10,000. The value 0 will prevent loading any profiles and return only the count of profiles matching this + /// segment. + /// + public uint? MaxBatchSize; + /// + /// Number of seconds to keep the continuation token active. After token expiration it is not possible to continue paging + /// results. Default is 300 (5 minutes). Maximum is 5,400 (90 minutes). + /// + public uint? SecondsToLive; + /// + /// Unique identifier for this segment. + /// + public string SegmentId; + } + + [Serializable] + public class GetPlayersInSegmentResult : PlayFabResultCommon + { + /// + /// Continuation token to use to retrieve subsequent pages of results. If token returns null there are no more results. + /// + public string ContinuationToken; + /// + /// Array of player profiles in this segment. + /// + public List PlayerProfiles; + /// + /// Count of profiles matching this segment. + /// + public int ProfilesInSegment; + } + + [Serializable] + public class GetPlayersSegmentsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// user for whom statistics are being requested + /// + public string PlayFabId; + /// + /// statistics to return + /// + public List StatisticNames; + /// + /// statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be + /// returned) + /// + public List StatisticNameVersions; + } + + /// + /// In addition to being available for use by the title, the statistics are used for all leaderboard operations in PlayFab. + /// + [Serializable] + public class GetPlayerStatisticsResult : PlayFabResultCommon + { + /// + /// PlayFab unique identifier of the user whose statistics are being returned + /// + public string PlayFabId; + /// + /// User statistics for the requested user. + /// + public List Statistics; + } + + [Serializable] + public class GetPlayerStatisticVersionsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// unique name of the statistic + /// + public string StatisticName; + } + + [Serializable] + public class GetPlayerStatisticVersionsResult : PlayFabResultCommon + { + /// + /// version change history of the statistic + /// + public List StatisticVersions; + } + + /// + /// This API will return a list of canonical tags which includes both namespace and tag's name. If namespace is not + /// provided, the result is a list of all canonical tags. TagName can be used for segmentation and Namespace is limited to + /// 128 characters. + /// + [Serializable] + public class GetPlayerTagsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Optional namespace to filter results by + /// + public string Namespace; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetPlayerTagsResult : PlayFabResultCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Canonical tags (including namespace and tag's name) for the requested user + /// + public List Tags; + } + + [Serializable] + public class GetPlayFabIDsFromFacebookIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Facebook identifiers for which the title needs to get PlayFab identifiers. The array cannot exceed 2,000 + /// in length. + /// + public List FacebookIDs; + } + + /// + /// For Facebook identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromFacebookIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Facebook identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromFacebookInstantGamesIdsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Facebook Instant Games identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 25 in length. + /// + public List FacebookInstantGamesIds; + } + + /// + /// For Facebook Instant Games identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromFacebookInstantGamesIdsResult : PlayFabResultCommon + { + /// + /// Mapping of Facebook Instant Games identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromGenericIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique generic service identifiers for which the title needs to get PlayFab identifiers. Currently limited to a + /// maximum of 10 in a single request. + /// + public List GenericIDs; + } + + /// + /// For generic service identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromGenericIDsResult : PlayFabResultCommon + { + /// + /// Mapping of generic service identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromNintendoServiceAccountIdsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Nintendo Switch Account identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List NintendoAccountIds; + } + + /// + /// For Nintendo Service Account identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromNintendoServiceAccountIdsResult : PlayFabResultCommon + { + /// + /// Mapping of Nintendo Switch Service Account identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Nintendo Switch Device identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List NintendoSwitchDeviceIds; + } + + /// + /// For Nintendo Switch Device identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromNintendoSwitchDeviceIdsResult : PlayFabResultCommon + { + /// + /// Mapping of Nintendo Switch Device identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromPSNAccountIDsRequest : PlayFabRequestCommon + { + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Array of unique PlayStation :tm: Network identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List PSNAccountIDs; + } + + /// + /// For PlayStation :tm: Network identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromPSNAccountIDsResult : PlayFabResultCommon + { + /// + /// Mapping of PlayStation :tm: Network identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromPSNOnlineIDsRequest : PlayFabRequestCommon + { + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Array of unique PlayStation :tm: Network identifiers for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List PSNOnlineIDs; + } + + /// + /// For PlayStation :tm: Network identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromPSNOnlineIDsResult : PlayFabResultCommon + { + /// + /// Mapping of PlayStation :tm: Network identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromSteamIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Steam identifiers (Steam profile IDs) for which the title needs to get PlayFab identifiers. The array + /// cannot exceed 2,000 in length. + /// + public List SteamStringIDs; + } + + /// + /// For Steam identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromSteamIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Steam identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromTwitchIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique Twitch identifiers (Twitch's _id) for which the title needs to get PlayFab identifiers. The array cannot + /// exceed 2,000 in length. + /// + public List TwitchIds; + } + + /// + /// For Twitch identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromTwitchIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Twitch identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetPlayFabIDsFromXboxLiveIDsRequest : PlayFabRequestCommon + { + /// + /// The ID of Xbox Live sandbox. + /// + public string Sandbox; + /// + /// Array of unique Xbox Live account identifiers for which the title needs to get PlayFab identifiers. The array cannot + /// exceed 2,000 in length. + /// + public List XboxLiveAccountIDs; + } + + /// + /// For XboxLive identifiers which have not been linked to PlayFab accounts, null will be returned. + /// + [Serializable] + public class GetPlayFabIDsFromXboxLiveIDsResult : PlayFabResultCommon + { + /// + /// Mapping of Xbox Live identifiers to PlayFab identifiers. + /// + public List Data; + } + + /// + /// This API is designed to return publisher-specific values which can be read, but not written to, by the client. This data + /// is shared across all titles assigned to a particular publisher, and can be used for cross-game coordination. Only titles + /// assigned to a publisher can use this API. For more information email helloplayfab@microsoft.com. Note that there may up + /// to a minute delay in between updating title data and this API call returning the newest value. + /// + [Serializable] + public class GetPublisherDataRequest : PlayFabRequestCommon + { + /// + /// array of keys to get back data from the Publisher data blob, set by the admin tools + /// + public List Keys; + } + + [Serializable] + public class GetPublisherDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + [Serializable] + public class GetRandomResultTablesRequest : PlayFabRequestCommon + { + /// + /// Specifies the catalog version that should be used to retrieve the Random Result Tables. If unspecified, uses + /// default/primary catalog. + /// + public string CatalogVersion; + /// + /// The unique identifier of the Random Result Table to use. + /// + public List TableIDs; + } + + /// + /// Note that if a specified Random Result Table contains no entries, or does not exist in the catalog, an InvalidDropTable + /// error will be returned. + /// + [Serializable] + public class GetRandomResultTablesResult : PlayFabResultCommon + { + /// + /// array of random result tables currently available + /// + public Dictionary Tables; + } + + [Serializable] + public class GetSegmentResult : PlayFabBaseModel + { + /// + /// Identifier of the segments AB Test, if it is attached to one. + /// + public string ABTestParent; + /// + /// Unique identifier for this segment. + /// + public string Id; + /// + /// Segment name. + /// + public string Name; + } + + [Serializable] + public class GetServerCustomIDsFromPlayFabIDsRequest : PlayFabRequestCommon + { + /// + /// Array of unique PlayFab player identifiers for which the title needs to get server custom identifiers. Cannot contain + /// more than 25 identifiers. + /// + public List PlayFabIDs; + } + + /// + /// For a PlayFab account that isn't associated with a server custom identity, ServerCustomId will be null. + /// + [Serializable] + public class GetServerCustomIDsFromPlayFabIDsResult : PlayFabResultCommon + { + /// + /// Mapping of server custom player identifiers to PlayFab identifiers. + /// + public List Data; + } + + [Serializable] + public class GetSharedGroupDataRequest : PlayFabRequestCommon + { + /// + /// If true, return the list of all members of the shared group. + /// + public bool? GetMembers; + /// + /// Specific keys to retrieve from the shared group (if not specified, all keys will be returned, while an empty array + /// indicates that no keys should be returned). + /// + public List Keys; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class GetSharedGroupDataResult : PlayFabResultCommon + { + /// + /// Data for the requested keys. + /// + public Dictionary Data; + /// + /// List of PlayFabId identifiers for the members of this group, if requested. + /// + public List Members; + } + + [Serializable] + public class GetStoreItemsResult : PlayFabResultCommon + { + /// + /// The base catalog that this store is a part of. + /// + public string CatalogVersion; + /// + /// Additional data about the store. + /// + public StoreMarketingModel MarketingData; + /// + /// How the store was last updated (Admin or a third party). + /// + public SourceType? Source; + /// + /// Array of items which can be purchased from this store. + /// + public List Store; + /// + /// The ID of this store. + /// + public string StoreId; + } + + /// + /// A store contains an array of references to items defined in one or more catalog versions of the game, along with the + /// prices for the item, in both real world and virtual currencies. These prices act as an override to any prices defined in + /// the catalog. In this way, the base definitions of the items may be defined in the catalog, with all associated + /// properties, while the pricing can be set for each store, as needed. This allows for subsets of goods to be defined for + /// different purposes (in order to simplify showing some, but not all catalog items to users, based upon different + /// characteristics), along with unique prices. Note that all prices defined in the catalog and store definitions for the + /// item are considered valid, and that a compromised client can be made to send a request for an item based upon any of + /// these definitions. If no price is specified in the store for an item, the price set in the catalog should be displayed + /// to the user. + /// + [Serializable] + public class GetStoreItemsServerRequest : PlayFabRequestCommon + { + /// + /// Catalog version to store items from. Use default catalog version if null + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Optional identifier for the player to use in requesting the store information - if used, segment overrides will be + /// applied + /// + public string PlayFabId; + /// + /// Unqiue identifier for the store which is being requested + /// + public string StoreId; + } + + /// + /// This query retrieves the current time from one of the servers in PlayFab. Please note that due to clock drift between + /// servers, there is a potential variance of up to 5 seconds. + /// + [Serializable] + public class GetTimeRequest : PlayFabRequestCommon + { + } + + /// + /// Time is always returned as Coordinated Universal Time (UTC). + /// + [Serializable] + public class GetTimeResult : PlayFabResultCommon + { + /// + /// Current server time when the request was received, in UTC + /// + public DateTime Time; + } + + /// + /// This API is designed to return title specific values which can be read, but not written to, by the client. For example, + /// a developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, + /// movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new + /// build. If an override label is specified in the request, the overrides are applied automatically and returned with the + /// title data. Note that there may up to a minute delay in between updating title data and this API call returning the + /// newest value. + /// + [Serializable] + public class GetTitleDataRequest : PlayFabRequestCommon + { + /// + /// Specific keys to search for in the title data (leave null to get all keys) + /// + public List Keys; + /// + /// Optional field that specifies the name of an override. This value is ignored when used by the game client; otherwise, + /// the overrides are applied automatically to the title data. + /// + public string OverrideLabel; + } + + [Serializable] + public class GetTitleDataResult : PlayFabResultCommon + { + /// + /// a dictionary object of key / value pairs + /// + public Dictionary Data; + } + + [Serializable] + public class GetTitleNewsRequest : PlayFabRequestCommon + { + /// + /// Limits the results to the last n entries. Defaults to 10 if not set. + /// + public int? Count; + } + + [Serializable] + public class GetTitleNewsResult : PlayFabResultCommon + { + /// + /// Array of localized news items. + /// + public List News; + } + + /// + /// This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. + /// Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be + /// taken in how this data is stored and managed. Since this call will always return the relevant information for users who + /// have accessed the title, the recommendation is to not store this data locally. + /// + [Serializable] + public class GetUserAccountInfoRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserAccountInfoResult : PlayFabResultCommon + { + /// + /// Account details for the user whose information was requested. + /// + public UserAccountInfo UserInfo; + } + + /// + /// Get all bans for a user, including inactive and expired bans. + /// + [Serializable] + public class GetUserBansRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserBansResult : PlayFabResultCommon + { + /// + /// Information about the bans + /// + public List BanData; + } + + /// + /// Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain + /// the data specific to the indicated Keys. Otherwise, the full set of custom user data will be returned. + /// + [Serializable] + public class GetUserDataRequest : PlayFabRequestCommon + { + /// + /// The version that currently exists according to the caller. The call will return the data for all of the keys if the + /// version in the system is greater than this. + /// + public uint? IfChangedFromDataVersion; + /// + /// Specific keys to search for in the custom user data. + /// + public List Keys; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserDataResult : PlayFabResultCommon + { + /// + /// User specific data for this title. + /// + public Dictionary Data; + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + /// + /// PlayFab unique identifier of the user whose custom data is being returned. + /// + public string PlayFabId; + } + + /// + /// All items currently in the user inventory will be returned, irrespective of how they were acquired (via purchasing, + /// grants, coupons, etc.). Items that are expired, fully consumed, or are no longer valid are not considered to be in the + /// user's current inventory, and so will not be not included. + /// + [Serializable] + public class GetUserInventoryRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GetUserInventoryResult : PlayFabResultCommon + { + /// + /// Array of inventory items belonging to the user. + /// + public List Inventory; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Array of virtual currency balance(s) belonging to the user. + /// + public Dictionary VirtualCurrency; + /// + /// Array of remaining times and timestamps for virtual currencies. + /// + public Dictionary VirtualCurrencyRechargeTimes; + } + + /// + /// Grants a character to the user of the type and name specified in the request. + /// + [Serializable] + public class GrantCharacterToUserRequest : PlayFabRequestCommon + { + /// + /// Non-unique display name of the character being granted (1-40 characters in length). + /// + public string CharacterName; + /// + /// Type of the character being granted; statistics can be sliced based on this value. + /// + public string CharacterType; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GrantCharacterToUserResult : PlayFabResultCommon + { + /// + /// Unique identifier tagged to this character. + /// + public string CharacterId; + } + + /// + /// Result of granting an item to a user. Note, to retrieve additional information for an item such as Tags, Description + /// that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can be matched + /// to a catalog entry, which contains the additional information. Also note that Custom Data is only set when the User's + /// specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields such as + /// UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class GrantedItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Result of this operation. + /// + public bool Result; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + /// + /// This function directly adds inventory items to the character's inventories. As a result of this operations, the user + /// will not be charged any transaction fee, regardless of the inventory item catalog definition. Please note that the + /// processing time for inventory grants and purchases increases fractionally the more items are in the inventory, and the + /// more items are in the grant/purchase operation. + /// + [Serializable] + public class GrantItemsToCharacterRequest : PlayFabRequestCommon + { + /// + /// String detailing any additional information concerning this operation. + /// + public string Annotation; + /// + /// Catalog version from which items are to be granted. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Array of itemIds to grant to the user. + /// + public List ItemIds; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class GrantItemsToCharacterResult : PlayFabResultCommon + { + /// + /// Array of items granted to users. + /// + public List ItemGrantResults; + } + + /// + /// This function directly adds inventory items to the user's inventories. As a result of this operations, the user will not + /// be charged any transaction fee, regardless of the inventory item catalog definition. Please note that the processing + /// time for inventory grants and purchases increases fractionally the more items are in the inventory, and the more items + /// are in the grant/purchase operation. + /// + [Serializable] + public class GrantItemsToUserRequest : PlayFabRequestCommon + { + /// + /// String detailing any additional information concerning this operation. + /// + public string Annotation; + /// + /// Catalog version from which items are to be granted. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Array of itemIds to grant to the user. + /// + public List ItemIds; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// Please note that the order of the items in the response may not match the order of items in the request. + /// + [Serializable] + public class GrantItemsToUserResult : PlayFabResultCommon + { + /// + /// Array of items granted to users. + /// + public List ItemGrantResults; + } + + /// + /// This function directly adds inventory items to user inventories. As a result of this operations, the user will not be + /// charged any transaction fee, regardless of the inventory item catalog definition. Please note that the processing time + /// for inventory grants and purchases increases fractionally the more items are in the inventory, and the more items are in + /// the grant/purchase operation. + /// + [Serializable] + public class GrantItemsToUsersRequest : PlayFabRequestCommon + { + /// + /// Catalog version from which items are to be granted. + /// + public string CatalogVersion; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Array of items to grant and the users to whom the items are to be granted. + /// + public List ItemGrants; + } + + /// + /// Please note that the order of the items in the response may not match the order of items in the request. + /// + [Serializable] + public class GrantItemsToUsersResult : PlayFabResultCommon + { + /// + /// Array of items granted to users. + /// + public List ItemGrantResults; + } + + [Serializable] + public class ItemGrant : PlayFabBaseModel + { + /// + /// String detailing any additional information concerning this operation. + /// + public string Annotation; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Unique identifier of the catalog item to be granted to the user. + /// + public string ItemId; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item such as Tags, + /// Description that are the same across all instances of the item, a call to GetCatalogItems is required. The ItemID of can + /// be matched to a catalog entry, which contains the additional information. Also note that Custom Data is only set when + /// the User's specific instance has updated the CustomData via a call to UpdateUserInventoryItemCustomData. Other fields + /// such as UnitPrice and UnitCurrency are only set when the item was granted via a purchase. + /// + [Serializable] + public class ItemInstance : PlayFabBaseModel + { + /// + /// Game specific comment associated with this instance when it was added to the user inventory. + /// + public string Annotation; + /// + /// Array of unique items that were awarded when this catalog item was purchased. + /// + public List BundleContents; + /// + /// Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or + /// container. + /// + public string BundleParent; + /// + /// Catalog version for the inventory item, when this instance was created. + /// + public string CatalogVersion; + /// + /// A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog + /// item's custom data. + /// + public Dictionary CustomData; + /// + /// CatalogItem.DisplayName at the time this item was purchased. + /// + public string DisplayName; + /// + /// Timestamp for when this instance will expire. + /// + public DateTime? Expiration; + /// + /// Class name for the inventory item, as defined in the catalog. + /// + public string ItemClass; + /// + /// Unique identifier for the inventory item, as defined in the catalog. + /// + public string ItemId; + /// + /// Unique item identifier for this specific instance of the item. + /// + public string ItemInstanceId; + /// + /// Timestamp for when this instance was purchased. + /// + public DateTime? PurchaseDate; + /// + /// Total number of remaining uses, if this is a consumable item. + /// + public int? RemainingUses; + /// + /// Currency type for the cost of the catalog item. Not available when granting items. + /// + public string UnitCurrency; + /// + /// Cost of the catalog item in the given currency. Not available when granting items. + /// + public uint UnitPrice; + /// + /// The number of uses that were added or removed to this item in this call. + /// + public int? UsesIncrementedBy; + } + + [Serializable] + public class LinkedPlatformAccountModel : PlayFabBaseModel + { + /// + /// Linked account email of the user on the platform, if available + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Unique account identifier of the user on the platform + /// + public string PlatformUserId; + /// + /// Linked account username of the user on the platform, if available + /// + public string Username; + } + + [Serializable] + public class LinkNintendoServiceAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to a specific Nintendo Switch account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// The JSON Web token (JWT) returned by Nintendo after login. Used to validate the request and find the user ID (Nintendo + /// Switch subject) to link with. + /// + public string IdentityToken; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class LinkNintendoServiceAccountSubjectRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to a specific Nintendo Service Account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The Nintendo Service Account subject or id to link to the PlayFab user. + /// + public string Subject; + } + + [Serializable] + public class LinkNintendoSwitchDeviceIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the Nintendo Switch Device ID, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Nintendo Switch unique identifier for the user's device. + /// + public string NintendoSwitchDeviceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class LinkNintendoSwitchDeviceIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkPSNAccountRequest : PlayFabRequestCommon + { + /// + /// Authentication code provided by the PlayStation :tm: Network. + /// + public string AuthCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code + /// + public string RedirectUri; + } + + [Serializable] + public class LinkPSNAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkPSNIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Id of the PlayStation :tm: Network user. Also known as the PSN Account Id. + /// + public string PSNUserId; + } + + [Serializable] + public class LinkPSNIdResponse : PlayFabResultCommon + { + } + + [Serializable] + public class LinkServerCustomIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the custom ID, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Unique PlayFab identifier. + /// + public string PlayFabId; + /// + /// Unique server custom identifier for this player. + /// + public string ServerCustomId; + } + + [Serializable] + public class LinkServerCustomIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkSteamIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Xbox Live identifier. + /// + public string PlayFabId; + /// + /// Unique Steam identifier for a user. + /// + public string SteamId; + } + + [Serializable] + public class LinkSteamIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class LinkXboxAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// If another user is already linked to the account, unlink the other user and re-link. + /// + public bool? ForceLink; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Xbox Live identifier. + /// + public string PlayFabId; + /// + /// Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). + /// + public string XboxToken; + } + + [Serializable] + public class LinkXboxAccountResult : PlayFabResultCommon + { + } + + /// + /// Returns a list of every character that currently belongs to a user. + /// + [Serializable] + public class ListUsersCharactersRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class ListUsersCharactersResult : PlayFabResultCommon + { + /// + /// The requested list of characters. + /// + public List Characters; + } + + /// + /// Contains the localized push notification content. + /// + [Serializable] + public class LocalizedPushNotificationProperties : PlayFabBaseModel + { + /// + /// Message of the localized push notification template. + /// + public string Message; + /// + /// Subject of the localized push notification template. + /// + public string Subject; + } + + [Serializable] + public class LocationModel : PlayFabBaseModel + { + /// + /// City name. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode? ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode? CountryCode; + /// + /// Latitude coordinate of the geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the geographic location. + /// + public double? Longitude; + } + + public enum LoginIdentityProvider + { + Unknown, + PlayFab, + Custom, + GameCenter, + GooglePlay, + Steam, + XBoxLive, + PSN, + Kongregate, + Facebook, + IOSDevice, + AndroidDevice, + Twitch, + WindowsHello, + GameServer, + CustomServer, + NintendoSwitch, + FacebookInstantGames, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + /// + /// If this is the first time a user has signed in with the PlayStation :tm: Network account and CreateAccount is set to + /// true, a new PlayFab account will be created and linked to the PlayStation :tm: Network account. In this case, no email + /// or username will be associated with the PlayFab account. Otherwise, if no PlayFab account is linked to the PlayStation + /// :tm: Network account, an error indicating this will be returned, so that the title can guide the user through creation + /// of a PlayFab account. + /// + [Serializable] + public class LoginWithPSNRequest : PlayFabRequestCommon + { + /// + /// Auth code provided by the PlayStation :tm: Network OAuth provider. + /// + public string AuthCode; + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Id of the PlayStation :tm: Network issuer environment. If null, defaults to production environment. + /// + public int? IssuerId; + /// + /// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code + /// + public string RedirectUri; + } + + [Serializable] + public class LoginWithServerCustomIdRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// The backend server identifier for this player. + /// + public string ServerCustomId; + } + + /// + /// If this is the first time a user has signed in with the Steam ID and CreateAccount is set to true, a new PlayFab account + /// will be created and linked to the Steam account. In this case, no email or username will be associated with the PlayFab + /// account. Otherwise, if no PlayFab account is linked to the Steam account, an error indicating this will be returned, so + /// that the title can guide the user through creation of a PlayFab account. Steam users that are not logged into the Steam + /// Client app will only have their Steam username synced, other data, such as currency and country will not be available + /// until they login while the Client is open. + /// + [Serializable] + public class LoginWithSteamIdRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Unique Steam identifier for a user. + /// + public string SteamId; + } + + /// + /// If this is the first time a user has signed in with the Xbox ID and CreateAccount is set to true, a new PlayFab account + /// will be created and linked to the Xbox Live account. In this case, no email or username will be associated with the + /// PlayFab account. Otherwise, if no PlayFab account is linked to the Xbox Live account, an error indicating this will be + /// returned, so that the title can guide the user through creation of a PlayFab account. + /// + [Serializable] + public class LoginWithXboxIdRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// The id of Xbox Live sandbox. + /// + public string Sandbox; + /// + /// Unique Xbox identifier for a user. + /// + public string XboxId; + } + + /// + /// If this is the first time a user has signed in with the Xbox Live account and CreateAccount is set to true, a new + /// PlayFab account will be created and linked to the Xbox Live account. In this case, no email or username will be + /// associated with the PlayFab account. Otherwise, if no PlayFab account is linked to the Xbox Live account, an error + /// indicating this will be returned, so that the title can guide the user through creation of a PlayFab account. + /// + [Serializable] + public class LoginWithXboxRequest : PlayFabRequestCommon + { + /// + /// Automatically create a PlayFab account if one is not currently linked to this ID. + /// + public bool? CreateAccount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Flags for which pieces of info to return for the user. + /// + public GetPlayerCombinedInfoRequestParams InfoRequestParameters; + /// + /// Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). + /// + public string XboxToken; + } + + [Serializable] + public class LogStatement : PlayFabBaseModel + { + /// + /// Optional object accompanying the message as contextual information + /// + public object Data; + /// + /// 'Debug', 'Info', or 'Error' + /// + public string Level; + public string Message; + } + + [Serializable] + public class MembershipModel : PlayFabBaseModel + { + /// + /// Whether this membership is active. That is, whether the MembershipExpiration time has been reached. + /// + public bool IsActive; + /// + /// The time this membership expires + /// + public DateTime MembershipExpiration; + /// + /// The id of the membership + /// + public string MembershipId; + /// + /// Membership expirations can be explicitly overridden (via game manager or the admin api). If this membership has been + /// overridden, this will be the new expiration time. + /// + public DateTime? OverrideExpiration; + /// + /// The list of subscriptions that this player has for this membership + /// + public List Subscriptions; + } + + [Serializable] + public class ModifyCharacterVirtualCurrencyResult : PlayFabResultCommon + { + /// + /// Balance of the virtual currency after modification. + /// + public int Balance; + /// + /// Name of the virtual currency which was modified. + /// + public string VirtualCurrency; + } + + /// + /// This function can both add and remove uses of an inventory item. If the number of uses drops below zero, the item will + /// be removed from active inventory. + /// + [Serializable] + public class ModifyItemUsesRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique instance identifier of the item to be modified. + /// + public string ItemInstanceId; + /// + /// PlayFab unique identifier of the user whose item is being modified. + /// + public string PlayFabId; + /// + /// Number of uses to add to the item. Can be negative to remove uses. + /// + public int UsesToAdd; + } + + [Serializable] + public class ModifyItemUsesResult : PlayFabResultCommon + { + /// + /// Unique instance identifier of the item with uses consumed. + /// + public string ItemInstanceId; + /// + /// Number of uses remaining on the item. + /// + public int RemainingUses; + } + + [Serializable] + public class ModifyUserVirtualCurrencyResult : PlayFabResultCommon + { + /// + /// Balance of the virtual currency after modification. + /// + public int Balance; + /// + /// Amount added or subtracted from the user's virtual currency. Maximum VC balance is Int32 (2,147,483,647). Any increase + /// over this value will be discarded. + /// + public int BalanceChange; + /// + /// User currency was subtracted from. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which was modified. + /// + public string VirtualCurrency; + } + + /// + /// Transfers an item from a character to another character that is owned by the same user. This will remove the item from + /// the character's inventory (until and unless it is moved back), and will enable the other character to make use of the + /// item instead. + /// + [Serializable] + public class MoveItemToCharacterFromCharacterRequest : PlayFabRequestCommon + { + /// + /// Unique identifier of the character that currently has the item. + /// + public string GivingCharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique identifier of the character that will be receiving the item. + /// + public string ReceivingCharacterId; + } + + [Serializable] + public class MoveItemToCharacterFromCharacterResult : PlayFabResultCommon + { + } + + /// + /// Transfers an item from a user to a character she owns. This will remove the item from the user's inventory (until and + /// unless it is moved back), and will enable the character to make use of the item instead. + /// + [Serializable] + public class MoveItemToCharacterFromUserRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class MoveItemToCharacterFromUserResult : PlayFabResultCommon + { + } + + /// + /// Transfers an item from a character to the owning user. This will remove the item from the character's inventory (until + /// and unless it is moved back), and will enable the user to make use of the item instead. + /// + [Serializable] + public class MoveItemToUserFromCharacterRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class MoveItemToUserFromCharacterResult : PlayFabResultCommon + { + } + + [Serializable] + public class NintendoServiceAccountPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Nintendo Switch Service Account identifier for a user. + /// + public string NintendoServiceAccountId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Nintendo Switch Service Account + /// identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class NintendoSwitchPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique Nintendo Switch Device identifier for a user. + /// + public string NintendoSwitchDeviceId; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Nintendo Switch Device identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class PlayerLeaderboardEntry : PlayFabBaseModel + { + /// + /// Title-specific display name of the user for this leaderboard entry. + /// + public string DisplayName; + /// + /// PlayFab unique identifier of the user for this leaderboard entry. + /// + public string PlayFabId; + /// + /// User's overall position in the leaderboard. + /// + public int Position; + /// + /// The profile of the user, if requested. + /// + public PlayerProfileModel Profile; + /// + /// Specific value of the user's statistic. + /// + public int StatValue; + } + + [Serializable] + public class PlayerLinkedAccount : PlayFabBaseModel + { + /// + /// Linked account's email + /// + public string Email; + /// + /// Authentication platform + /// + public LoginIdentityProvider? Platform; + /// + /// Platform user identifier + /// + public string PlatformUserId; + /// + /// Linked account's username + /// + public string Username; + } + + [Serializable] + public class PlayerLocation : PlayFabBaseModel + { + /// + /// City of the player's geographic location. + /// + public string City; + /// + /// The two-character continent code for this location + /// + public ContinentCode ContinentCode; + /// + /// The two-character ISO 3166-1 country code for the country associated with the location + /// + public CountryCode CountryCode; + /// + /// Latitude coordinate of the player's geographic location. + /// + public double? Latitude; + /// + /// Longitude coordinate of the player's geographic location. + /// + public double? Longitude; + } + + [Serializable] + public class PlayerProfile : PlayFabBaseModel + { + /// + /// Array of ad campaigns player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// Image URL of the player's avatar. + /// + public string AvatarUrl; + /// + /// Banned until UTC Date. If permanent ban this is set for 20 years after the original ban date. + /// + public DateTime? BannedUntil; + /// + /// The prediction of the player to churn within the next seven days. + /// + public ChurnRiskLevel? ChurnPrediction; + /// + /// Array of contact email addresses associated with the player + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player Display Name + /// + public string DisplayName; + /// + /// Last login + /// + public DateTime? LastLogin; + /// + /// Array of third party accounts linked to this player + /// + public List LinkedAccounts; + /// + /// Dictionary of player's locations by type. + /// + public Dictionary Locations; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// List of player variants for experimentation + /// + public List PlayerExperimentVariants; + /// + /// PlayFab Player ID + /// + public string PlayerId; + /// + /// Array of player statistics + /// + public List PlayerStatistics; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// Array of configured push notification end points + /// + public List PushNotificationRegistrations; + /// + /// Dictionary of player's statistics using only the latest version's value + /// + public Dictionary Statistics; + /// + /// List of player's tags for segmentation. + /// + public List Tags; + /// + /// Title ID this profile applies to + /// + public string TitleId; + /// + /// A sum of player's total purchases in USD across all currencies. + /// + public uint? TotalValueToDateInUSD; + /// + /// Dictionary of player's total purchases by currency. + /// + public Dictionary ValuesToDate; + /// + /// Dictionary of player's virtual currency balances + /// + public Dictionary VirtualCurrencyBalances; + } + + [Serializable] + public class PlayerProfileModel : PlayFabBaseModel + { + /// + /// List of advertising campaigns the player has been attributed to + /// + public List AdCampaignAttributions; + /// + /// URL of the player's avatar image + /// + public string AvatarUrl; + /// + /// If the player is currently banned, the UTC Date when the ban expires + /// + public DateTime? BannedUntil; + /// + /// List of all contact email info associated with the player account + /// + public List ContactEmailAddresses; + /// + /// Player record created + /// + public DateTime? Created; + /// + /// Player display name + /// + public string DisplayName; + /// + /// List of experiment variants for the player. Note that these variants are not guaranteed to be up-to-date when returned + /// during login because the player profile is updated only after login. Instead, use the LoginResult.TreatmentAssignment + /// property during login to get the correct variants and variables. + /// + public List ExperimentVariants; + /// + /// UTC time when the player most recently logged in to the title + /// + public DateTime? LastLogin; + /// + /// List of all authentication systems linked to this player account + /// + public List LinkedAccounts; + /// + /// List of geographic locations from which the player has logged in to the title + /// + public List Locations; + /// + /// List of memberships for the player, along with whether are expired. + /// + public List Memberships; + /// + /// Player account origination + /// + public LoginIdentityProvider? Origination; + /// + /// PlayFab player account unique identifier + /// + public string PlayerId; + /// + /// Publisher this player belongs to + /// + public string PublisherId; + /// + /// List of configured end points registered for sending the player push notifications + /// + public List PushNotificationRegistrations; + /// + /// List of leaderboard statistic values for the player + /// + public List Statistics; + /// + /// List of player's tags for segmentation + /// + public List Tags; + /// + /// Title ID this player profile applies to + /// + public string TitleId; + /// + /// Sum of the player's purchases made with real-money currencies, converted to US dollars equivalent and represented as a + /// whole number of cents (1/100 USD). For example, 999 indicates nine dollars and ninety-nine cents. + /// + public uint? TotalValueToDateInUSD; + /// + /// List of the player's lifetime purchase totals, summed by real-money currency + /// + public List ValuesToDate; + } + + [Serializable] + public class PlayerProfileViewConstraints : PlayFabBaseModel + { + /// + /// Whether to show player's avatar URL. Defaults to false + /// + public bool ShowAvatarUrl; + /// + /// Whether to show the banned until time. Defaults to false + /// + public bool ShowBannedUntil; + /// + /// Whether to show campaign attributions. Defaults to false + /// + public bool ShowCampaignAttributions; + /// + /// Whether to show contact email addresses. Defaults to false + /// + public bool ShowContactEmailAddresses; + /// + /// Whether to show the created date. Defaults to false + /// + public bool ShowCreated; + /// + /// Whether to show the display name. Defaults to false + /// + public bool ShowDisplayName; + /// + /// Whether to show player's experiment variants. Defaults to false + /// + public bool ShowExperimentVariants; + /// + /// Whether to show the last login time. Defaults to false + /// + public bool ShowLastLogin; + /// + /// Whether to show the linked accounts. Defaults to false + /// + public bool ShowLinkedAccounts; + /// + /// Whether to show player's locations. Defaults to false + /// + public bool ShowLocations; + /// + /// Whether to show player's membership information. Defaults to false + /// + public bool ShowMemberships; + /// + /// Whether to show origination. Defaults to false + /// + public bool ShowOrigination; + /// + /// Whether to show push notification registrations. Defaults to false + /// + public bool ShowPushNotificationRegistrations; + /// + /// Reserved for future development + /// + public bool ShowStatistics; + /// + /// Whether to show tags. Defaults to false + /// + public bool ShowTags; + /// + /// Whether to show the total value to date in usd. Defaults to false + /// + public bool ShowTotalValueToDateInUsd; + /// + /// Whether to show the values to date. Defaults to false + /// + public bool ShowValuesToDate; + } + + [Serializable] + public class PlayerStatistic : PlayFabBaseModel + { + /// + /// Statistic ID + /// + public string Id; + /// + /// Statistic name + /// + public string Name; + /// + /// Current statistic value + /// + public int StatisticValue; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int StatisticVersion; + } + + [Serializable] + public class PlayerStatisticVersion : PlayFabBaseModel + { + /// + /// time when the statistic version became active + /// + public DateTime ActivationTime; + /// + /// time when the statistic version became inactive due to statistic version incrementing + /// + public DateTime? DeactivationTime; + /// + /// time at which the statistic version was scheduled to become active, based on the configured ResetInterval + /// + public DateTime? ScheduledActivationTime; + /// + /// time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval + /// + public DateTime? ScheduledDeactivationTime; + /// + /// name of the statistic when the version became active + /// + public string StatisticName; + /// + /// version of the statistic + /// + public uint Version; + } + + [Serializable] + public class PSNAccountPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the PlayStation :tm: Network + /// identifier. + /// + public string PlayFabId; + /// + /// Unique PlayStation :tm: Network identifier for a user. + /// + public string PSNAccountId; + } + + [Serializable] + public class PSNOnlinePlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the PlayStation :tm: Network + /// identifier. + /// + public string PlayFabId; + /// + /// Unique PlayStation :tm: Network identifier for a user. + /// + public string PSNOnlineId; + } + + [Serializable] + public class PushNotificationPackage : PlayFabBaseModel + { + /// + /// Numerical badge to display on App icon (iOS only) + /// + public int Badge; + /// + /// This must be a JSON formatted object. For use with developer-created custom Push Notification plugins + /// + public string CustomData; + /// + /// Icon file to display with the message (Not supported for iOS) + /// + public string Icon; + /// + /// Content of the message (all platforms) + /// + public string Message; + /// + /// Sound file to play with the message (all platforms) + /// + public string Sound; + /// + /// Title/Subject of the message. Not supported for iOS + /// + public string Title; + } + + public enum PushNotificationPlatform + { + ApplePushNotificationService, + GoogleCloudMessaging + } + + [Serializable] + public class PushNotificationRegistration : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + [Serializable] + public class PushNotificationRegistrationModel : PlayFabBaseModel + { + /// + /// Notification configured endpoint + /// + public string NotificationEndpointARN; + /// + /// Push notification platform + /// + public PushNotificationPlatform? Platform; + } + + [Serializable] + public class RandomResultTableListing : PlayFabBaseModel + { + /// + /// Catalog version this table is associated with + /// + public string CatalogVersion; + /// + /// Child nodes that indicate what kind of drop table item this actually is. + /// + public List Nodes; + /// + /// Unique name for this drop table + /// + public string TableId; + } + + /// + /// Coupon codes can be created for any item, or set of items, in the catalog for the title. This operation causes the + /// coupon to be consumed, and the specific items to be awarded to the user. Attempting to re-use an already consumed code, + /// or a code which has not yet been created in the service, will result in an error. + /// + [Serializable] + public class RedeemCouponRequest : PlayFabRequestCommon + { + /// + /// Catalog version of the coupon. + /// + public string CatalogVersion; + /// + /// Optional identifier for the Character that should receive the item. If null, item is added to the player + /// + public string CharacterId; + /// + /// Generated coupon code to redeem. + /// + public string CouponCode; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class RedeemCouponResult : PlayFabResultCommon + { + /// + /// Items granted to the player as a result of redeeming the coupon. + /// + public List GrantedItems; + } + + [Serializable] + public class RemoveFriendRequest : PlayFabRequestCommon + { + /// + /// PlayFab identifier of the friend account which is to be removed. + /// + public string FriendPlayFabId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class RemoveGenericIDRequest : PlayFabRequestCommon + { + /// + /// Generic service identifier to be removed from the player. + /// + public GenericServiceId GenericId; + /// + /// PlayFabId of the user to remove. + /// + public string PlayFabId; + } + + /// + /// This API will trigger a player_tag_removed event and remove a tag with the given TagName and PlayFabID from the + /// corresponding player profile. TagName can be used for segmentation and it is limited to 256 characters + /// + [Serializable] + public class RemovePlayerTagRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Unique tag for player profile. + /// + public string TagName; + } + + [Serializable] + public class RemovePlayerTagResult : PlayFabResultCommon + { + } + + [Serializable] + public class RemoveSharedGroupMembersRequest : PlayFabRequestCommon + { + /// + /// An array of unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public List PlayFabIds; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class RemoveSharedGroupMembersResult : PlayFabResultCommon + { + } + + [Serializable] + public class ReportPlayerServerRequest : PlayFabRequestCommon + { + /// + /// Optional additional comment by reporting player. + /// + public string Comment; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab identifier of the reported player. + /// + public string ReporteeId; + /// + /// PlayFabId of the reporting player. + /// + public string ReporterId; + } + + /// + /// Players are currently limited to five reports per day. Attempts by a single user account to submit reports beyond five + /// will result in Updated being returned as false. + /// + [Serializable] + public class ReportPlayerServerResult : PlayFabResultCommon + { + /// + /// The number of remaining reports which may be filed today by this reporting player. + /// + public int SubmissionsRemaining; + } + + [Serializable] + public class ResultTableNode : PlayFabBaseModel + { + /// + /// Either an ItemId, or the TableId of another random result table + /// + public string ResultItem; + /// + /// Whether this entry in the table is an item or a link to another table + /// + public ResultTableNodeType ResultItemType; + /// + /// How likely this is to be rolled - larger numbers add more weight + /// + public int Weight; + } + + public enum ResultTableNodeType + { + ItemId, + TableId + } + + /// + /// Setting the active state of all non-expired bans for a user to Inactive. Expired bans with an Active state will be + /// ignored, however. Returns information about applied updates only. + /// + [Serializable] + public class RevokeAllBansForUserRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class RevokeAllBansForUserResult : PlayFabResultCommon + { + /// + /// Information on the bans that were revoked. + /// + public List BanData; + } + + /// + /// Setting the active state of all bans requested to Inactive regardless of whether that ban has already expired. BanIds + /// that do not exist will be skipped. Returns information about applied updates only. + /// + [Serializable] + public class RevokeBansRequest : PlayFabRequestCommon + { + /// + /// Ids of the bans to be revoked. Maximum 100. + /// + public List BanIds; + } + + [Serializable] + public class RevokeBansResult : PlayFabResultCommon + { + /// + /// Information on the bans that were revoked + /// + public List BanData; + } + + [Serializable] + public class RevokeInventoryItem : PlayFabBaseModel + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In cases where the inventory item in question is a "crate", and the items it contained have already been dispensed, this + /// will not revoke access or otherwise remove the items which were dispensed. + /// + [Serializable] + public class RevokeInventoryItemRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// In cases where the inventory item in question is a "crate", and the items it contained have already been dispensed, this + /// will not revoke access or otherwise remove the items which were dispensed. + /// + [Serializable] + public class RevokeInventoryItemsRequest : PlayFabRequestCommon + { + /// + /// Array of player items to revoke, between 1 and 25 items. + /// + public List Items; + } + + [Serializable] + public class RevokeInventoryItemsResult : PlayFabResultCommon + { + /// + /// Collection of any errors that occurred during processing. + /// + public List Errors; + } + + [Serializable] + public class RevokeInventoryResult : PlayFabResultCommon + { + } + + [Serializable] + public class RevokeItemError : PlayFabBaseModel + { + /// + /// Specific error that was encountered. + /// + public GenericErrorCodes? Error; + /// + /// Item information that failed to be revoked. + /// + public RevokeInventoryItem Item; + } + + /// + /// Represents the save push notification template request. + /// + [Serializable] + public class SavePushNotificationTemplateRequest : PlayFabRequestCommon + { + /// + /// Android JSON for the notification template. + /// + public string AndroidPayload; + /// + /// Id of the push notification template. + /// + public string Id; + /// + /// IOS JSON for the notification template. + /// + public string IOSPayload; + /// + /// Dictionary of localized push notification templates with the language as the key. + /// + public Dictionary LocalizedPushNotificationTemplates; + /// + /// Name of the push notification template. + /// + public string Name; + } + + /// + /// Represents the save push notification template result. + /// + [Serializable] + public class SavePushNotificationTemplateResult : PlayFabResultCommon + { + /// + /// Id of the push notification template that was saved. + /// + public string PushNotificationTemplateId; + } + + [Serializable] + public class ScriptExecutionError : PlayFabBaseModel + { + /// + /// Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, + /// CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError + /// + public string Error; + /// + /// Details about the error + /// + public string Message; + /// + /// Point during the execution of the script at which the error occurred, if any + /// + public string StackTrace; + } + + /// + /// PlayFab accounts which have valid email address or username will be able to receive a password reset email using this + /// API.The email sent must be an account recovery email template. The username or email can be passed in to send the email + /// + [Serializable] + public class SendCustomAccountRecoveryEmailRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// User email address attached to their account + /// + public string Email; + /// + /// The email template id of the account recovery email template to send. + /// + public string EmailTemplateId; + /// + /// The user's username requesting an account recovery. + /// + public string Username; + } + + [Serializable] + public class SendCustomAccountRecoveryEmailResult : PlayFabResultCommon + { + } + + /// + /// Sends an email for only players that have contact emails associated with them. Takes in an email template ID + /// specifyingthe email template to send. + /// + [Serializable] + public class SendEmailFromTemplateRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The email template id of the email template to send. + /// + public string EmailTemplateId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class SendEmailFromTemplateResult : PlayFabResultCommon + { + } + + /// + /// Represents the request for sending a push notification template to a recipient. + /// + [Serializable] + public class SendPushNotificationFromTemplateRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Id of the push notification template. + /// + public string PushNotificationTemplateId; + /// + /// PlayFabId of the push notification recipient. + /// + public string Recipient; + } + + [Serializable] + public class SendPushNotificationRequest : PlayFabRequestCommon + { + /// + /// Allows you to provide precisely formatted json to target devices. This is an advanced feature, allowing you to deliver + /// to custom plugin logic, fields, or functionality not natively supported by PlayFab. + /// + public List AdvancedPlatformDelivery; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Text of message to send. + /// + public string Message; + /// + /// Defines all possible push attributes like message, title, icon, etc. Some parameters are device specific - please see + /// the PushNotificationPackage documentation for details. + /// + public PushNotificationPackage Package; + /// + /// PlayFabId of the recipient of the push notification. + /// + public string Recipient; + /// + /// Subject of message to send (may not be displayed in all platforms) + /// + public string Subject; + /// + /// Target Platforms that should receive the Message or Package. If omitted, we will send to all available platforms. + /// + public List TargetPlatforms; + } + + [Serializable] + public class SendPushNotificationResult : PlayFabResultCommon + { + } + + [Serializable] + public class ServerCustomIDPlayFabIDPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier. + /// + public string PlayFabId; + /// + /// Unique server custom identifier for this player. + /// + public string ServerCustomId; + } + + [Serializable] + public class ServerLoginResult : PlayFabResultCommon + { + /// + /// If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and + /// returned. + /// + public EntityTokenResponse EntityToken; + /// + /// Results for requested info. + /// + public GetPlayerCombinedInfoResultPayload InfoResultPayload; + /// + /// The time of this user's previous login. If there was no previous login, then it's DateTime.MinValue + /// + public DateTime? LastLoginTime; + /// + /// True if the account was newly created on this login. + /// + public bool NewlyCreated; + /// + /// Player's unique PlayFabId. + /// + public string PlayFabId; + /// + /// Unique token authorizing the user and game at the server level, for the current session. + /// + public string SessionTicket; + /// + /// Settings specific to this user. + /// + public UserSettings SettingsForUser; + /// + /// The experimentation treatments for this user at the time of login. + /// + public TreatmentAssignment TreatmentAssignment; + } + + /// + /// This operation is not additive. It will completely replace the tag list for the specified user. Please note that only + /// users in the PlayFab friends list can be assigned tags. Attempting to set a tag on a friend only included in the friends + /// list from a social site integration (such as Facebook or Steam) will return the AccountNotFound error. + /// + [Serializable] + public class SetFriendTagsRequest : PlayFabRequestCommon + { + /// + /// PlayFab identifier of the friend account to which the tag(s) should be applied. + /// + public string FriendPlayFabId; + /// + /// PlayFab identifier of the player whose friend is to be updated. + /// + public string PlayFabId; + /// + /// Array of tags to set on the friend account. + /// + public List Tags; + } + + /// + /// APIs that require signatures require that the player have a configured Player Secret Key that is used to sign all + /// requests. Players that don't have a secret will be blocked from making API calls until it is configured. To create a + /// signature header add a SHA256 hashed string containing UTF8 encoded JSON body as it will be sent to the server, the + /// current time in UTC formatted to ISO 8601, and the players secret formatted as 'body.date.secret'. Place the resulting + /// hash into the header X-PlayFab-Signature, along with a header X-PlayFab-Timestamp of the same UTC timestamp used in the + /// signature. + /// + [Serializable] + public class SetPlayerSecretRequest : PlayFabRequestCommon + { + /// + /// Player secret that is used to verify API request signatures (Enterprise Only). + /// + public string PlayerSecret; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class SetPlayerSecretResult : PlayFabResultCommon + { + } + + /// + /// This API is designed to store publisher-specific values which can be read, but not written to, by the client. This data + /// is shared across all titles assigned to a particular publisher, and can be used for cross-game coordination. Only titles + /// assigned to a publisher can use this API. This operation is additive. If a Key does not exist in the current dataset, it + /// will be added with the specified Value. If it already exists, the Value for that key will be overwritten with the new + /// Value. For more information email helloplayfab@microsoft.com + /// + [Serializable] + public class SetPublisherDataRequest : PlayFabRequestCommon + { + /// + /// key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// new value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class SetPublisherDataResult : PlayFabResultCommon + { + } + + /// + /// This API is designed to store title specific values which can be read, but not written to, by the client. For example, a + /// developer could choose to store values which modify the user experience, such as enemy spawn rates, weapon strengths, + /// movement speeds, etc. This allows a developer to update the title without the need to create, test, and ship a new + /// build. This operation is additive. If a Key does not exist in the current dataset, it will be added with the specified + /// Value. If it already exists, the Value for that key will be overwritten with the new Value. + /// + [Serializable] + public class SetTitleDataRequest : PlayFabRequestCommon + { + /// + /// key we want to set a value on (note, this is additive - will only replace an existing key's value if they are the same + /// name.) Keys are trimmed of whitespace. Keys may not begin with the '!' character. + /// + public string Key; + /// + /// new value to set. Set to null to remove a value + /// + public string Value; + } + + [Serializable] + public class SetTitleDataResult : PlayFabResultCommon + { + } + + [Serializable] + public class SharedGroupDataRecord : PlayFabBaseModel + { + /// + /// Timestamp for when this data was last updated. + /// + public DateTime LastUpdated; + /// + /// PlayFabId of the user to last update this value. + /// + public string LastUpdatedBy; + /// + /// Indicates whether this data can be read by all users (public) or only members of the group (private). + /// + public UserDataPermission? Permission; + /// + /// Data stored for the specified group data key. + /// + public string Value; + } + + public enum SourceType + { + Admin, + BackEnd, + GameClient, + GameServer, + Partner, + Custom, + API + } + + [Serializable] + public class StatisticModel : PlayFabBaseModel + { + /// + /// Statistic name + /// + public string Name; + /// + /// Statistic value + /// + public int Value; + /// + /// Statistic version (0 if not a versioned statistic) + /// + public int Version; + } + + [Serializable] + public class StatisticNameVersion : PlayFabBaseModel + { + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// the version of the statistic to be returned + /// + public uint Version; + } + + [Serializable] + public class StatisticUpdate : PlayFabBaseModel + { + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// statistic value for the player + /// + public int Value; + /// + /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded. Null when + /// setting the statistic value for the first time. + /// + public uint? Version; + } + + [Serializable] + public class StatisticValue : PlayFabBaseModel + { + /// + /// unique name of the statistic + /// + public string StatisticName; + /// + /// statistic value for the player + /// + public int Value; + /// + /// for updates to an existing statistic value for a player, the version of the statistic when it was loaded + /// + public uint Version; + } + + [Serializable] + public class SteamPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam identifier. + /// + public string PlayFabId; + /// + /// Unique Steam identifier for a user. + /// + public string SteamStringId; + } + + /// + /// A store entry that list a catalog item at a particular price + /// + [Serializable] + public class StoreItem : PlayFabBaseModel + { + /// + /// Store specific custom data. The data only exists as part of this store; it is not transferred to item instances + /// + public object CustomData; + /// + /// Intended display position for this item. Note that 0 is the first position + /// + public uint? DisplayPosition; + /// + /// Unique identifier of the item as it exists in the catalog - note that this must exactly match the ItemId from the + /// catalog + /// + public string ItemId; + /// + /// Override prices for this item for specific currencies + /// + public Dictionary RealCurrencyPrices; + /// + /// Override prices for this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) + /// + public Dictionary VirtualCurrencyPrices; + } + + /// + /// Marketing data about a specific store + /// + [Serializable] + public class StoreMarketingModel : PlayFabBaseModel + { + /// + /// Tagline for a store. + /// + public string Description; + /// + /// Display name of a store as it will appear to users. + /// + public string DisplayName; + /// + /// Custom data about a store. + /// + public object Metadata; + } + + [Serializable] + public class SubscriptionModel : PlayFabBaseModel + { + /// + /// When this subscription expires. + /// + public DateTime Expiration; + /// + /// The time the subscription was orignially purchased + /// + public DateTime InitialSubscriptionTime; + /// + /// Whether this subscription is currently active. That is, if Expiration > now. + /// + public bool IsActive; + /// + /// The status of this subscription, according to the subscription provider. + /// + public SubscriptionProviderStatus? Status; + /// + /// The id for this subscription + /// + public string SubscriptionId; + /// + /// The item id for this subscription from the primary catalog + /// + public string SubscriptionItemId; + /// + /// The provider for this subscription. Apple or Google Play are supported today. + /// + public string SubscriptionProvider; + } + + public enum SubscriptionProviderStatus + { + NoError, + Cancelled, + UnknownError, + BillingError, + ProductUnavailable, + CustomerDidNotAcceptPriceChange, + FreeTrial, + PaymentPending + } + + [Serializable] + public class SubtractCharacterVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be subtracted from the user balance of the specified virtual currency. + /// + public int Amount; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be decremented. + /// + public string VirtualCurrency; + } + + [Serializable] + public class SubtractUserVirtualCurrencyRequest : PlayFabRequestCommon + { + /// + /// Amount to be subtracted from the user balance of the specified virtual currency. + /// + public int Amount; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// PlayFab unique identifier of the user whose virtual currency balance is to be decreased. + /// + public string PlayFabId; + /// + /// Name of the virtual currency which is to be decremented. + /// + public string VirtualCurrency; + } + + [Serializable] + public class TagModel : PlayFabBaseModel + { + /// + /// Full value of the tag, including namespace + /// + public string TagValue; + } + + public enum TitleActivationStatus + { + None, + ActivatedTitleKey, + PendingSteam, + ActivatedSteam, + RevokedSteam + } + + [Serializable] + public class TitleNewsItem : PlayFabBaseModel + { + /// + /// News item body. + /// + public string Body; + /// + /// Unique identifier of news item. + /// + public string NewsId; + /// + /// Date and time when the news item was posted. + /// + public DateTime Timestamp; + /// + /// Title of the news item. + /// + public string Title; + } + + [Serializable] + public class TreatmentAssignment : PlayFabBaseModel + { + /// + /// List of the experiment variables. + /// + public List Variables; + /// + /// List of the experiment variants. + /// + public List Variants; + } + + [Serializable] + public class TwitchPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Twitch identifier. + /// + public string PlayFabId; + /// + /// Unique Twitch identifier for a user. + /// + public string TwitchId; + } + + [Serializable] + public class UnlinkNintendoServiceAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UnlinkNintendoSwitchDeviceIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Nintendo Switch Device identifier for the user. If not specified, the most recently signed in device ID will be used. + /// + public string NintendoSwitchDeviceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UnlinkNintendoSwitchDeviceIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkPSNAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UnlinkPSNAccountResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkServerCustomIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab identifier. + /// + public string PlayFabId; + /// + /// Unique server custom identifier for this player. + /// + public string ServerCustomId; + } + + [Serializable] + public class UnlinkServerCustomIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkSteamIdRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Steam account. + /// + public string PlayFabId; + } + + [Serializable] + public class UnlinkSteamIdResult : PlayFabResultCommon + { + } + + [Serializable] + public class UnlinkXboxAccountRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Xbox Live identifier. + /// + public string PlayFabId; + } + + [Serializable] + public class UnlinkXboxAccountResult : PlayFabResultCommon + { + } + + /// + /// Specify the container and optionally the catalogVersion for the container to open + /// + [Serializable] + public class UnlockContainerInstanceRequest : PlayFabRequestCommon + { + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses catalog + /// associated with the item instance. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// ItemInstanceId of the container to unlock. + /// + public string ContainerItemInstanceId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this + /// parameter is required. + /// + public string KeyItemInstanceId; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// Specify the type of container to open and optionally the catalogVersion for the container to open + /// + [Serializable] + public class UnlockContainerItemRequest : PlayFabRequestCommon + { + /// + /// Specifies the catalog version that should be used to determine container contents. If unspecified, uses default/primary + /// catalog. + /// + public string CatalogVersion; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Catalog ItemId of the container type to unlock. + /// + public string ContainerItemId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// The items and vc found within the container. These will be added and stacked in your inventory as appropriate. + /// + [Serializable] + public class UnlockContainerItemResult : PlayFabResultCommon + { + /// + /// Items granted to the player as a result of unlocking the container. + /// + public List GrantedItems; + /// + /// Unique instance identifier of the container unlocked. + /// + public string UnlockedItemInstanceId; + /// + /// Unique instance identifier of the key used to unlock the container, if applicable. + /// + public string UnlockedWithItemInstanceId; + /// + /// Virtual currency granted to the player as a result of unlocking the container. + /// + public Dictionary VirtualCurrency; + } + + [Serializable] + public class UpdateAvatarUrlRequest : PlayFabRequestCommon + { + /// + /// URL of the avatar image. If empty, it removes the existing avatar URL. + /// + public string ImageUrl; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// Represents a single update ban request. + /// + [Serializable] + public class UpdateBanRequest : PlayFabBaseModel + { + /// + /// The updated active state for the ban. Null for no change. + /// + public bool? Active; + /// + /// The id of the ban to be updated. + /// + public string BanId; + /// + /// The updated expiration date for the ban. Null for no change. + /// + public DateTime? Expires; + /// + /// The updated IP address for the ban. Null for no change. + /// + public string IPAddress; + /// + /// Whether to make this ban permanent. Set to true to make this ban permanent. This will not modify Active state. + /// + public bool? Permanent; + /// + /// The updated reason for the ban to be updated. Maximum 140 characters. Null for no change. + /// + public string Reason; + /// + /// The updated family type of the user that should be included in the ban. Null for no change. + /// + public UserFamilyType? UserFamilyType; + } + + /// + /// For each ban, only updates the values that are set. Leave any value to null for no change. If a ban could not be found, + /// the rest are still applied. Returns information about applied updates only. + /// + [Serializable] + public class UpdateBansRequest : PlayFabRequestCommon + { + /// + /// List of bans to be updated. Maximum 100. + /// + public List Bans; + } + + [Serializable] + public class UpdateBansResult : PlayFabResultCommon + { + /// + /// Information on the bans that were updated + /// + public List BanData; + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the user. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, while keys + /// with null values will be removed. No other key-value pairs will be changed apart from those specified in the call. + /// + [Serializable] + public class UpdateCharacterDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set. + /// + public UserDataPermission? Permission; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UpdateCharacterDataResult : PlayFabResultCommon + { + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + /// + /// Character statistics are similar to user statistics in that they are numeric values which may only be updated by a + /// server operation, in order to minimize the opportunity for unauthorized changes. In addition to being available for use + /// by the title, the statistics are used for all leaderboard operations in PlayFab. + /// + [Serializable] + public class UpdateCharacterStatisticsRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// Statistics to be updated with the provided values. + /// + public Dictionary CharacterStatistics; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UpdateCharacterStatisticsResult : PlayFabResultCommon + { + } + + /// + /// This operation is additive. Statistics not currently defined will be added, while those already defined will be updated + /// with the given values. All other user statistics will remain unchanged. + /// + [Serializable] + public class UpdatePlayerStatisticsRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Indicates whether the statistics provided should be set, regardless of the aggregation method set on the statistic. + /// Default is false. + /// + public bool? ForceUpdate; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// Statistics to be updated with the provided values + /// + public List Statistics; + } + + [Serializable] + public class UpdatePlayerStatisticsResult : PlayFabResultCommon + { + } + + /// + /// Note that in the case of multiple calls to write to the same shared group data keys, the last write received by the + /// PlayFab service will determine the value available to subsequent read operations. For scenarios requiring coordination + /// of data updates, it is recommended that titles make use of user data with read permission set to public, or a + /// combination of user data and shared group data. + /// + [Serializable] + public class UpdateSharedGroupDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys in this request. + /// + public UserDataPermission? Permission; + /// + /// Unique identifier for the shared group. + /// + public string SharedGroupId; + } + + [Serializable] + public class UpdateSharedGroupDataResult : PlayFabResultCommon + { + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the user. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, while keys + /// with null values will be removed. No other key-value pairs will be changed apart from those specified in the call. + /// + [Serializable] + public class UpdateUserDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Permission to be applied to all user data keys written in this request. Defaults to "private" if not set. + /// + public UserDataPermission? Permission; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UpdateUserDataResult : PlayFabResultCommon + { + /// + /// Indicates the current version of the data that has been set. This is incremented with every set call for that type of + /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. + /// + public uint DataVersion; + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the user. In + /// updating the custom data object, keys which already exist in the object will have their values overwritten, keys with + /// null values will be removed. No other key-value pairs will be changed apart from those specified in the call. + /// + [Serializable] + public class UpdateUserInternalDataRequest : PlayFabRequestCommon + { + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + /// + /// This function performs an additive update of the arbitrary JSON object containing the custom data for the item instance + /// which belongs to the specified user. In updating the custom data object, keys which already exist in the object will + /// have their values overwritten, while keys with null values will be removed. No other key-value pairs will be changed + /// apart from those specified in the call. + /// + [Serializable] + public class UpdateUserInventoryItemDataRequest : PlayFabRequestCommon + { + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may + /// not begin with a '!' character or be null. + /// + public Dictionary Data; + /// + /// Unique PlayFab assigned instance identifier of the item + /// + public string ItemInstanceId; + /// + /// Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language + /// constraints. Use this to delete the keys directly. + /// + public List KeysToRemove; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + } + + [Serializable] + public class UserAccountInfo : PlayFabBaseModel + { + /// + /// User Android device information, if an Android device has been linked + /// + public UserAndroidDeviceInfo AndroidDeviceInfo; + /// + /// Sign in with Apple account information, if an Apple account has been linked + /// + public UserAppleIdInfo AppleAccountInfo; + /// + /// Timestamp indicating when the user account was created + /// + public DateTime Created; + /// + /// Custom ID information, if a custom ID has been assigned + /// + public UserCustomIdInfo CustomIdInfo; + /// + /// User Facebook information, if a Facebook account has been linked + /// + public UserFacebookInfo FacebookInfo; + /// + /// Facebook Instant Games account information, if a Facebook Instant Games account has been linked + /// + public UserFacebookInstantGamesIdInfo FacebookInstantGamesIdInfo; + /// + /// User Gamecenter information, if a Gamecenter account has been linked + /// + public UserGameCenterInfo GameCenterInfo; + /// + /// User Google account information, if a Google account has been linked + /// + public UserGoogleInfo GoogleInfo; + /// + /// User Google Play Games account information, if a Google Play Games account has been linked + /// + public UserGooglePlayGamesInfo GooglePlayGamesInfo; + /// + /// User iOS device information, if an iOS device has been linked + /// + public UserIosDeviceInfo IosDeviceInfo; + /// + /// User Kongregate account information, if a Kongregate account has been linked + /// + public UserKongregateInfo KongregateInfo; + /// + /// Nintendo Switch account information, if a Nintendo Switch account has been linked + /// + public UserNintendoSwitchAccountIdInfo NintendoSwitchAccountInfo; + /// + /// Nintendo Switch device information, if a Nintendo Switch device has been linked + /// + public UserNintendoSwitchDeviceIdInfo NintendoSwitchDeviceIdInfo; + /// + /// OpenID Connect information, if any OpenID Connect accounts have been linked + /// + public List OpenIdInfo; + /// + /// Unique identifier for the user account + /// + public string PlayFabId; + /// + /// Personal information for the user which is considered more sensitive + /// + public UserPrivateAccountInfo PrivateInfo; + /// + /// User PlayStation :tm: Network account information, if a PlayStation :tm: Network account has been linked + /// + public UserPsnInfo PsnInfo; + /// + /// Server Custom ID information, if a server custom ID has been assigned + /// + public UserServerCustomIdInfo ServerCustomIdInfo; + /// + /// User Steam information, if a Steam account has been linked + /// + public UserSteamInfo SteamInfo; + /// + /// Title-specific information for the user account + /// + public UserTitleInfo TitleInfo; + /// + /// User Twitch account information, if a Twitch account has been linked + /// + public UserTwitchInfo TwitchInfo; + /// + /// User account name in the PlayFab service + /// + public string Username; + /// + /// User XBox account information, if a XBox account has been linked + /// + public UserXboxInfo XboxInfo; + } + + [Serializable] + public class UserAndroidDeviceInfo : PlayFabBaseModel + { + /// + /// Android device ID + /// + public string AndroidDeviceId; + } + + [Serializable] + public class UserAppleIdInfo : PlayFabBaseModel + { + /// + /// Apple subject ID + /// + public string AppleSubjectId; + } + + [Serializable] + public class UserCustomIdInfo : PlayFabBaseModel + { + /// + /// Custom ID + /// + public string CustomId; + } + + /// + /// Indicates whether a given data key is private (readable only by the player) or public (readable by all players). When a + /// player makes a GetUserData request about another player, only keys marked Public will be returned. + /// + public enum UserDataPermission + { + Private, + Public + } + + [Serializable] + public class UserDataRecord : PlayFabBaseModel + { + /// + /// Timestamp for when this data was last updated. + /// + public DateTime LastUpdated; + /// + /// Indicates whether this data can be read by all users (public) or only the user (private). This is used for GetUserData + /// requests being made by one player about another player. + /// + public UserDataPermission? Permission; + /// + /// Data stored for the specified user data key. + /// + public string Value; + } + + [Serializable] + public class UserFacebookInfo : PlayFabBaseModel + { + /// + /// Facebook identifier + /// + public string FacebookId; + /// + /// Facebook full name + /// + public string FullName; + } + + [Serializable] + public class UserFacebookInstantGamesIdInfo : PlayFabBaseModel + { + /// + /// Facebook Instant Games ID + /// + public string FacebookInstantGamesId; + } + + public enum UserFamilyType + { + None, + Xbox, + Steam + } + + [Serializable] + public class UserGameCenterInfo : PlayFabBaseModel + { + /// + /// Gamecenter identifier + /// + public string GameCenterId; + } + + [Serializable] + public class UserGoogleInfo : PlayFabBaseModel + { + /// + /// Email address of the Google account + /// + public string GoogleEmail; + /// + /// Gender information of the Google account + /// + public string GoogleGender; + /// + /// Google ID + /// + public string GoogleId; + /// + /// Locale of the Google account + /// + public string GoogleLocale; + /// + /// Name of the Google account user + /// + public string GoogleName; + } + + [Serializable] + public class UserGooglePlayGamesInfo : PlayFabBaseModel + { + /// + /// Avatar image url of the Google Play Games player + /// + public string GooglePlayGamesPlayerAvatarImageUrl; + /// + /// Display name of the Google Play Games player + /// + public string GooglePlayGamesPlayerDisplayName; + /// + /// Google Play Games player ID + /// + public string GooglePlayGamesPlayerId; + } + + [Serializable] + public class UserIosDeviceInfo : PlayFabBaseModel + { + /// + /// iOS device ID + /// + public string IosDeviceId; + } + + [Serializable] + public class UserKongregateInfo : PlayFabBaseModel + { + /// + /// Kongregate ID + /// + public string KongregateId; + /// + /// Kongregate Username + /// + public string KongregateName; + } + + [Serializable] + public class UserNintendoSwitchAccountIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch account subject ID + /// + public string NintendoSwitchAccountSubjectId; + } + + [Serializable] + public class UserNintendoSwitchDeviceIdInfo : PlayFabBaseModel + { + /// + /// Nintendo Switch Device ID + /// + public string NintendoSwitchDeviceId; + } + + [Serializable] + public class UserOpenIdInfo : PlayFabBaseModel + { + /// + /// OpenID Connection ID + /// + public string ConnectionId; + /// + /// OpenID Issuer + /// + public string Issuer; + /// + /// OpenID Subject + /// + public string Subject; + } + + public enum UserOrigination + { + Organic, + Steam, + Google, + Amazon, + Facebook, + Kongregate, + GamersFirst, + Unknown, + IOS, + LoadTest, + Android, + PSN, + GameCenter, + CustomId, + XboxLive, + Parse, + Twitch, + ServerCustomId, + NintendoSwitchDeviceId, + FacebookInstantGamesId, + OpenIdConnect, + Apple, + NintendoSwitchAccount, + GooglePlayGames, + XboxMobileStore, + King + } + + [Serializable] + public class UserPrivateAccountInfo : PlayFabBaseModel + { + /// + /// user email address + /// + public string Email; + } + + [Serializable] + public class UserPsnInfo : PlayFabBaseModel + { + /// + /// PlayStation :tm: Network account ID + /// + public string PsnAccountId; + /// + /// PlayStation :tm: Network online ID + /// + public string PsnOnlineId; + } + + [Serializable] + public class UserServerCustomIdInfo : PlayFabBaseModel + { + /// + /// Custom ID + /// + public string CustomId; + } + + [Serializable] + public class UserSettings : PlayFabBaseModel + { + /// + /// Boolean for whether this player is eligible for gathering device info. + /// + public bool GatherDeviceInfo; + /// + /// Boolean for whether this player should report OnFocus play-time tracking. + /// + public bool GatherFocusInfo; + /// + /// Boolean for whether this player is eligible for ad tracking. + /// + public bool NeedsAttribution; + } + + [Serializable] + public class UserSteamInfo : PlayFabBaseModel + { + /// + /// what stage of game ownership the user is listed as being in, from Steam + /// + public TitleActivationStatus? SteamActivationStatus; + /// + /// the country in which the player resides, from Steam data + /// + public string SteamCountry; + /// + /// currency type set in the user Steam account + /// + public Currency? SteamCurrency; + /// + /// Steam identifier + /// + public string SteamId; + /// + /// Steam display name + /// + public string SteamName; + } + + [Serializable] + public class UserTitleInfo : PlayFabBaseModel + { + /// + /// URL to the player's avatar. + /// + public string AvatarUrl; + /// + /// timestamp indicating when the user was first associated with this game (this can differ significantly from when the user + /// first registered with PlayFab) + /// + public DateTime Created; + /// + /// name of the user, as it is displayed in-game + /// + public string DisplayName; + /// + /// timestamp indicating when the user first signed into this game (this can differ from the Created timestamp, as other + /// events, such as issuing a beta key to the user, can associate the title to the user) + /// + public DateTime? FirstLogin; + /// + /// boolean indicating whether or not the user is currently banned for a title + /// + public bool? isBanned; + /// + /// timestamp for the last user login for this title + /// + public DateTime? LastLogin; + /// + /// source by which the user first joined the game, if known + /// + public UserOrigination? Origination; + /// + /// Title player account entity for this user + /// + public EntityKey TitlePlayerAccount; + } + + [Serializable] + public class UserTwitchInfo : PlayFabBaseModel + { + /// + /// Twitch ID + /// + public string TwitchId; + /// + /// Twitch Username + /// + public string TwitchUserName; + } + + [Serializable] + public class UserXboxInfo : PlayFabBaseModel + { + /// + /// XBox user ID + /// + public string XboxUserId; + /// + /// XBox user sandbox + /// + public string XboxUserSandbox; + } + + [Serializable] + public class ValueToDateModel : PlayFabBaseModel + { + /// + /// ISO 4217 code of the currency used in the purchases + /// + public string Currency; + /// + /// Total value of the purchases in a whole number of 1/100 monetary units. For example, 999 indicates nine dollars and + /// ninety-nine cents when Currency is 'USD') + /// + public uint TotalValue; + /// + /// Total value of the purchases in a string representation of decimal monetary units. For example, '9.99' indicates nine + /// dollars and ninety-nine cents when Currency is 'USD'. + /// + public string TotalValueAsDecimal; + } + + [Serializable] + public class Variable : PlayFabBaseModel + { + /// + /// Name of the variable. + /// + public string Name; + /// + /// Value of the variable. + /// + public string Value; + } + + [Serializable] + public class VirtualCurrencyRechargeTime : PlayFabBaseModel + { + /// + /// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value + /// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen + /// below this value. + /// + public int RechargeMax; + /// + /// Server timestamp in UTC indicating the next time the virtual currency will be incremented. + /// + public DateTime RechargeTime; + /// + /// Time remaining (in seconds) before the next recharge increment of the virtual currency. + /// + public int SecondsToRecharge; + } + + [Serializable] + public class WriteEventResponse : PlayFabResultCommon + { + /// + /// The unique identifier of the event. The values of this identifier consist of ASCII characters and are not constrained to + /// any particular format. + /// + public string EventId; + } + + /// + /// This API is designed to write a multitude of different event types into PlayStream. It supports a flexible JSON schema, + /// which allowsfor arbitrary key-value pairs to describe any character-based event. The created event will be locked to the + /// authenticated title. + /// + [Serializable] + public class WriteServerCharacterEventRequest : PlayFabRequestCommon + { + /// + /// Custom event properties. Each property consists of a name (string) and a value (JSON object). + /// + public Dictionary Body; + /// + /// Unique PlayFab assigned ID for a specific character owned by a user + /// + public string CharacterId; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it + /// commonly follows the subject_verb_object pattern (e.g. player_logged_in). + /// + public string EventName; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The time (in UTC) associated with this event. The value defaults to the current time. + /// + public DateTime? Timestamp; + } + + /// + /// This API is designed to write a multitude of different event types into PlayStream. It supports a flexible JSON schema, + /// which allowsfor arbitrary key-value pairs to describe any player-based event. The created event will be locked to the + /// authenticated title. + /// + [Serializable] + public class WriteServerPlayerEventRequest : PlayFabRequestCommon + { + /// + /// Custom data properties associated with the event. Each property consists of a name (string) and a value (JSON object). + /// + public Dictionary Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it + /// commonly follows the subject_verb_object pattern (e.g. player_logged_in). + /// + public string EventName; + /// + /// Unique PlayFab assigned ID of the user on whom the operation will be performed. + /// + public string PlayFabId; + /// + /// The time (in UTC) associated with this event. The value defaults to the current time. + /// + public DateTime? Timestamp; + } + + /// + /// This API is designed to write a multitude of different event types into PlayStream. It supports a flexible JSON schema, + /// which allowsfor arbitrary key-value pairs to describe any title-based event. The created event will be locked to the + /// authenticated title. + /// + [Serializable] + public class WriteTitleEventRequest : PlayFabRequestCommon + { + /// + /// Custom event properties. Each property consists of a name (string) and a value (JSON object). + /// + public Dictionary Body; + /// + /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + /// + public Dictionary CustomTags; + /// + /// The name of the event, within the namespace scoped to the title. The naming convention is up to the caller, but it + /// commonly follows the subject_verb_object pattern (e.g. player_logged_in). + /// + public string EventName; + /// + /// The time (in UTC) associated with this event. The value defaults to the current time. + /// + public DateTime? Timestamp; + } + + [Serializable] + public class XboxLiveAccountPlayFabIdPair : PlayFabBaseModel + { + /// + /// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Xbox Live identifier. + /// + public string PlayFabId; + /// + /// Unique Xbox Live identifier for a user. + /// + public string XboxLiveAccountId; + } +} +#endif diff --git a/Assets/PlayFabSDK/Server/PlayFabServerModels.cs.meta b/Assets/PlayFabSDK/Server/PlayFabServerModels.cs.meta new file mode 100644 index 00000000..cafb56b4 --- /dev/null +++ b/Assets/PlayFabSDK/Server/PlayFabServerModels.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 85069115b99da8c4688d838452001d89 +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared.meta b/Assets/PlayFabSDK/Shared.meta new file mode 100644 index 00000000..f48d4b6a --- /dev/null +++ b/Assets/PlayFabSDK/Shared.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7f23e4a650becd44fa8fccf00ba8529b +folderAsset: yes +timeCreated: 1468524875 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Editor.meta b/Assets/PlayFabSDK/Shared/Editor.meta new file mode 100644 index 00000000..4bfc2ceb --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 8d731e8907f844532878b81596fe3852 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/PlayFabSDK/Shared/Editor/MakeSharedSettingsObj.cs b/Assets/PlayFabSDK/Shared/Editor/MakeSharedSettingsObj.cs new file mode 100644 index 00000000..75c12db2 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor/MakeSharedSettingsObj.cs @@ -0,0 +1,21 @@ +#if UNITY_2017_1_OR_NEWER +using PlayFab.PfEditor; +using UnityEditor; +using UnityEngine; + +public class MakeScriptableObject +{ + [MenuItem("PlayFab/MakePlayFabSharedSettings")] + public static void MakePlayFabSharedSettings() + { + PlayFabSharedSettings asset = ScriptableObject.CreateInstance(); + + AssetDatabase.CreateAsset(asset, "Assets/PlayFabSdk/Shared/Public/Resources/PlayFabSharedSettings.asset"); // TODO: Path should not be hard coded + AssetDatabase.SaveAssets(); + + EditorUtility.FocusProjectWindow(); + + Selection.activeObject = asset; + } +} +#endif diff --git a/Assets/PlayFabSDK/Shared/Editor/MakeSharedSettingsObj.cs.meta b/Assets/PlayFabSDK/Shared/Editor/MakeSharedSettingsObj.cs.meta new file mode 100644 index 00000000..1d5091f5 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor/MakeSharedSettingsObj.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3e92542860dab28489c3d9cc0baa1ebd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Editor/PlayFabHelp.cs b/Assets/PlayFabSDK/Shared/Editor/PlayFabHelp.cs new file mode 100644 index 00000000..6cf2e91f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor/PlayFabHelp.cs @@ -0,0 +1,38 @@ +using UnityEditor; +using UnityEngine; + +namespace PlayFab.PfEditor +{ + public static class PlayFabHelp + { + [MenuItem("PlayFab/GettingStarted")] + private static void GettingStarted() + { + Application.OpenURL("https://docs.microsoft.com/en-us/gaming/playfab/index#pivot=documentation&panel=quickstarts"); + } + + [MenuItem("PlayFab/Docs")] + private static void Documentation() + { + Application.OpenURL("https://docs.microsoft.com/en-us/gaming/playfab/api-references/"); + } + + [MenuItem("PlayFab/Dashboard")] + private static void Dashboard() + { + Application.OpenURL("https://developer.playfab.com/"); + } + + [MenuItem("PlayFab/Forum")] + private static void Forum() + { + Application.OpenURL("https://community.playfab.com/index.html"); + } + + [MenuItem("PlayFab/Provide Feedback")] + private static void Feedback() + { + Application.OpenURL("https://playfab.com/contact/"); + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Editor/PlayFabHelp.cs.meta b/Assets/PlayFabSDK/Shared/Editor/PlayFabHelp.cs.meta new file mode 100644 index 00000000..b9a59d8f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor/PlayFabHelp.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e51e733dabbc847fa839b19c01bc577c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/PlayFabSDK/Shared/Editor/PlayFabSdkEditor.asmdef b/Assets/PlayFabSDK/Shared/Editor/PlayFabSdkEditor.asmdef new file mode 100644 index 00000000..216c53f7 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor/PlayFabSdkEditor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "PlayFabSDKEditor", + "references": [ + "PlayFab" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [] +} \ No newline at end of file diff --git a/Assets/PlayFabSDK/Shared/Editor/PlayFabSdkEditor.asmdef.meta b/Assets/PlayFabSDK/Shared/Editor/PlayFabSdkEditor.asmdef.meta new file mode 100644 index 00000000..4778f447 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor/PlayFabSdkEditor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8aa8a8085039f0e4ba1c8d6480d45262 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Editor/PlayFablogo.png b/Assets/PlayFabSDK/Shared/Editor/PlayFablogo.png new file mode 100644 index 00000000..8c8e7f16 Binary files /dev/null and b/Assets/PlayFabSDK/Shared/Editor/PlayFablogo.png differ diff --git a/Assets/PlayFabSDK/Shared/Editor/PlayFablogo.png.meta b/Assets/PlayFabSDK/Shared/Editor/PlayFablogo.png.meta new file mode 100644 index 00000000..f490561c --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Editor/PlayFablogo.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: ec8f5065b10fb4f04bebf82a992c442e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 16 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal.meta b/Assets/PlayFabSDK/Shared/Internal.meta new file mode 100644 index 00000000..3590aa8a --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 91910e31dc88043ea918915ee9d665d9 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/PlayFabSDK/Shared/Internal/ISerializer.cs b/Assets/PlayFabSDK/Shared/Internal/ISerializer.cs new file mode 100644 index 00000000..83f1ba6c --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/ISerializer.cs @@ -0,0 +1,108 @@ +using System; +using System.Globalization; +using PlayFab.Internal; + +namespace PlayFab.Json +{ + public class SimpleJsonInstance : ISerializerPlugin + { + /// + /// Most users shouldn't access this + /// JsonWrapper.Serialize, and JsonWrapper.Deserialize will always use it automatically (Unless you deliberately mess with them) + /// Any Serialization of an object in the PlayFab namespace should just use JsonWrapper + /// + public static PlayFabSimpleJsonCuztomization ApiSerializerStrategy = new PlayFabSimpleJsonCuztomization(); + public class PlayFabSimpleJsonCuztomization : PocoJsonSerializerStrategy + { + /// + /// Convert the json value into the destination field/property + /// + public override object DeserializeObject(object value, Type type) + { + var valueStr = value as string; + if (valueStr == null) // For all of our custom conversions, value is a string + return base.DeserializeObject(value, type); + + var underType = Nullable.GetUnderlyingType(type); + if (underType != null) + return DeserializeObject(value, underType); + else if (type.GetTypeInfo().IsEnum) + return Enum.Parse(type, (string)value, true); + else if (type == typeof(DateTime)) + { + DateTime output; + var result = DateTime.TryParseExact(valueStr, PlayFabUtil._defaultDateTimeFormats, CultureInfo.InvariantCulture, PlayFabUtil.DateTimeStyles, out output); + if (result) + return output; + } + else if (type == typeof(DateTimeOffset)) + { + DateTimeOffset output; + var result = DateTimeOffset.TryParseExact(valueStr, PlayFabUtil._defaultDateTimeFormats, CultureInfo.InvariantCulture, PlayFabUtil.DateTimeStyles, out output); + if (result) + return output; + } + else if (type == typeof(TimeSpan)) + { + double seconds; + if (double.TryParse(valueStr, out seconds)) + return TimeSpan.FromSeconds(seconds); + } + return base.DeserializeObject(value, type); + } + + /// + /// Set output to a string that represents the input object + /// + protected override bool TrySerializeKnownTypes(object input, out object output) + { + if (input.GetType().GetTypeInfo().IsEnum) + { + output = input.ToString(); + return true; + } + else if (input is DateTime) + { + output = ((DateTime)input).ToString(PlayFabUtil._defaultDateTimeFormats[PlayFabUtil.DEFAULT_UTC_OUTPUT_INDEX], CultureInfo.InvariantCulture); + return true; + } + else if (input is DateTimeOffset) + { + output = ((DateTimeOffset)input).ToString(PlayFabUtil._defaultDateTimeFormats[PlayFabUtil.DEFAULT_UTC_OUTPUT_INDEX], CultureInfo.InvariantCulture); + return true; + } + else if (input is TimeSpan) + { + output = ((TimeSpan)input).TotalSeconds; + return true; + } + return base.TrySerializeKnownTypes(input, out output); + } + } + + public T DeserializeObject(string json) + { + return PlayFabSimpleJson.DeserializeObject(json, ApiSerializerStrategy); + } + + public T DeserializeObject(string json, object jsonSerializerStrategy) + { + return PlayFabSimpleJson.DeserializeObject(json, (IJsonSerializerStrategy)jsonSerializerStrategy); + } + + public object DeserializeObject(string json) + { + return PlayFabSimpleJson.DeserializeObject(json, typeof(object), ApiSerializerStrategy); + } + + public string SerializeObject(object json) + { + return PlayFabSimpleJson.SerializeObject(json, ApiSerializerStrategy); + } + + public string SerializeObject(object json, object jsonSerializerStrategy) + { + return PlayFabSimpleJson.SerializeObject(json, (IJsonSerializerStrategy)jsonSerializerStrategy); + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/ISerializer.cs.meta b/Assets/PlayFabSDK/Shared/Internal/ISerializer.cs.meta new file mode 100644 index 00000000..285cd843 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/ISerializer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1337f8c156b41834691b131f3b6774f9 +timeCreated: 1462682372 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/Log.cs b/Assets/PlayFabSDK/Shared/Internal/Log.cs new file mode 100644 index 00000000..40767f07 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/Log.cs @@ -0,0 +1,44 @@ +using System; + +namespace PlayFab.Internal +{ + [Obsolete("This logging utility has been deprecated. Use UnityEngine.Debug.Log")] + public static class Log + { + [Obsolete("Debug is deprecated.")] + public static void Debug(string text, params object[] args) + { + if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Debug) != 0) + { + UnityEngine.Debug.Log(PlayFabUtil.timeStamp + " DEBUG: " + PlayFabUtil.Format(text, args)); + } + } + + [Obsolete("Info is deprecated.")] + public static void Info(string text, params object[] args) + { + if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Info) != 0) + { + UnityEngine.Debug.Log(PlayFabUtil.timeStamp + " INFO: " + PlayFabUtil.Format(text, args)); + } + } + + [Obsolete("Warning is deprecated.")] + public static void Warning(string text, params object[] args) + { + if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Warning) != 0) + { + UnityEngine.Debug.LogWarning(PlayFabUtil.timeStamp + " WARNING: " + PlayFabUtil.Format(text, args)); + } + } + + [Obsolete("Error is deprecated.")] + public static void Error(string text, params object[] args) + { + if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Error) != 0) + { + UnityEngine.Debug.LogError(PlayFabUtil.timeStamp + " ERROR: " + PlayFabUtil.Format(text, args)); + } + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/Log.cs.meta b/Assets/PlayFabSDK/Shared/Internal/Log.cs.meta new file mode 100644 index 00000000..ebf6395e --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/Log.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5b55790eeab1b3c41a4f1381cbea1213 +timeCreated: 1462682372 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabErrors.cs b/Assets/PlayFabSDK/Shared/Internal/PlayFabErrors.cs new file mode 100644 index 00000000..3c9d6008 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabErrors.cs @@ -0,0 +1,948 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace PlayFab +{ + /// + /// Error codes returned by PlayFabAPIs + /// + public enum PlayFabErrorCode + { + Unknown = 1, + ConnectionError = 2, + JsonParseError = 3, + Success = 0, + UnkownError = 500, + InvalidParams = 1000, + AccountNotFound = 1001, + AccountBanned = 1002, + InvalidUsernameOrPassword = 1003, + InvalidTitleId = 1004, + InvalidEmailAddress = 1005, + EmailAddressNotAvailable = 1006, + InvalidUsername = 1007, + InvalidPassword = 1008, + UsernameNotAvailable = 1009, + InvalidSteamTicket = 1010, + AccountAlreadyLinked = 1011, + LinkedAccountAlreadyClaimed = 1012, + InvalidFacebookToken = 1013, + AccountNotLinked = 1014, + FailedByPaymentProvider = 1015, + CouponCodeNotFound = 1016, + InvalidContainerItem = 1017, + ContainerNotOwned = 1018, + KeyNotOwned = 1019, + InvalidItemIdInTable = 1020, + InvalidReceipt = 1021, + ReceiptAlreadyUsed = 1022, + ReceiptCancelled = 1023, + GameNotFound = 1024, + GameModeNotFound = 1025, + InvalidGoogleToken = 1026, + UserIsNotPartOfDeveloper = 1027, + InvalidTitleForDeveloper = 1028, + TitleNameConflicts = 1029, + UserisNotValid = 1030, + ValueAlreadyExists = 1031, + BuildNotFound = 1032, + PlayerNotInGame = 1033, + InvalidTicket = 1034, + InvalidDeveloper = 1035, + InvalidOrderInfo = 1036, + RegistrationIncomplete = 1037, + InvalidPlatform = 1038, + UnknownError = 1039, + SteamApplicationNotOwned = 1040, + WrongSteamAccount = 1041, + TitleNotActivated = 1042, + RegistrationSessionNotFound = 1043, + NoSuchMod = 1044, + FileNotFound = 1045, + DuplicateEmail = 1046, + ItemNotFound = 1047, + ItemNotOwned = 1048, + ItemNotRecycleable = 1049, + ItemNotAffordable = 1050, + InvalidVirtualCurrency = 1051, + WrongVirtualCurrency = 1052, + WrongPrice = 1053, + NonPositiveValue = 1054, + InvalidRegion = 1055, + RegionAtCapacity = 1056, + ServerFailedToStart = 1057, + NameNotAvailable = 1058, + InsufficientFunds = 1059, + InvalidDeviceID = 1060, + InvalidPushNotificationToken = 1061, + NoRemainingUses = 1062, + InvalidPaymentProvider = 1063, + PurchaseInitializationFailure = 1064, + DuplicateUsername = 1065, + InvalidBuyerInfo = 1066, + NoGameModeParamsSet = 1067, + BodyTooLarge = 1068, + ReservedWordInBody = 1069, + InvalidTypeInBody = 1070, + InvalidRequest = 1071, + ReservedEventName = 1072, + InvalidUserStatistics = 1073, + NotAuthenticated = 1074, + StreamAlreadyExists = 1075, + ErrorCreatingStream = 1076, + StreamNotFound = 1077, + InvalidAccount = 1078, + PurchaseDoesNotExist = 1080, + InvalidPurchaseTransactionStatus = 1081, + APINotEnabledForGameClientAccess = 1082, + NoPushNotificationARNForTitle = 1083, + BuildAlreadyExists = 1084, + BuildPackageDoesNotExist = 1085, + CustomAnalyticsEventsNotEnabledForTitle = 1087, + InvalidSharedGroupId = 1088, + NotAuthorized = 1089, + MissingTitleGoogleProperties = 1090, + InvalidItemProperties = 1091, + InvalidPSNAuthCode = 1092, + InvalidItemId = 1093, + PushNotEnabledForAccount = 1094, + PushServiceError = 1095, + ReceiptDoesNotContainInAppItems = 1096, + ReceiptContainsMultipleInAppItems = 1097, + InvalidBundleID = 1098, + JavascriptException = 1099, + InvalidSessionTicket = 1100, + UnableToConnectToDatabase = 1101, + InternalServerError = 1110, + InvalidReportDate = 1111, + ReportNotAvailable = 1112, + DatabaseThroughputExceeded = 1113, + InvalidGameTicket = 1115, + ExpiredGameTicket = 1116, + GameTicketDoesNotMatchLobby = 1117, + LinkedDeviceAlreadyClaimed = 1118, + DeviceAlreadyLinked = 1119, + DeviceNotLinked = 1120, + PartialFailure = 1121, + PublisherNotSet = 1122, + ServiceUnavailable = 1123, + VersionNotFound = 1124, + RevisionNotFound = 1125, + InvalidPublisherId = 1126, + DownstreamServiceUnavailable = 1127, + APINotIncludedInTitleUsageTier = 1128, + DAULimitExceeded = 1129, + APIRequestLimitExceeded = 1130, + InvalidAPIEndpoint = 1131, + BuildNotAvailable = 1132, + ConcurrentEditError = 1133, + ContentNotFound = 1134, + CharacterNotFound = 1135, + CloudScriptNotFound = 1136, + ContentQuotaExceeded = 1137, + InvalidCharacterStatistics = 1138, + PhotonNotEnabledForTitle = 1139, + PhotonApplicationNotFound = 1140, + PhotonApplicationNotAssociatedWithTitle = 1141, + InvalidEmailOrPassword = 1142, + FacebookAPIError = 1143, + InvalidContentType = 1144, + KeyLengthExceeded = 1145, + DataLengthExceeded = 1146, + TooManyKeys = 1147, + FreeTierCannotHaveVirtualCurrency = 1148, + MissingAmazonSharedKey = 1149, + AmazonValidationError = 1150, + InvalidPSNIssuerId = 1151, + PSNInaccessible = 1152, + ExpiredAuthToken = 1153, + FailedToGetEntitlements = 1154, + FailedToConsumeEntitlement = 1155, + TradeAcceptingUserNotAllowed = 1156, + TradeInventoryItemIsAssignedToCharacter = 1157, + TradeInventoryItemIsBundle = 1158, + TradeStatusNotValidForCancelling = 1159, + TradeStatusNotValidForAccepting = 1160, + TradeDoesNotExist = 1161, + TradeCancelled = 1162, + TradeAlreadyFilled = 1163, + TradeWaitForStatusTimeout = 1164, + TradeInventoryItemExpired = 1165, + TradeMissingOfferedAndAcceptedItems = 1166, + TradeAcceptedItemIsBundle = 1167, + TradeAcceptedItemIsStackable = 1168, + TradeInventoryItemInvalidStatus = 1169, + TradeAcceptedCatalogItemInvalid = 1170, + TradeAllowedUsersInvalid = 1171, + TradeInventoryItemDoesNotExist = 1172, + TradeInventoryItemIsConsumed = 1173, + TradeInventoryItemIsStackable = 1174, + TradeAcceptedItemsMismatch = 1175, + InvalidKongregateToken = 1176, + FeatureNotConfiguredForTitle = 1177, + NoMatchingCatalogItemForReceipt = 1178, + InvalidCurrencyCode = 1179, + NoRealMoneyPriceForCatalogItem = 1180, + TradeInventoryItemIsNotTradable = 1181, + TradeAcceptedCatalogItemIsNotTradable = 1182, + UsersAlreadyFriends = 1183, + LinkedIdentifierAlreadyClaimed = 1184, + CustomIdNotLinked = 1185, + TotalDataSizeExceeded = 1186, + DeleteKeyConflict = 1187, + InvalidXboxLiveToken = 1188, + ExpiredXboxLiveToken = 1189, + ResettableStatisticVersionRequired = 1190, + NotAuthorizedByTitle = 1191, + NoPartnerEnabled = 1192, + InvalidPartnerResponse = 1193, + APINotEnabledForGameServerAccess = 1194, + StatisticNotFound = 1195, + StatisticNameConflict = 1196, + StatisticVersionClosedForWrites = 1197, + StatisticVersionInvalid = 1198, + APIClientRequestRateLimitExceeded = 1199, + InvalidJSONContent = 1200, + InvalidDropTable = 1201, + StatisticVersionAlreadyIncrementedForScheduledInterval = 1202, + StatisticCountLimitExceeded = 1203, + StatisticVersionIncrementRateExceeded = 1204, + ContainerKeyInvalid = 1205, + CloudScriptExecutionTimeLimitExceeded = 1206, + NoWritePermissionsForEvent = 1207, + CloudScriptFunctionArgumentSizeExceeded = 1208, + CloudScriptAPIRequestCountExceeded = 1209, + CloudScriptAPIRequestError = 1210, + CloudScriptHTTPRequestError = 1211, + InsufficientGuildRole = 1212, + GuildNotFound = 1213, + OverLimit = 1214, + EventNotFound = 1215, + InvalidEventField = 1216, + InvalidEventName = 1217, + CatalogNotConfigured = 1218, + OperationNotSupportedForPlatform = 1219, + SegmentNotFound = 1220, + StoreNotFound = 1221, + InvalidStatisticName = 1222, + TitleNotQualifiedForLimit = 1223, + InvalidServiceLimitLevel = 1224, + ServiceLimitLevelInTransition = 1225, + CouponAlreadyRedeemed = 1226, + GameServerBuildSizeLimitExceeded = 1227, + GameServerBuildCountLimitExceeded = 1228, + VirtualCurrencyCountLimitExceeded = 1229, + VirtualCurrencyCodeExists = 1230, + TitleNewsItemCountLimitExceeded = 1231, + InvalidTwitchToken = 1232, + TwitchResponseError = 1233, + ProfaneDisplayName = 1234, + UserAlreadyAdded = 1235, + InvalidVirtualCurrencyCode = 1236, + VirtualCurrencyCannotBeDeleted = 1237, + IdentifierAlreadyClaimed = 1238, + IdentifierNotLinked = 1239, + InvalidContinuationToken = 1240, + ExpiredContinuationToken = 1241, + InvalidSegment = 1242, + InvalidSessionId = 1243, + SessionLogNotFound = 1244, + InvalidSearchTerm = 1245, + TwoFactorAuthenticationTokenRequired = 1246, + GameServerHostCountLimitExceeded = 1247, + PlayerTagCountLimitExceeded = 1248, + RequestAlreadyRunning = 1249, + ActionGroupNotFound = 1250, + MaximumSegmentBulkActionJobsRunning = 1251, + NoActionsOnPlayersInSegmentJob = 1252, + DuplicateStatisticName = 1253, + ScheduledTaskNameConflict = 1254, + ScheduledTaskCreateConflict = 1255, + InvalidScheduledTaskName = 1256, + InvalidTaskSchedule = 1257, + SteamNotEnabledForTitle = 1258, + LimitNotAnUpgradeOption = 1259, + NoSecretKeyEnabledForCloudScript = 1260, + TaskNotFound = 1261, + TaskInstanceNotFound = 1262, + InvalidIdentityProviderId = 1263, + MisconfiguredIdentityProvider = 1264, + InvalidScheduledTaskType = 1265, + BillingInformationRequired = 1266, + LimitedEditionItemUnavailable = 1267, + InvalidAdPlacementAndReward = 1268, + AllAdPlacementViewsAlreadyConsumed = 1269, + GoogleOAuthNotConfiguredForTitle = 1270, + GoogleOAuthError = 1271, + UserNotFriend = 1272, + InvalidSignature = 1273, + InvalidPublicKey = 1274, + GoogleOAuthNoIdTokenIncludedInResponse = 1275, + StatisticUpdateInProgress = 1276, + LeaderboardVersionNotAvailable = 1277, + StatisticAlreadyHasPrizeTable = 1279, + PrizeTableHasOverlappingRanks = 1280, + PrizeTableHasMissingRanks = 1281, + PrizeTableRankStartsAtZero = 1282, + InvalidStatistic = 1283, + ExpressionParseFailure = 1284, + ExpressionInvokeFailure = 1285, + ExpressionTooLong = 1286, + DataUpdateRateExceeded = 1287, + RestrictedEmailDomain = 1288, + EncryptionKeyDisabled = 1289, + EncryptionKeyMissing = 1290, + EncryptionKeyBroken = 1291, + NoSharedSecretKeyConfigured = 1292, + SecretKeyNotFound = 1293, + PlayerSecretAlreadyConfigured = 1294, + APIRequestsDisabledForTitle = 1295, + InvalidSharedSecretKey = 1296, + PrizeTableHasNoRanks = 1297, + ProfileDoesNotExist = 1298, + ContentS3OriginBucketNotConfigured = 1299, + InvalidEnvironmentForReceipt = 1300, + EncryptedRequestNotAllowed = 1301, + SignedRequestNotAllowed = 1302, + RequestViewConstraintParamsNotAllowed = 1303, + BadPartnerConfiguration = 1304, + XboxBPCertificateFailure = 1305, + XboxXASSExchangeFailure = 1306, + InvalidEntityId = 1307, + StatisticValueAggregationOverflow = 1308, + EmailMessageFromAddressIsMissing = 1309, + EmailMessageToAddressIsMissing = 1310, + SmtpServerAuthenticationError = 1311, + SmtpServerLimitExceeded = 1312, + SmtpServerInsufficientStorage = 1313, + SmtpServerCommunicationError = 1314, + SmtpServerGeneralFailure = 1315, + EmailClientTimeout = 1316, + EmailClientCanceledTask = 1317, + EmailTemplateMissing = 1318, + InvalidHostForTitleId = 1319, + EmailConfirmationTokenDoesNotExist = 1320, + EmailConfirmationTokenExpired = 1321, + AccountDeleted = 1322, + PlayerSecretNotConfigured = 1323, + InvalidSignatureTime = 1324, + NoContactEmailAddressFound = 1325, + InvalidAuthToken = 1326, + AuthTokenDoesNotExist = 1327, + AuthTokenExpired = 1328, + AuthTokenAlreadyUsedToResetPassword = 1329, + MembershipNameTooLong = 1330, + MembershipNotFound = 1331, + GoogleServiceAccountInvalid = 1332, + GoogleServiceAccountParseFailure = 1333, + EntityTokenMissing = 1334, + EntityTokenInvalid = 1335, + EntityTokenExpired = 1336, + EntityTokenRevoked = 1337, + InvalidProductForSubscription = 1338, + XboxInaccessible = 1339, + SubscriptionAlreadyTaken = 1340, + SmtpAddonNotEnabled = 1341, + APIConcurrentRequestLimitExceeded = 1342, + XboxRejectedXSTSExchangeRequest = 1343, + VariableNotDefined = 1344, + TemplateVersionNotDefined = 1345, + FileTooLarge = 1346, + TitleDeleted = 1347, + TitleContainsUserAccounts = 1348, + TitleDeletionPlayerCleanupFailure = 1349, + EntityFileOperationPending = 1350, + NoEntityFileOperationPending = 1351, + EntityProfileVersionMismatch = 1352, + TemplateVersionTooOld = 1353, + MembershipDefinitionInUse = 1354, + PaymentPageNotConfigured = 1355, + FailedLoginAttemptRateLimitExceeded = 1356, + EntityBlockedByGroup = 1357, + RoleDoesNotExist = 1358, + EntityIsAlreadyMember = 1359, + DuplicateRoleId = 1360, + GroupInvitationNotFound = 1361, + GroupApplicationNotFound = 1362, + OutstandingInvitationAcceptedInstead = 1363, + OutstandingApplicationAcceptedInstead = 1364, + RoleIsGroupDefaultMember = 1365, + RoleIsGroupAdmin = 1366, + RoleNameNotAvailable = 1367, + GroupNameNotAvailable = 1368, + EmailReportAlreadySent = 1369, + EmailReportRecipientBlacklisted = 1370, + EventNamespaceNotAllowed = 1371, + EventEntityNotAllowed = 1372, + InvalidEntityType = 1373, + NullTokenResultFromAad = 1374, + InvalidTokenResultFromAad = 1375, + NoValidCertificateForAad = 1376, + InvalidCertificateForAad = 1377, + DuplicateDropTableId = 1378, + MultiplayerServerError = 1379, + MultiplayerServerTooManyRequests = 1380, + MultiplayerServerNoContent = 1381, + MultiplayerServerBadRequest = 1382, + MultiplayerServerUnauthorized = 1383, + MultiplayerServerForbidden = 1384, + MultiplayerServerNotFound = 1385, + MultiplayerServerConflict = 1386, + MultiplayerServerInternalServerError = 1387, + MultiplayerServerUnavailable = 1388, + ExplicitContentDetected = 1389, + PIIContentDetected = 1390, + InvalidScheduledTaskParameter = 1391, + PerEntityEventRateLimitExceeded = 1392, + TitleDefaultLanguageNotSet = 1393, + EmailTemplateMissingDefaultVersion = 1394, + FacebookInstantGamesIdNotLinked = 1395, + InvalidFacebookInstantGamesSignature = 1396, + FacebookInstantGamesAuthNotConfiguredForTitle = 1397, + EntityProfileConstraintValidationFailed = 1398, + TelemetryIngestionKeyPending = 1399, + TelemetryIngestionKeyNotFound = 1400, + StatisticChildNameInvalid = 1402, + DataIntegrityError = 1403, + VirtualCurrencyCannotBeSetToOlderVersion = 1404, + VirtualCurrencyMustBeWithinIntegerRange = 1405, + EmailTemplateInvalidSyntax = 1406, + EmailTemplateMissingCallback = 1407, + PushNotificationTemplateInvalidPayload = 1408, + InvalidLocalizedPushNotificationLanguage = 1409, + MissingLocalizedPushNotificationMessage = 1410, + PushNotificationTemplateMissingPlatformPayload = 1411, + PushNotificationTemplatePayloadContainsInvalidJson = 1412, + PushNotificationTemplateContainsInvalidIosPayload = 1413, + PushNotificationTemplateContainsInvalidAndroidPayload = 1414, + PushNotificationTemplateIosPayloadMissingNotificationBody = 1415, + PushNotificationTemplateAndroidPayloadMissingNotificationBody = 1416, + PushNotificationTemplateNotFound = 1417, + PushNotificationTemplateMissingDefaultVersion = 1418, + PushNotificationTemplateInvalidSyntax = 1419, + PushNotificationTemplateNoCustomPayloadForV1 = 1420, + NoLeaderboardForStatistic = 1421, + TitleNewsMissingDefaultLanguage = 1422, + TitleNewsNotFound = 1423, + TitleNewsDuplicateLanguage = 1424, + TitleNewsMissingTitleOrBody = 1425, + TitleNewsInvalidLanguage = 1426, + EmailRecipientBlacklisted = 1427, + InvalidGameCenterAuthRequest = 1428, + GameCenterAuthenticationFailed = 1429, + CannotEnablePartiesForTitle = 1430, + PartyError = 1431, + PartyRequests = 1432, + PartyNoContent = 1433, + PartyBadRequest = 1434, + PartyUnauthorized = 1435, + PartyForbidden = 1436, + PartyNotFound = 1437, + PartyConflict = 1438, + PartyInternalServerError = 1439, + PartyUnavailable = 1440, + PartyTooManyRequests = 1441, + PushNotificationTemplateMissingName = 1442, + CannotEnableMultiplayerServersForTitle = 1443, + WriteAttemptedDuringExport = 1444, + MultiplayerServerTitleQuotaCoresExceeded = 1445, + AutomationRuleNotFound = 1446, + EntityAPIKeyLimitExceeded = 1447, + EntityAPIKeyNotFound = 1448, + EntityAPIKeyOrSecretInvalid = 1449, + EconomyServiceUnavailable = 1450, + EconomyServiceInternalError = 1451, + QueryRateLimitExceeded = 1452, + EntityAPIKeyCreationDisabledForEntity = 1453, + ForbiddenByEntityPolicy = 1454, + UpdateInventoryRateLimitExceeded = 1455, + StudioCreationRateLimited = 1456, + StudioCreationInProgress = 1457, + DuplicateStudioName = 1458, + StudioNotFound = 1459, + StudioDeleted = 1460, + StudioDeactivated = 1461, + StudioActivated = 1462, + TitleCreationRateLimited = 1463, + TitleCreationInProgress = 1464, + DuplicateTitleName = 1465, + TitleActivationRateLimited = 1466, + TitleActivationInProgress = 1467, + TitleDeactivated = 1468, + TitleActivated = 1469, + CloudScriptAzureFunctionsExecutionTimeLimitExceeded = 1470, + CloudScriptAzureFunctionsArgumentSizeExceeded = 1471, + CloudScriptAzureFunctionsReturnSizeExceeded = 1472, + CloudScriptAzureFunctionsHTTPRequestError = 1473, + VirtualCurrencyBetaGetError = 1474, + VirtualCurrencyBetaCreateError = 1475, + VirtualCurrencyBetaInitialDepositSaveError = 1476, + VirtualCurrencyBetaSaveError = 1477, + VirtualCurrencyBetaDeleteError = 1478, + VirtualCurrencyBetaRestoreError = 1479, + VirtualCurrencyBetaSaveConflict = 1480, + VirtualCurrencyBetaUpdateError = 1481, + InsightsManagementDatabaseNotFound = 1482, + InsightsManagementOperationNotFound = 1483, + InsightsManagementErrorPendingOperationExists = 1484, + InsightsManagementSetPerformanceLevelInvalidParameter = 1485, + InsightsManagementSetStorageRetentionInvalidParameter = 1486, + InsightsManagementGetStorageUsageInvalidParameter = 1487, + InsightsManagementGetOperationStatusInvalidParameter = 1488, + DuplicatePurchaseTransactionId = 1489, + EvaluationModePlayerCountExceeded = 1490, + GetPlayersInSegmentRateLimitExceeded = 1491, + CloudScriptFunctionNameSizeExceeded = 1492, + PaidInsightsFeaturesNotEnabled = 1493, + CloudScriptAzureFunctionsQueueRequestError = 1494, + EvaluationModeTitleCountExceeded = 1495, + InsightsManagementTitleNotInFlight = 1496, + LimitNotFound = 1497, + LimitNotAvailableViaAPI = 1498, + InsightsManagementSetStorageRetentionBelowMinimum = 1499, + InsightsManagementSetStorageRetentionAboveMaximum = 1500, + AppleNotEnabledForTitle = 1501, + InsightsManagementNewActiveEventExportLimitInvalid = 1502, + InsightsManagementSetPerformanceRateLimited = 1503, + PartyRequestsThrottledFromRateLimiter = 1504, + XboxServiceTooManyRequests = 1505, + NintendoSwitchNotEnabledForTitle = 1506, + RequestMultiplayerServersThrottledFromRateLimiter = 1507, + TitleDataOverrideNotFound = 1508, + DuplicateKeys = 1509, + WasNotCreatedWithCloudRoot = 1510, + LegacyMultiplayerServersDeprecated = 1511, + VirtualCurrencyCurrentlyUnavailable = 1512, + SteamUserNotFound = 1513, + ElasticSearchOperationFailed = 1514, + NotImplemented = 1515, + PublisherNotFound = 1516, + PublisherDeleted = 1517, + ApiDisabledForMigration = 1518, + ResourceNameUpdateNotAllowed = 1519, + ApiNotEnabledForTitle = 1520, + DuplicateTitleNameForPublisher = 1521, + AzureTitleCreationInProgress = 1522, + TitleConstraintsPublisherDeletion = 1524, + InvalidPlayerAccountPoolId = 1525, + PlayerAccountPoolNotFound = 1526, + PlayerAccountPoolDeleted = 1527, + TitleCleanupInProgress = 1528, + AzureResourceConcurrentOperationInProgress = 1529, + TitlePublisherUpdateNotAllowed = 1530, + AzureResourceManagerNotSupportedInStamp = 1531, + ApiNotIncludedInAzurePlayFabFeatureSet = 1532, + GoogleServiceAccountFailedAuth = 1533, + GoogleAPIServiceUnavailable = 1534, + GoogleAPIServiceUnknownError = 1535, + NoValidIdentityForAad = 1536, + PlayerIdentityLinkNotFound = 1537, + PhotonApplicationIdAlreadyInUse = 1538, + CloudScriptUnableToDeleteProductionRevision = 1539, + CustomIdNotFound = 1540, + AutomationInvalidInput = 1541, + AutomationInvalidRuleName = 1542, + AutomationRuleAlreadyExists = 1543, + AutomationRuleLimitExceeded = 1544, + InvalidGooglePlayGamesServerAuthCode = 1545, + PlayStreamConnectionFailed = 1547, + InvalidEventContents = 1548, + InsightsV1Deprecated = 1549, + AnalysisSubscriptionNotFound = 1550, + AnalysisSubscriptionFailed = 1551, + AnalysisSubscriptionFoundAlready = 1552, + AnalysisSubscriptionManagementInvalidInput = 1553, + InvalidGameCenterId = 1554, + InvalidNintendoSwitchAccountId = 1555, + EntityAPIKeysNotSupported = 1556, + IpAddressBanned = 1557, + EntityLineageBanned = 1558, + NamespaceMismatch = 1559, + InvalidServiceConfiguration = 1560, + InvalidNamespaceMismatch = 1561, + LeaderboardColumnLengthMismatch = 1562, + InvalidStatisticScore = 1563, + LeaderboardColumnsNotSpecified = 1564, + LeaderboardMaxSizeTooLarge = 1565, + InvalidAttributeStatisticsSpecified = 1566, + LeaderboardNotFound = 1567, + TokenSigningKeyNotFound = 1568, + LeaderboardNameConflict = 1569, + LinkedStatisticColumnMismatch = 1570, + NoLinkedStatisticToLeaderboard = 1571, + StatDefinitionAlreadyLinkedToLeaderboard = 1572, + LinkingStatsNotAllowedForEntityType = 1573, + LeaderboardCountLimitExceeded = 1574, + LeaderboardSizeLimitExceeded = 1575, + LeaderboardDefinitionModificationNotAllowedWhileLinked = 1576, + StatisticDefinitionModificationNotAllowedWhileLinked = 1577, + LeaderboardUpdateNotAllowedWhileLinked = 1578, + CloudScriptAzureFunctionsEventHubRequestError = 1579, + ExternalEntityNotAllowedForTier = 1580, + InvalidBaseTimeForInterval = 1581, + EntityTypeMismatchWithStatDefinition = 1582, + SpecifiedVersionLeaderboardNotFound = 1583, + LeaderboardColumnLengthMismatchWithStatDefinition = 1584, + DuplicateColumnNameFound = 1585, + LinkedStatisticColumnNotFound = 1586, + LinkedStatisticColumnRequired = 1587, + MultipleLinkedStatisticsNotAllowed = 1588, + DuplicateLinkedStatisticColumnNameFound = 1589, + AggregationTypeNotAllowedForMultiColumnStatistic = 1590, + MaxQueryableVersionsValueNotAllowedForTier = 1591, + StatisticDefinitionHasNullOrEmptyVersionConfiguration = 1592, + StatisticColumnLengthMismatch = 1593, + MatchmakingEntityInvalid = 2001, + MatchmakingPlayerAttributesInvalid = 2002, + MatchmakingQueueNotFound = 2016, + MatchmakingMatchNotFound = 2017, + MatchmakingTicketNotFound = 2018, + MatchmakingAlreadyJoinedTicket = 2028, + MatchmakingTicketAlreadyCompleted = 2029, + MatchmakingQueueConfigInvalid = 2031, + MatchmakingMemberProfileInvalid = 2032, + NintendoSwitchDeviceIdNotLinked = 2034, + MatchmakingNotEnabled = 2035, + MatchmakingPlayerAttributesTooLarge = 2043, + MatchmakingNumberOfPlayersInTicketTooLarge = 2044, + MatchmakingAttributeInvalid = 2046, + MatchmakingPlayerHasNotJoinedTicket = 2053, + MatchmakingRateLimitExceeded = 2054, + MatchmakingTicketMembershipLimitExceeded = 2055, + MatchmakingUnauthorized = 2056, + MatchmakingQueueLimitExceeded = 2057, + MatchmakingRequestTypeMismatch = 2058, + MatchmakingBadRequest = 2059, + PubSubFeatureNotEnabledForTitle = 2500, + PubSubTooManyRequests = 2501, + PubSubConnectionNotFoundForEntity = 2502, + PubSubConnectionHandleInvalid = 2503, + PubSubSubscriptionLimitExceeded = 2504, + TitleConfigNotFound = 3001, + TitleConfigUpdateConflict = 3002, + TitleConfigSerializationError = 3003, + CatalogApiNotImplemented = 4000, + CatalogEntityInvalid = 4001, + CatalogTitleIdMissing = 4002, + CatalogPlayerIdMissing = 4003, + CatalogClientIdentityInvalid = 4004, + CatalogOneOrMoreFilesInvalid = 4005, + CatalogItemMetadataInvalid = 4006, + CatalogItemIdInvalid = 4007, + CatalogSearchParameterInvalid = 4008, + CatalogFeatureDisabled = 4009, + CatalogConfigInvalid = 4010, + CatalogItemTypeInvalid = 4012, + CatalogBadRequest = 4013, + CatalogTooManyRequests = 4014, + InvalidCatalogItemConfiguration = 4015, + ExportInvalidStatusUpdate = 5000, + ExportInvalidPrefix = 5001, + ExportBlobContainerDoesNotExist = 5002, + ExportNotFound = 5004, + ExportCouldNotUpdate = 5005, + ExportInvalidStorageType = 5006, + ExportAmazonBucketDoesNotExist = 5007, + ExportInvalidBlobStorage = 5008, + ExportKustoException = 5009, + ExportKustoConnectionFailed = 5012, + ExportUnknownError = 5013, + ExportCantEditPendingExport = 5014, + ExportLimitExports = 5015, + ExportLimitEvents = 5016, + ExportInvalidPartitionStatusModification = 5017, + ExportCouldNotCreate = 5018, + ExportNoBackingDatabaseFound = 5019, + ExportCouldNotDelete = 5020, + ExportCannotDetermineEventQuery = 5021, + ExportInvalidQuerySchemaModification = 5022, + ExportQuerySchemaMissingRequiredColumns = 5023, + ExportCannotParseQuery = 5024, + ExportControlCommandsNotAllowed = 5025, + ExportQueryMissingTableReference = 5026, + ExportInsightsV1Deprecated = 5027, + ExplorerBasicInvalidQueryName = 5100, + ExplorerBasicInvalidQueryDescription = 5101, + ExplorerBasicInvalidQueryConditions = 5102, + ExplorerBasicInvalidQueryStartDate = 5103, + ExplorerBasicInvalidQueryEndDate = 5104, + ExplorerBasicInvalidQueryGroupBy = 5105, + ExplorerBasicInvalidQueryAggregateType = 5106, + ExplorerBasicInvalidQueryAggregateProperty = 5107, + ExplorerBasicLoadQueriesError = 5108, + ExplorerBasicLoadQueryError = 5109, + ExplorerBasicCreateQueryError = 5110, + ExplorerBasicDeleteQueryError = 5111, + ExplorerBasicUpdateQueryError = 5112, + ExplorerBasicSavedQueriesLimit = 5113, + ExplorerBasicSavedQueryNotFound = 5114, + TenantShardMapperShardNotFound = 5500, + TitleNotEnabledForParty = 6000, + PartyVersionNotFound = 6001, + MultiplayerServerBuildReferencedByMatchmakingQueue = 6002, + MultiplayerServerBuildReferencedByBuildAlias = 6003, + MultiplayerServerBuildAliasReferencedByMatchmakingQueue = 6004, + PartySerializationError = 6005, + ExperimentationExperimentStopped = 7000, + ExperimentationExperimentRunning = 7001, + ExperimentationExperimentNotFound = 7002, + ExperimentationExperimentNeverStarted = 7003, + ExperimentationExperimentDeleted = 7004, + ExperimentationClientTimeout = 7005, + ExperimentationInvalidVariantConfiguration = 7006, + ExperimentationInvalidVariableConfiguration = 7007, + ExperimentInvalidId = 7008, + ExperimentationNoScorecard = 7009, + ExperimentationTreatmentAssignmentFailed = 7010, + ExperimentationTreatmentAssignmentDisabled = 7011, + ExperimentationInvalidDuration = 7012, + ExperimentationMaxExperimentsReached = 7013, + ExperimentationExperimentSchedulingInProgress = 7014, + ExperimentationInvalidEndDate = 7015, + ExperimentationInvalidStartDate = 7016, + ExperimentationMaxDurationExceeded = 7017, + ExperimentationExclusionGroupNotFound = 7018, + ExperimentationExclusionGroupInsufficientCapacity = 7019, + ExperimentationExclusionGroupCannotDelete = 7020, + ExperimentationExclusionGroupInvalidTrafficAllocation = 7021, + ExperimentationExclusionGroupInvalidName = 7022, + MaxActionDepthExceeded = 8000, + TitleNotOnUpdatedPricingPlan = 9000, + SegmentManagementTitleNotInFlight = 10000, + SegmentManagementNoExpressionTree = 10001, + SegmentManagementTriggerActionCountOverLimit = 10002, + SegmentManagementSegmentCountOverLimit = 10003, + SegmentManagementInvalidSegmentId = 10004, + SegmentManagementInvalidInput = 10005, + SegmentManagementInvalidSegmentName = 10006, + DeleteSegmentRateLimitExceeded = 10007, + CreateSegmentRateLimitExceeded = 10008, + UpdateSegmentRateLimitExceeded = 10009, + GetSegmentsRateLimitExceeded = 10010, + AsyncExportNotInFlight = 10011, + AsyncExportNotFound = 10012, + AsyncExportRateLimitExceeded = 10013, + AnalyticsSegmentCountOverLimit = 10014, + SnapshotNotFound = 11000, + InventoryApiNotImplemented = 12000, + LobbyDoesNotExist = 13000, + LobbyRateLimitExceeded = 13001, + LobbyPlayerAlreadyJoined = 13002, + LobbyNotJoinable = 13003, + LobbyMemberCannotRejoin = 13004, + LobbyCurrentPlayersMoreThanMaxPlayers = 13005, + LobbyPlayerNotPresent = 13006, + LobbyBadRequest = 13007, + LobbyPlayerMaxLobbyLimitExceeded = 13008, + LobbyNewOwnerMustBeConnected = 13009, + LobbyCurrentOwnerStillConnected = 13010, + LobbyMemberIsNotOwner = 13011, + LobbyServerMismatch = 13012, + LobbyServerNotFound = 13013, + LobbyDifferentServerAlreadyJoined = 13014, + LobbyServerAlreadyJoined = 13015, + LobbyIsNotClientOwned = 13016, + LobbyDoesNotUseConnections = 13017, + EventSamplingInvalidRatio = 14000, + EventSamplingInvalidEventNamespace = 14001, + EventSamplingInvalidEventName = 14002, + EventSamplingRatioNotFound = 14003, + TelemetryKeyNotFound = 14200, + TelemetryKeyInvalidName = 14201, + TelemetryKeyAlreadyExists = 14202, + TelemetryKeyInvalid = 14203, + TelemetryKeyCountOverLimit = 14204, + TelemetryKeyDeactivated = 14205, + TelemetryKeyLongInsightsRetentionNotAllowed = 14206, + EventSinkConnectionInvalid = 15000, + EventSinkConnectionUnauthorized = 15001, + EventSinkRegionInvalid = 15002, + EventSinkLimitExceeded = 15003, + EventSinkSasTokenInvalid = 15004, + EventSinkNotFound = 15005, + EventSinkNameInvalid = 15006, + EventSinkSasTokenPermissionInvalid = 15007, + EventSinkSecretInvalid = 15008, + EventSinkTenantNotFound = 15009, + EventSinkAadNotFound = 15010, + EventSinkDatabaseNotFound = 15011, + EventSinkTitleUnauthorized = 15012, + EventSinkInsufficientRoleAssignment = 15013, + EventSinkContainerNotFound = 15014, + EventSinkTenantIdInvalid = 15015, + OperationCanceled = 16000, + InvalidDisplayNameRandomSuffixLength = 17000, + AllowNonUniquePlayerDisplayNamesDisableNotAllowed = 17001, + PartitionedEventInvalid = 18000, + PartitionedEventCountOverLimit = 18001, + ManageEventNamespaceInvalid = 18002, + ManageEventNameInvalid = 18003, + ManagedEventNotFound = 18004, + ManageEventsInvalidRatio = 18005, + ManagedEventInvalid = 18006, + PlayerCustomPropertiesPropertyNameTooLong = 19000, + PlayerCustomPropertiesPropertyNameIsInvalid = 19001, + PlayerCustomPropertiesStringPropertyValueTooLong = 19002, + PlayerCustomPropertiesValueIsInvalidType = 19003, + PlayerCustomPropertiesVersionMismatch = 19004, + PlayerCustomPropertiesPropertyCountTooHigh = 19005, + PlayerCustomPropertiesDuplicatePropertyName = 19006, + PlayerCustomPropertiesPropertyDoesNotExist = 19007, + AddonAlreadyExists = 19008, + AddonDoesntExist = 19009, + CopilotDisabled = 19100, + CopilotInvalidRequest = 19101, + TrueSkillUnauthorized = 20000, + TrueSkillInvalidTitleId = 20001, + TrueSkillInvalidScenarioId = 20002, + TrueSkillInvalidModelId = 20003, + TrueSkillInvalidModelName = 20004, + TrueSkillInvalidPlayerIds = 20005, + TrueSkillInvalidEntityKey = 20006, + TrueSkillInvalidConditionKey = 20007, + TrueSkillInvalidConditionValue = 20008, + TrueSkillInvalidConditionAffinityWeight = 20009, + TrueSkillInvalidEventName = 20010, + TrueSkillMatchResultCreated = 20011, + TrueSkillMatchResultAlreadySubmitted = 20012, + TrueSkillBadPlayerIdInMatchResult = 20013, + TrueSkillInvalidBotIdInMatchResult = 20014, + TrueSkillDuplicatePlayerInMatchResult = 20015, + TrueSkillNoPlayerInMatchResultTeam = 20016, + TrueSkillPlayersInMatchResultExceedingLimit = 20017, + TrueSkillInvalidPreMatchPartyInMatchResult = 20018, + TrueSkillInvalidTimestampInMatchResult = 20019, + TrueSkillStartTimeMissingInMatchResult = 20020, + TrueSkillEndTimeMissingInMatchResult = 20021, + TrueSkillInvalidPlayerSecondsPlayedInMatchResult = 20022, + TrueSkillNoTeamInMatchResult = 20023, + TrueSkillNotEnoughTeamsInMatchResult = 20024, + TrueSkillInvalidRanksInMatchResult = 20025, + TrueSkillNoWinnerInMatchResult = 20026, + TrueSkillMissingRequiredCondition = 20027, + TrueSkillMissingRequiredEvent = 20028, + TrueSkillUnknownEventName = 20029, + TrueSkillInvalidEventCount = 20030, + TrueSkillUnknownConditionKey = 20031, + TrueSkillUnknownConditionValue = 20032, + TrueSkillScenarioConfigDoesNotExist = 20033, + TrueSkillUnknownModelId = 20034, + TrueSkillNoModelInScenario = 20035, + TrueSkillNotSupportedForTitle = 20036, + TrueSkillModelIsNotActive = 20037, + TrueSkillUnauthorizedToQueryOtherPlayerSkills = 20038, + TrueSkillInvalidMaxIterations = 20039, + TrueSkillEndTimeBeforeStartTime = 20040, + TrueSkillInvalidJobId = 20041, + TrueSkillInvalidMetadataId = 20042, + TrueSkillMissingBuildVerison = 20043, + TrueSkillJobAlreadyExists = 20044, + TrueSkillJobNotFound = 20045, + TrueSkillOperationCanceled = 20046, + TrueSkillActiveModelLimitExceeded = 20047, + TrueSkillTotalModelLimitExceeded = 20048, + TrueSkillUnknownInitialModelId = 20049, + TrueSkillUnauthorizedForJob = 20050, + TrueSkillInvalidScenarioName = 20051, + TrueSkillConditionStateIsRequired = 20052, + TrueSkillEventStateIsRequired = 20053, + TrueSkillDuplicateEvent = 20054, + TrueSkillDuplicateCondition = 20055, + TrueSkillInvalidAnomalyThreshold = 20056, + TrueSkillConditionKeyLimitExceeded = 20057, + TrueSkillConditionValuePerKeyLimitExceeded = 20058, + TrueSkillInvalidTimestamp = 20059, + TrueSkillEventLimitExceeded = 20060, + TrueSkillInvalidPlayers = 20061, + TrueSkillTrueSkillPlayerNull = 20062, + TrueSkillInvalidPlayerId = 20063, + TrueSkillInvalidSquadSize = 20064, + TrueSkillConditionSetNotInModel = 20065, + TrueSkillModelStateInvalidForOperation = 20066, + TrueSkillScenarioContainsActiveModel = 20067, + GameSaveManifestNotFound = 20300, + GameSaveManifestVersionAlreadyExists = 20301, + GameSaveConflictUpdatingManifest = 20302, + GameSaveManifestUpdatesNotAllowed = 20303, + GameSaveFileAlreadyExists = 20304, + GameSaveManifestVersionNotFinalized = 20305, + GameSaveUnknownFileInManifest = 20306, + GameSaveFileExceededReportedSize = 20307, + GameSaveFileNotUploaded = 20308, + GameSaveBadRequest = 20309, + GameSaveOperationNotAllowed = 20310, + StateShareForbidden = 21000, + StateShareTitleNotInFlight = 21001, + StateShareStateNotFound = 21002, + StateShareLinkNotFound = 21003, + StateShareStateRedemptionLimitExceeded = 21004, + StateShareStateRedemptionLimitNotUpdated = 21005, + StateShareCreatedStatesLimitExceeded = 21006, + StateShareIdMissingOrMalformed = 21007 + } + + public class PlayFabError + { + public string ApiEndpoint; + public int HttpCode; + public string HttpStatus; + public PlayFabErrorCode Error; + public string ErrorMessage; + public Dictionary> ErrorDetails; + public object CustomData; + public uint? RetryAfterSeconds = null; + + public override string ToString() + { + return GenerateErrorReport(); + } + + [ThreadStatic] + private static StringBuilder _tempSb; + /// + /// This converts the PlayFabError into a human readable string describing the error. + /// If error is not found, it will return the http code, status, and error + /// + /// A description of the error that we just incur. + public string GenerateErrorReport() + { + if (_tempSb == null) + _tempSb = new StringBuilder(); + _tempSb.Length = 0; + if (String.IsNullOrEmpty(ErrorMessage)) + { + _tempSb.Append(ApiEndpoint).Append(": ").Append("Http Code: ").Append(HttpCode.ToString()).Append("\nHttp Status: ").Append(HttpStatus).Append("\nError: ").Append(Error.ToString()).Append("\n"); + } + else + { + _tempSb.Append(ApiEndpoint).Append(": ").Append(ErrorMessage); + } + + if (ErrorDetails != null) + foreach (var pair in ErrorDetails) + foreach (var msg in pair.Value) + _tempSb.Append("\n").Append(pair.Key).Append(": ").Append(msg); + return _tempSb.ToString(); + } + } + + public class PlayFabException : Exception + { + public readonly PlayFabExceptionCode Code; + public PlayFabException(PlayFabExceptionCode code, string message) : base(message) + { + Code = code; + } + } + + public enum PlayFabExceptionCode + { + AuthContextRequired, + BuildError, + DeveloperKeyNotSet, + EntityTokenNotSet, + NotLoggedIn, + TitleNotSet, + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabErrors.cs.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabErrors.cs.meta new file mode 100644 index 00000000..1104460f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabErrors.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ed146f2193bb8ef49ad1200eefdab503 +timeCreated: 1468524876 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp.meta new file mode 100644 index 00000000..188ddcdd --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6de758a294727f04c82bf319fdd54c60 +folderAsset: yes +timeCreated: 1462746198 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/GzipDownloadHandler.cs b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/GzipDownloadHandler.cs new file mode 100644 index 00000000..a9e6368f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/GzipDownloadHandler.cs @@ -0,0 +1,57 @@ +using PlayFab; +using System.Diagnostics; +using System.IO; +using System.IO.Compression; +using UnityEngine.Networking; + +public class GzipDownloadHandler : DownloadHandlerScript +{ + private byte[] _data; + public byte[] Data { get { return _data; } } + + public GzipDownloadHandler() : base() + { + } + + protected override byte[] GetData() { return _data; } + + protected override bool ReceiveData(byte[] data, int dataLength) + { + if (_data == null) + _data = data; + else + { + byte[] newData = new byte[_data.Length + dataLength]; + _data.CopyTo(newData, 0); + data.CopyTo(newData, _data.Length); + _data = newData; + } + return true; + } + + protected override void CompleteContent() + { + try + { + using MemoryStream stream = new MemoryStream(_data); + using GZipStream gZipStream = new GZipStream(stream, CompressionMode.Decompress, true); + + byte[] buffer = new byte[4096]; + using MemoryStream resultStream = new MemoryStream(); + + int read; + while ((read = gZipStream.Read(buffer, 0, buffer.Length)) > 0) + { + resultStream.Write(buffer, 0, read); + } + + _data = resultStream.ToArray(); + } + catch (IOException) + { + // If we fail to decompress, it should be because Unity silently decompressed already, so we should disable this custom handler. + // There is no info on which platforms Unity decompresses on, so we have to assume this is needed until we reach this. + PlayFabSettings.staticSettings.DecompressWithDownloadHandler = false; + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/GzipDownloadHandler.cs.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/GzipDownloadHandler.cs.meta new file mode 100644 index 00000000..e51896e5 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/GzipDownloadHandler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40479a6315f18a54a9db2c924e0af5ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/IPlayFabHttp.cs b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/IPlayFabHttp.cs new file mode 100644 index 00000000..2977de03 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/IPlayFabHttp.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using PlayFab.SharedModels; + +namespace PlayFab.Internal +{ + public enum AuthType + { + None, + PreLoginSession, // Not yet defined + LoginSession, // "X-Authorization" + DevSecretKey, // "X-SecretKey" + EntityToken, // "X-EntityToken" + TelemetryKey // "X-TelemetryKey" + } + + public enum HttpRequestState + { + Sent, + Received, + Idle, + Error + } + + public class CallRequestContainer + { +#if !UNITY_WSA && !UNITY_WP8 + public HttpRequestState HttpState = HttpRequestState.Idle; + public System.Net.HttpWebRequest HttpRequest = null; +#endif +#if PLAYFAB_REQUEST_TIMING + public PlayFabHttp.RequestTiming Timing; + public System.Diagnostics.Stopwatch Stopwatch; +#endif + + // This class stores the state of the request and all associated data + public string ApiEndpoint = null; + public string FullUrl = null; + public byte[] Payload = null; + public string JsonResponse = null; + public PlayFabRequestCommon ApiRequest; + public Dictionary RequestHeaders; + public PlayFabResultCommon ApiResult; + public PlayFabError Error; + public Action DeserializeResultJson; + public Action InvokeSuccessCallback; + public Action ErrorCallback; + public object CustomData = null; + public PlayFabApiSettings settings; + public PlayFabAuthenticationContext context; + public IPlayFabInstanceApi instanceApi; + public bool CalledGetResponse = false; + + public CallRequestContainer() + { +#if PLAYFAB_REQUEST_TIMING + Stopwatch = System.Diagnostics.Stopwatch.StartNew(); +#endif + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/IPlayFabHttp.cs.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/IPlayFabHttp.cs.meta new file mode 100644 index 00000000..00621125 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/IPlayFabHttp.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aeac58284b4b1cd4ab93ab0e71ba8540 +timeCreated: 1462745280 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs new file mode 100644 index 00000000..23894d90 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs @@ -0,0 +1,504 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using PlayFab.Public; +using PlayFab.SharedModels; +using UnityEngine; + +namespace PlayFab.Internal +{ + /// + /// This is a wrapper for Http So we can better separate the functionaity of Http Requests delegated to WWW or HttpWebRequest + /// + public class PlayFabHttp : SingletonMonoBehaviour + { + private static List _apiCallQueue = new List(); // Starts initialized, and is nulled when it's flushed + + public delegate void ApiProcessingEvent(TEventArgs e); + public delegate void ApiProcessErrorEvent(PlayFabRequestCommon request, PlayFabError error); + public static event ApiProcessingEvent ApiProcessingEventHandler; + public static event ApiProcessErrorEvent ApiProcessingErrorEventHandler; + public static readonly Dictionary GlobalHeaderInjection = new Dictionary(); + + private static IPlayFabLogger _logger; +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API + private static IScreenTimeTracker screenTimeTracker = new ScreenTimeTracker(); + private const float delayBetweenBatches = 5.0f; +#endif + +#if PLAYFAB_REQUEST_TIMING + public struct RequestTiming + { + public DateTime StartTimeUtc; + public string ApiEndpoint; + public int WorkerRequestMs; + public int MainThreadRequestMs; + } + + public delegate void ApiRequestTimingEvent(RequestTiming time); + public static event ApiRequestTimingEvent ApiRequestTimingEventHandler; +#endif + + /// + /// Return the number of api calls that are waiting for results from the server + /// + /// + public static int GetPendingMessages() + { + var transport = PluginManager.GetPlugin(PluginContract.PlayFab_Transport); + return transport.IsInitialized ? transport.GetPendingMessages() : 0; + } + + /// + /// This initializes the GameObject and ensures it is in the scene. + /// + public static void InitializeHttp() + { + if (string.IsNullOrEmpty(PlayFabSettings.TitleId)) + throw new PlayFabException(PlayFabExceptionCode.TitleNotSet, "You must set PlayFabSettings.TitleId before making API Calls."); + var transport = PluginManager.GetPlugin(PluginContract.PlayFab_Transport); + if (transport.IsInitialized) + return; + + transport.Initialize(); + CreateInstance(); // Invoke the SingletonMonoBehaviour + } + + /// + /// This initializes the GameObject and ensures it is in the scene. + /// + public static void InitializeLogger(IPlayFabLogger setLogger = null) + { + if (_logger != null) + throw new InvalidOperationException("Once initialized, the logger cannot be reset."); + if (setLogger == null) + setLogger = new PlayFabLogger(); + _logger = setLogger; + } + +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API + /// + /// This initializes ScreenTimeTracker object and notifying it to start sending info. + /// + /// Result of the user's login, represent user ID + public static void InitializeScreenTimeTracker(string entityId, string entityType, string playFabUserId) + { + screenTimeTracker.ClientSessionStart(entityId, entityType, playFabUserId); + instance.StartCoroutine(SendScreenTimeEvents(delayBetweenBatches)); + } + + /// + /// This function will send Screen Time events on a periodic basis. + /// + /// Delay between batches, in seconds + private static IEnumerator SendScreenTimeEvents(float secondsBetweenBatches) + { + WaitForSeconds delay = new WaitForSeconds(secondsBetweenBatches); + + while (!PlayFabSettings.DisableFocusTimeCollection) + { + screenTimeTracker.Send(); + yield return delay; + } + } +#endif + + public static void SimpleGetCall(string fullUrl, Action successCallback, Action errorCallback) + { + InitializeHttp(); + PluginManager.GetPlugin(PluginContract.PlayFab_Transport).SimpleGetCall(fullUrl, successCallback, errorCallback); + } + + + public static void SimplePutCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + InitializeHttp(); + PluginManager.GetPlugin(PluginContract.PlayFab_Transport).SimplePutCall(fullUrl, payload, successCallback, errorCallback); + } + + public static void SimplePostCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + InitializeHttp(); + PluginManager.GetPlugin(PluginContract.PlayFab_Transport).SimplePostCall(fullUrl, payload, successCallback, errorCallback); + } + + protected internal static void MakeApiCall(string apiEndpoint, + PlayFabRequestCommon request, AuthType authType, Action resultCallback, + Action errorCallback, object customData = null, Dictionary extraHeaders = null, PlayFabAuthenticationContext authenticationContext = null, PlayFabApiSettings apiSettings = null, IPlayFabInstanceApi instanceApi = null) + where TResult : PlayFabResultCommon + { + apiSettings = apiSettings ?? PlayFabSettings.staticSettings; + var fullUrl = apiSettings.GetFullUrl(apiEndpoint, apiSettings.RequestGetParams); + _MakeApiCall(apiEndpoint, fullUrl, request, authType, resultCallback, errorCallback, customData, extraHeaders, false, authenticationContext, apiSettings, instanceApi); + } + + protected internal static void MakeApiCallWithFullUri(string fullUri, + PlayFabRequestCommon request, AuthType authType, Action resultCallback, + Action errorCallback, object customData = null, Dictionary extraHeaders = null, PlayFabAuthenticationContext authenticationContext = null, PlayFabApiSettings apiSettings = null, IPlayFabInstanceApi instanceApi = null) + where TResult : PlayFabResultCommon + { + apiSettings = apiSettings ?? PlayFabSettings.staticSettings; + // This will not be called if environment file does not exist or does not contain property the debugging URI + _MakeApiCall(null, fullUri, request, authType, resultCallback, errorCallback, customData, extraHeaders, false, authenticationContext, apiSettings, instanceApi); + } + + /// + /// Internal method for Make API Calls + /// + private static void _MakeApiCall(string apiEndpoint, string fullUrl, + PlayFabRequestCommon request, AuthType authType, Action resultCallback, + Action errorCallback, object customData, Dictionary extraHeaders, bool allowQueueing, PlayFabAuthenticationContext authenticationContext, PlayFabApiSettings apiSettings, IPlayFabInstanceApi instanceApi) + where TResult : PlayFabResultCommon + { + InitializeHttp(); + SendEvent(apiEndpoint, request, null, ApiProcessingEventType.Pre); + + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var reqContainer = new CallRequestContainer + { + ApiEndpoint = apiEndpoint, + FullUrl = fullUrl, + settings = apiSettings, + context = authenticationContext, + CustomData = customData, + Payload = Encoding.UTF8.GetBytes(serializer.SerializeObject(request)), + ApiRequest = request, + ErrorCallback = errorCallback, + RequestHeaders = extraHeaders ?? new Dictionary(), // Use any headers provided by the customer + instanceApi = instanceApi + }; + // Append any additional headers + foreach (var pair in GlobalHeaderInjection) + if (!reqContainer.RequestHeaders.ContainsKey(pair.Key)) + reqContainer.RequestHeaders[pair.Key] = pair.Value; + +#if PLAYFAB_REQUEST_TIMING + reqContainer.Timing.StartTimeUtc = DateTime.UtcNow; + reqContainer.Timing.ApiEndpoint = apiEndpoint; +#endif + + // Add PlayFab Headers + var transport = PluginManager.GetPlugin(PluginContract.PlayFab_Transport); + reqContainer.RequestHeaders["X-ReportErrorAsSuccess"] = "true"; // Makes processing PlayFab errors a little easier + reqContainer.RequestHeaders["X-PlayFabSDK"] = PlayFabSettings.VersionString; // Tell PlayFab which SDK this is + switch (authType) + { +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || UNITY_EDITOR || ENABLE_PLAYFAB_SECRETKEY + case AuthType.DevSecretKey: + if (apiSettings.DeveloperSecretKey == null) throw new PlayFabException(PlayFabExceptionCode.DeveloperKeyNotSet, "DeveloperSecretKey is not found in Request, Server Instance or PlayFabSettings"); + reqContainer.RequestHeaders["X-SecretKey"] = apiSettings.DeveloperSecretKey; break; +#endif +#if !DISABLE_PLAYFABCLIENT_API + case AuthType.LoginSession: + if (authenticationContext != null) + reqContainer.RequestHeaders["X-Authorization"] = authenticationContext.ClientSessionTicket; + break; +#endif +#if !DISABLE_PLAYFABENTITY_API + case AuthType.EntityToken: + if (authenticationContext != null) + reqContainer.RequestHeaders["X-EntityToken"] = authenticationContext.EntityToken; + break; +#endif + case AuthType.TelemetryKey: + if (authenticationContext != null) + reqContainer.RequestHeaders["X-TelemetryKey"] = authenticationContext.TelemetryKey; + break; + } + + // These closures preserve the TResult generic information in a way that's safe for all the devices + reqContainer.DeserializeResultJson = () => + { + reqContainer.ApiResult = serializer.DeserializeObject(reqContainer.JsonResponse); + }; + reqContainer.InvokeSuccessCallback = () => + { + if (resultCallback != null) + { + resultCallback((TResult)reqContainer.ApiResult); + } + }; + + if (allowQueueing && _apiCallQueue != null) + { + for (var i = _apiCallQueue.Count - 1; i >= 0; i--) + if (_apiCallQueue[i].ApiEndpoint == apiEndpoint) + _apiCallQueue.RemoveAt(i); + _apiCallQueue.Add(reqContainer); + } + else + { + transport.MakeApiCall(reqContainer); + } + } + + /// + /// Internal code shared by IPlayFabHTTP implementations + /// + internal void OnPlayFabApiResult(CallRequestContainer reqContainer) + { + var result = reqContainer.ApiResult; + +#if !DISABLE_PLAYFABENTITY_API + + var entRes = result as AuthenticationModels.GetEntityTokenResponse; + if (entRes != null) + { + PlayFabSettings.staticPlayer.EntityToken = entRes.EntityToken; + } + +#endif +#if !DISABLE_PLAYFABCLIENT_API + var logRes = result as ClientModels.LoginResult; + var regRes = result as ClientModels.RegisterPlayFabUserResult; + if (logRes != null) + { + logRes.AuthenticationContext = new PlayFabAuthenticationContext(logRes.SessionTicket, logRes.EntityToken.EntityToken, logRes.PlayFabId, logRes.EntityToken.Entity.Id, logRes.EntityToken.Entity.Type); + if (reqContainer.context != null) + reqContainer.context.CopyFrom(logRes.AuthenticationContext); + } + else if (regRes != null) + { + regRes.AuthenticationContext = new PlayFabAuthenticationContext(regRes.SessionTicket, regRes.EntityToken.EntityToken, regRes.PlayFabId, regRes.EntityToken.Entity.Id, regRes.EntityToken.Entity.Type); + if (reqContainer.context != null) + reqContainer.context.CopyFrom(regRes.AuthenticationContext); + } +#endif + } + + /// + /// MonoBehaviour OnEnable Method + /// + private void OnEnable() + { + if (_logger != null) + { + _logger.OnEnable(); + } + +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API + if ((screenTimeTracker != null) && !PlayFabSettings.DisableFocusTimeCollection) + { + screenTimeTracker.OnEnable(); + } +#endif + } + + /// + /// MonoBehaviour OnDisable + /// + private void OnDisable() + { + if (_logger != null) + { + _logger.OnDisable(); + } + +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API + if ((screenTimeTracker != null) && !PlayFabSettings.DisableFocusTimeCollection) + { + screenTimeTracker.OnDisable(); + } +#endif + } + + /// + /// MonoBehaviour OnDestroy + /// + private void OnDestroy() + { + var transport = PluginManager.GetPlugin(PluginContract.PlayFab_Transport); + if (transport.IsInitialized) + { + transport.OnDestroy(); + } + + if (_logger != null) + { + _logger.OnDestroy(); + } + +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API + if ((screenTimeTracker != null) && !PlayFabSettings.DisableFocusTimeCollection) + { + screenTimeTracker.OnDestroy(); + } +#endif + } + + /// + /// MonoBehaviour OnApplicationFocus + /// + public void OnApplicationFocus(bool isFocused) + { +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API + if ((screenTimeTracker != null) && !PlayFabSettings.DisableFocusTimeCollection) + { + screenTimeTracker.OnApplicationFocus(isFocused); + } +#endif + } + + /// + /// MonoBehaviour OnApplicationQuit + /// + public void OnApplicationQuit() + { +#if !DISABLE_PLAYFABENTITY_API && !DISABLE_PLAYFABCLIENT_API + if ((screenTimeTracker != null) && !PlayFabSettings.DisableFocusTimeCollection) + { + screenTimeTracker.OnApplicationQuit(); + } +#endif + } + + /// + /// MonoBehaviour Update + /// + private void Update() + { + var transport = PluginManager.GetPlugin(PluginContract.PlayFab_Transport); + if (transport.IsInitialized) + { + if (_apiCallQueue != null) + { + foreach (var eachRequest in _apiCallQueue) + transport.MakeApiCall(eachRequest); // Flush the queue + _apiCallQueue = null; // null this after it's flushed + } + transport.Update(); + } + + while (_injectedCoroutines.Count > 0) + StartCoroutine(_injectedCoroutines.Dequeue()); + + while (_injectedAction.Count > 0) + { + var action = _injectedAction.Dequeue(); + if (action != null) + { + action.Invoke(); + } + } + } + + #region Helpers + protected internal static PlayFabError GeneratePlayFabError(string apiEndpoint, string json, object customData) + { + Dictionary errorDict = null; + Dictionary> errorDetails = null; + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + try + { + // Deserialize the error + errorDict = serializer.DeserializeObject>(json); + } + catch (Exception) { /* Unusual, but shouldn't actually matter */ } + try + { + object errorDetailsString; + if (errorDict != null && errorDict.TryGetValue("errorDetails", out errorDetailsString)) + errorDetails = serializer.DeserializeObject>>(errorDetailsString.ToString()); + } + catch (Exception) { /* Unusual, but shouldn't actually matter */ } + + return new PlayFabError + { + ApiEndpoint = apiEndpoint, + HttpCode = errorDict != null && errorDict.ContainsKey("code") ? Convert.ToInt32(errorDict["code"]) : 400, + HttpStatus = errorDict != null && errorDict.ContainsKey("status") ? (string)errorDict["status"] : "BadRequest", + Error = errorDict != null && errorDict.ContainsKey("errorCode") ? (PlayFabErrorCode)Convert.ToInt32(errorDict["errorCode"]) : PlayFabErrorCode.ServiceUnavailable, + ErrorMessage = errorDict != null && errorDict.ContainsKey("errorMessage") ? (string)errorDict["errorMessage"] : json, + ErrorDetails = errorDetails, + CustomData = customData, + RetryAfterSeconds = errorDict != null && errorDict.ContainsKey("retryAfterSeconds") ? Convert.ToUInt32(errorDict["retryAfterSeconds"]) : (uint?)null, + }; + } + + protected internal static void SendErrorEvent(PlayFabRequestCommon request, PlayFabError error) + { + if (ApiProcessingErrorEventHandler == null) + return; + + try + { + ApiProcessingErrorEventHandler(request, error); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + + protected internal static void SendEvent(string apiEndpoint, PlayFabRequestCommon request, PlayFabResultCommon result, ApiProcessingEventType eventType) + { + if (ApiProcessingEventHandler == null) + return; + try + { + ApiProcessingEventHandler(new ApiProcessingEventArgs + { + ApiEndpoint = apiEndpoint, + EventType = eventType, + Request = request, + Result = result + }); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + + public static void ClearAllEvents() + { + ApiProcessingEventHandler = null; + ApiProcessingErrorEventHandler = null; + } + +#if PLAYFAB_REQUEST_TIMING + protected internal static void SendRequestTiming(RequestTiming rt) + { + if (ApiRequestTimingEventHandler != null) + { + ApiRequestTimingEventHandler(rt); + } + } +#endif + #endregion + private readonly Queue _injectedCoroutines = new Queue(); + private readonly Queue _injectedAction = new Queue(); + + public void InjectInUnityThread(IEnumerator x) + { + _injectedCoroutines.Enqueue(x); + } + + public void InjectInUnityThread(Action action) + { + _injectedAction.Enqueue(action); + } + } + + #region Event Classes + public enum ApiProcessingEventType + { + Pre, + Post + } + + public class ApiProcessingEventArgs + { + public string ApiEndpoint; + public ApiProcessingEventType EventType; + public PlayFabRequestCommon Request; + public PlayFabResultCommon Result; + + public TRequest GetRequest() where TRequest : PlayFabRequestCommon + { + return Request as TRequest; + } + } + #endregion +} diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs.meta new file mode 100644 index 00000000..646a626b --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 97a8a3caac8b73541aa8a9a1e330f479 +timeCreated: 1462575707 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs new file mode 100644 index 00000000..98d2c4c9 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs @@ -0,0 +1,273 @@ +#if UNITY_2017_2_OR_NEWER + +using PlayFab.SharedModels; +using System; +using System.Collections; +using System.IO; +using UnityEngine; +using UnityEngine.Networking; + +namespace PlayFab.Internal +{ + public class PlayFabUnityHttp : ITransportPlugin + { + private bool _isInitialized = false; + private readonly int _pendingWwwMessages = 0; + + public bool IsInitialized { get { return _isInitialized; } } + + public void Initialize() { _isInitialized = true; } + + public void Update() { } + + public void OnDestroy() { } + + public void SimpleGetCall(string fullUrl, Action successCallback, Action errorCallback) + { + PlayFabHttp.instance.StartCoroutine(SimpleCallCoroutine("get", fullUrl, null, successCallback, errorCallback)); + } + + public void SimplePutCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + PlayFabHttp.instance.StartCoroutine(SimpleCallCoroutine("put", fullUrl, payload, successCallback, errorCallback)); + } + + public void SimplePostCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + PlayFabHttp.instance.StartCoroutine(SimpleCallCoroutine("post", fullUrl, payload, successCallback, errorCallback)); + } + + private static IEnumerator SimpleCallCoroutine(string method, string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + if (payload == null) + { + using (UnityWebRequest www = UnityWebRequest.Get(fullUrl)) + { + if (PlayFabSettings.staticSettings.CompressResponses) + { + www.SetRequestHeader("Accept-Encoding", "gzip"); + + if (PlayFabSettings.staticSettings.DecompressWithDownloadHandler) + { + www.downloadHandler = new GzipDownloadHandler(); + } + } + +#if UNITY_2017_2_OR_NEWER + yield return www.SendWebRequest(); +#else + yield return www.Send(); +#endif + + if (!string.IsNullOrEmpty(www.error)) + errorCallback(www.error); + else + successCallback(www.downloadHandler.data); + }; + } + else + { + + UnityWebRequest request; + if (method == "put") + { + request = UnityWebRequest.Put(fullUrl, payload); + } + else + { + request = new UnityWebRequest(fullUrl, "POST"); + request.uploadHandler = (UploadHandler)new UploadHandlerRaw(payload); + request.SetRequestHeader("Content-Type", "application/json"); + + if (PlayFabSettings.staticSettings.CompressResponses) + { + request.SetRequestHeader("Accept-Encoding", "gzip"); + request.downloadHandler = PlayFabSettings.staticSettings.DecompressWithDownloadHandler ? new GzipDownloadHandler() + : new DownloadHandlerBuffer(); + } + else + { + request.downloadHandler = new DownloadHandlerBuffer(); + } + } + + +#if UNITY_2017_2_OR_NEWER +#if !UNITY_2019_1_OR_NEWER + request.chunkedTransfer = false; // can be removed after Unity's PUT will be more stable +#endif + yield return request.SendWebRequest(); +#else + yield return request.Send(); +#endif + +#if UNITY_2020_1_OR_NEWER + if (request.result == UnityWebRequest.Result.ConnectionError || request.result == UnityWebRequest.Result.ProtocolError) +#else + if (request.isNetworkError || request.isHttpError) +#endif + { + errorCallback(request.error); + } + else + { + successCallback(request.downloadHandler.data); + } + + request.Dispose(); + } + } + + public void MakeApiCall(object reqContainerObj) + { + CallRequestContainer reqContainer = (CallRequestContainer)reqContainerObj; + reqContainer.RequestHeaders["Content-Type"] = "application/json"; + + // Start the www corouting to Post, and get a response or error which is then passed to the callbacks. + PlayFabHttp.instance.StartCoroutine(Post(reqContainer)); + } + + private IEnumerator Post(CallRequestContainer reqContainer) + { +#if PLAYFAB_REQUEST_TIMING + var stopwatch = System.Diagnostics.Stopwatch.StartNew(); + var startTime = DateTime.UtcNow; +#endif + + using var www = new UnityWebRequest(reqContainer.FullUrl) + { + uploadHandler = new UploadHandlerRaw(reqContainer.Payload), + method = "POST" + }; + + if (reqContainer.settings.CompressResponses) + { + www.SetRequestHeader("Accept-Encoding", "gzip"); + www.downloadHandler = reqContainer.settings.DecompressWithDownloadHandler ? new GzipDownloadHandler() + : new DownloadHandlerBuffer(); + } + else + { + www.downloadHandler = new DownloadHandlerBuffer(); + } + + foreach (var headerPair in reqContainer.RequestHeaders) + { + if (!string.IsNullOrEmpty(headerPair.Key) && !string.IsNullOrEmpty(headerPair.Value)) + www.SetRequestHeader(headerPair.Key, headerPair.Value); + else + Debug.LogWarning("Null header: " + headerPair.Key + " = " + headerPair.Value); + } + +#if UNITY_2017_2_OR_NEWER + yield return www.SendWebRequest(); +#else + yield return www.Send(); +#endif + +#if PLAYFAB_REQUEST_TIMING + stopwatch.Stop(); + var timing = new PlayFabHttp.RequestTiming { + StartTimeUtc = startTime, + ApiEndpoint = reqContainer.ApiEndpoint, + WorkerRequestMs = (int)stopwatch.ElapsedMilliseconds, + MainThreadRequestMs = (int)stopwatch.ElapsedMilliseconds + }; + PlayFabHttp.SendRequestTiming(timing); +#endif + + if (!string.IsNullOrEmpty(www.error)) + { + OnError(www.error, reqContainer); + } + else + { + try + { + byte[] responseBytes = www.downloadHandler.data; + string responseText = System.Text.Encoding.UTF8.GetString(responseBytes, 0, responseBytes.Length); + OnResponse(responseText, reqContainer); + } + catch (Exception e) + { + OnError("Unhandled error in PlayFabUnityHttp: " + e, reqContainer); + } + } + www.Dispose(); + } + + public int GetPendingMessages() + { + return _pendingWwwMessages; + } + + public void OnResponse(string response, CallRequestContainer reqContainer) + { + try + { +#if PLAYFAB_REQUEST_TIMING + var startTime = DateTime.UtcNow; +#endif + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var httpResult = serializer.DeserializeObject(response); + + if (httpResult.code == 200) + { + // We have a good response from the server + reqContainer.JsonResponse = serializer.SerializeObject(httpResult.data); + reqContainer.DeserializeResultJson(); + reqContainer.ApiResult.Request = reqContainer.ApiRequest; + reqContainer.ApiResult.CustomData = reqContainer.CustomData; + + PlayFabHttp.instance.OnPlayFabApiResult(reqContainer); +#if !DISABLE_PLAYFABCLIENT_API + PlayFabDeviceUtil.OnPlayFabLogin(reqContainer.ApiResult, reqContainer.settings, reqContainer.instanceApi); +#endif + try + { + PlayFabHttp.SendEvent(reqContainer.ApiEndpoint, reqContainer.ApiRequest, reqContainer.ApiResult, ApiProcessingEventType.Post); + } + catch (Exception e) + { + Debug.LogException(e); + } + + try + { + reqContainer.InvokeSuccessCallback(); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + else + { + if (reqContainer.ErrorCallback != null) + { + reqContainer.Error = PlayFabHttp.GeneratePlayFabError(reqContainer.ApiEndpoint, response, reqContainer.CustomData); + PlayFabHttp.SendErrorEvent(reqContainer.ApiRequest, reqContainer.Error); + reqContainer.ErrorCallback(reqContainer.Error); + } + } + } + catch (Exception e) + { + Debug.LogException(e); + } + } + + public void OnError(string error, CallRequestContainer reqContainer) + { + reqContainer.JsonResponse = error; + if (reqContainer.ErrorCallback != null) + { + reqContainer.Error = PlayFabHttp.GeneratePlayFabError(reqContainer.ApiEndpoint, reqContainer.JsonResponse, reqContainer.CustomData); + PlayFabHttp.SendErrorEvent(reqContainer.ApiRequest, reqContainer.Error); + reqContainer.ErrorCallback(reqContainer.Error); + } + } + } +} + +#endif diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs.meta new file mode 100644 index 00000000..9d9a8f47 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: fdda21a9c6bb5c74d85422afab113b0f +timeCreated: 1512617003 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWWW.cs b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWWW.cs new file mode 100644 index 00000000..42e37818 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWWW.cs @@ -0,0 +1,219 @@ +#if !UNITY_2018_2_OR_NEWER // Unity has deprecated Www +using System; +using System.Collections; +using System.IO; +using PlayFab.Json; +using PlayFab.SharedModels; +using UnityEngine; +#if UNITY_5_4_OR_NEWER +using UnityEngine.Networking; +#else +using UnityEngine.Experimental.Networking; +#endif + +namespace PlayFab.Internal +{ + public class PlayFabWww : ITransportPlugin + { + private bool _isInitialized = false; + private int _pendingWwwMessages = 0; + + public bool IsInitialized { get { return _isInitialized; } } + + public void Initialize() + { + _isInitialized = true; + } + + public void Update() { } + public void OnDestroy() { } + + public void SimpleGetCall(string fullUrl, Action successCallback, Action errorCallback) + { + PlayFabHttp.instance.StartCoroutine(SimpleCallCoroutine("get", fullUrl, null, successCallback, errorCallback)); + } + + public void SimplePutCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + PlayFabHttp.instance.StartCoroutine(SimpleCallCoroutine("put", fullUrl, payload, successCallback, errorCallback)); + } + + public void SimplePostCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + PlayFabHttp.instance.StartCoroutine(SimpleCallCoroutine("post", fullUrl, payload, successCallback, errorCallback)); + } + + private static IEnumerator SimpleCallCoroutine(string method, string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + if (payload == null) + { + var www = new WWW(fullUrl); + yield return www; + if (!string.IsNullOrEmpty(www.error)) + errorCallback(www.error); + else + successCallback(www.bytes); + } + else + { + UnityWebRequest request; + if (method == "put") + { + request = UnityWebRequest.Put(fullUrl, payload); + } + else + { + var strPayload = System.Text.Encoding.UTF8.GetString(payload, 0, payload.Length); + request = UnityWebRequest.Post(fullUrl, strPayload); + } + +#if UNITY_2017_2_OR_NEWER + request.chunkedTransfer = false; // can be removed after Unity's PUT will be more stable + request.SendWebRequest(); +#else + request.Send(); +#endif + +#if !UNITY_WEBGL + while (request.uploadProgress < 1 || request.downloadProgress < 1) + { + yield return 1; + } +#else + while (!request.isDone) + { + yield return 1; + } +#endif + + if (!string.IsNullOrEmpty(request.error)) + errorCallback(request.error); + else + successCallback(request.downloadHandler.data); + } + } + + public void MakeApiCall(object reqContainerObj) + { + CallRequestContainer reqContainer = (CallRequestContainer)reqContainerObj; + reqContainer.RequestHeaders["Content-Type"] = "application/json"; + + //Debug.LogFormat("Posting {0} to Url: {1}", req.Trim(), url); + var www = new WWW(reqContainer.FullUrl, reqContainer.Payload, reqContainer.RequestHeaders); + +#if PLAYFAB_REQUEST_TIMING + var stopwatch = System.Diagnostics.Stopwatch.StartNew(); +#endif + + // Start the www corouting to Post, and get a response or error which is then passed to the callbacks. + Action wwwSuccessCallback = (response) => + { + try + { +#if PLAYFAB_REQUEST_TIMING + var startTime = DateTime.UtcNow; +#endif + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var httpResult = serializer.DeserializeObject(response); + + if (httpResult.code == 200) + { + // We have a good response from the server + reqContainer.JsonResponse = serializer.SerializeObject(httpResult.data); + reqContainer.DeserializeResultJson(); + reqContainer.ApiResult.Request = reqContainer.ApiRequest; + reqContainer.ApiResult.CustomData = reqContainer.CustomData; + + PlayFabHttp.instance.OnPlayFabApiResult(reqContainer); +#if !DISABLE_PLAYFABCLIENT_API + PlayFabDeviceUtil.OnPlayFabLogin(reqContainer.ApiResult, reqContainer.settings, reqContainer.instanceApi); +#endif + + try + { + PlayFabHttp.SendEvent(reqContainer.ApiEndpoint, reqContainer.ApiRequest, reqContainer.ApiResult, ApiProcessingEventType.Post); + } + catch (Exception e) + { + Debug.LogException(e); + } + +#if PLAYFAB_REQUEST_TIMING + stopwatch.Stop(); + var timing = new PlayFabHttp.RequestTiming { + StartTimeUtc = startTime, + ApiEndpoint = reqContainer.ApiEndpoint, + WorkerRequestMs = (int)stopwatch.ElapsedMilliseconds, + MainThreadRequestMs = (int)stopwatch.ElapsedMilliseconds + }; + PlayFabHttp.SendRequestTiming(timing); +#endif + try + { + reqContainer.InvokeSuccessCallback(); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + else + { + if (reqContainer.ErrorCallback != null) + { + reqContainer.Error = PlayFabHttp.GeneratePlayFabError(reqContainer.ApiEndpoint, response, reqContainer.CustomData); + PlayFabHttp.SendErrorEvent(reqContainer.ApiRequest, reqContainer.Error); + reqContainer.ErrorCallback(reqContainer.Error); + } + } + } + catch (Exception e) + { + Debug.LogException(e); + } + }; + + Action wwwErrorCallback = (errorCb) => + { + reqContainer.JsonResponse = errorCb; + if (reqContainer.ErrorCallback != null) + { + reqContainer.Error = PlayFabHttp.GeneratePlayFabError(reqContainer.ApiEndpoint, reqContainer.JsonResponse, reqContainer.CustomData); + PlayFabHttp.SendErrorEvent(reqContainer.ApiRequest, reqContainer.Error); + reqContainer.ErrorCallback(reqContainer.Error); + } + }; + + PlayFabHttp.instance.StartCoroutine(PostPlayFabApiCall(www, wwwSuccessCallback, wwwErrorCallback)); + } + + private IEnumerator PostPlayFabApiCall(WWW www, Action wwwSuccessCallback, Action wwwErrorCallback) + { + yield return www; + if (!string.IsNullOrEmpty(www.error)) + { + wwwErrorCallback(www.error); + } + else + { + try + { + byte[] responseBytes = www.bytes; + string responseText = System.Text.Encoding.UTF8.GetString(responseBytes, 0, responseBytes.Length); + wwwSuccessCallback(responseText); + } + catch (Exception e) + { + wwwErrorCallback("Unhandled error in PlayFabWWW: " + e); + } + } + www.Dispose(); + } + + public int GetPendingMessages() + { + return _pendingWwwMessages; + } + } +} +#endif diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWWW.cs.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWWW.cs.meta new file mode 100644 index 00000000..6159d82f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWWW.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 71ae810a641b9644187c8824db5ff1fe +timeCreated: 1462745593 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs new file mode 100644 index 00000000..014774ce --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs @@ -0,0 +1,544 @@ +#if !UNITY_WSA && !UNITY_WP8 + +using System; +using UnityEngine; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Threading; +using PlayFab.SharedModels; +#if !DISABLE_PLAYFABCLIENT_API +using PlayFab.ClientModels; +#endif + +namespace PlayFab.Internal +{ + public class PlayFabWebRequest : ITransportPlugin + { + /// + /// Disable encryption certificate validation within PlayFabWebRequest using this request. + /// This is not generally recommended. + /// As of early 2018: + /// None of the built-in Unity mechanisms validate the certificate, using .Net 3.5 equivalent runtime + /// It is also not currently feasible to provide a single cross platform solution that will correctly validate a certificate. + /// The Risk: + /// All Unity HTTPS mechanisms are vulnerable to Man-In-The-Middle attacks. + /// The only more-secure option is to define a custom CustomCertValidationHook, specifically tailored to the platforms you support, + /// which validate the cert based on a list of trusted certificate providers. This list of providers must be able to update itself, as the + /// base certificates for those providers will also expire and need updating on a regular basis. + /// + public static void SkipCertificateValidation() + { + var rcvc = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications); //(sender, cert, chain, ssl) => true + ServicePointManager.ServerCertificateValidationCallback = rcvc; + certValidationSet = true; + } + + /// + /// Provide PlayFabWebRequest with a custom ServerCertificateValidationCallback which can be used to validate the PlayFab encryption certificate. + /// Please do not: + /// - Hard code the current PlayFab certificate information - The PlayFab certificate updates itself on a regular schedule, and your game will fail and require a republish to fix + /// - Hard code a list of static certificate authorities - Any single exported list of certificate authorities will become out of date, and have the same problem when the CA cert expires + /// Real solution: + /// - A mechanism where a valid certificate authority list can be securely downloaded and updated without republishing the client when existing certificates expire. + /// + public static System.Net.Security.RemoteCertificateValidationCallback CustomCertValidationHook + { + set + { + ServicePointManager.ServerCertificateValidationCallback = value; + certValidationSet = true; + } + } + + private static readonly Queue ResultQueueTransferThread = new Queue(); + private static readonly Queue ResultQueueMainThread = new Queue(); + private static readonly List ActiveRequests = new List(); + + private static bool certValidationSet = false; + private static Thread _requestQueueThread; + private static readonly object _ThreadLock = new object(); + private static readonly TimeSpan ThreadKillTimeout = TimeSpan.FromSeconds(60); + private static DateTime _threadKillTime = DateTime.UtcNow + ThreadKillTimeout; // Kill the thread after 1 minute of inactivity + private static bool _isApplicationPlaying; + private static int _activeCallCount; + + private static string _unityVersion; + + private bool _isInitialized = false; + + public bool IsInitialized { get { return _isInitialized; } } + + public void Initialize() + { + SetupCertificates(); + _isApplicationPlaying = true; + _unityVersion = Application.unityVersion; + _isInitialized = true; + } + + public void OnDestroy() + { + _isApplicationPlaying = false; + lock (ResultQueueTransferThread) + { + ResultQueueTransferThread.Clear(); + } + lock (ActiveRequests) + { + ActiveRequests.Clear(); + } + lock (_ThreadLock) + { + _requestQueueThread = null; + } + } + + private void SetupCertificates() + { + // These are performance Optimizations for HttpWebRequests. + ServicePointManager.DefaultConnectionLimit = 10; + ServicePointManager.Expect100Continue = false; + + if (!certValidationSet) + { + Debug.LogWarning("PlayFab API calls will likely fail because you have not set up a HttpWebRequest certificate validation mechanism"); + Debug.LogWarning("Please set a validation callback into PlayFab.Internal.PlayFabWebRequest.CustomCertValidationHook, or set PlayFab.Internal.PlayFabWebRequest.SkipCertificateValidation()"); + } + } + + /// + /// This disables certificate validation, if it's been activated by a customer via SkipCertificateValidation() + /// + private static bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) + { + return true; + } + + public void SimpleGetCall(string fullUrl, Action successCallback, Action errorCallback) + { + // This needs to be improved to use a decent thread-pool, but it can be improved invisibly later + var newThread = new Thread(() => SimpleHttpsWorker("GET", fullUrl, null, successCallback, errorCallback)); + newThread.Start(); + } + + public void SimplePutCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + // This needs to be improved to use a decent thread-pool, but it can be improved invisibly later + var newThread = new Thread(() => SimpleHttpsWorker("PUT", fullUrl, payload, successCallback, errorCallback)); + newThread.Start(); + } + + public void SimplePostCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + // This needs to be improved to use a decent thread-pool, but it can be improved invisibly later + var newThread = new Thread(() => SimpleHttpsWorker("POST", fullUrl, payload, successCallback, errorCallback)); + newThread.Start(); + } + + + private void SimpleHttpsWorker(string httpMethod, string fullUrl, byte[] payload, Action successCallback, Action errorCallback) + { + // This should also use a pooled HttpWebRequest object, but that too can be improved invisibly later + var httpRequest = (HttpWebRequest)WebRequest.Create(fullUrl); + httpRequest.UserAgent = "UnityEngine-Unity; Version: " + _unityVersion; + httpRequest.Method = httpMethod; + httpRequest.KeepAlive = PlayFabSettings.RequestKeepAlive; + httpRequest.Timeout = PlayFabSettings.RequestTimeout; + httpRequest.AllowWriteStreamBuffering = false; + httpRequest.ReadWriteTimeout = PlayFabSettings.RequestTimeout; + + if (payload != null) + { + httpRequest.ContentLength = payload.LongLength; + using (var stream = httpRequest.GetRequestStream()) + { + stream.Write(payload, 0, payload.Length); + } + } + + try + { + var response = httpRequest.GetResponse(); + byte[] output = null; + using (var responseStream = response.GetResponseStream()) + { + if (responseStream != null) + { + output = new byte[response.ContentLength]; + responseStream.Read(output, 0, output.Length); + } + } + successCallback(output); + } + catch (WebException webException) + { + try + { + using (var responseStream = webException.Response.GetResponseStream()) + { + if (responseStream != null) + using (var stream = new StreamReader(responseStream)) + errorCallback(stream.ReadToEnd()); + } + } + catch (Exception e) + { + Debug.LogException(e); + } + } + catch (Exception e) + { + Debug.LogException(e); + } + } + + public void MakeApiCall(object reqContainerObj) + { + CallRequestContainer reqContainer = (CallRequestContainer)reqContainerObj; + reqContainer.HttpState = HttpRequestState.Idle; + + lock (ActiveRequests) + { + ActiveRequests.Insert(0, reqContainer); + } + + ActivateThreadWorker(); + } + + private static void ActivateThreadWorker() + { + lock (_ThreadLock) + { + if (_requestQueueThread != null) + { + return; + } + _requestQueueThread = new Thread(WorkerThreadMainLoop); + _requestQueueThread.Start(); + } + } + + private static void WorkerThreadMainLoop() + { + try + { + bool active; + lock (_ThreadLock) + { + // Kill the thread after 1 minute of inactivity + _threadKillTime = DateTime.UtcNow + ThreadKillTimeout; + } + + List localActiveRequests = new List(); + do + { + //process active requests + lock (ActiveRequests) + { + localActiveRequests.AddRange(ActiveRequests); + ActiveRequests.Clear(); + _activeCallCount = localActiveRequests.Count; + } + + var activeCalls = localActiveRequests.Count; + for (var i = activeCalls - 1; i >= 0; i--) // We must iterate backwards, because we remove at index i in some cases + { + switch (localActiveRequests[i].HttpState) + { + case HttpRequestState.Error: + localActiveRequests.RemoveAt(i); break; + case HttpRequestState.Idle: + Post(localActiveRequests[i]); break; + case HttpRequestState.Sent: + if (!localActiveRequests[i].CalledGetResponse) { // Else we'll GetResponse try again next tick + localActiveRequests[i].HttpRequest.GetResponseAsync(); + localActiveRequests[i].CalledGetResponse = true; + } + else if (localActiveRequests[i].HttpRequest.HaveResponse) + ProcessHttpResponse(localActiveRequests[i]); + break; + case HttpRequestState.Received: + ProcessJsonResponse(localActiveRequests[i]); + localActiveRequests.RemoveAt(i); + break; + } + } + + #region Expire Thread. + // Check if we've been inactive + lock (_ThreadLock) + { + var now = DateTime.UtcNow; + if (activeCalls > 0 && _isApplicationPlaying) + { + // Still active, reset the _threadKillTime + _threadKillTime = now + ThreadKillTimeout; + } + // Kill the thread after 1 minute of inactivity + active = now <= _threadKillTime; + if (!active) + { + _requestQueueThread = null; + } + // This thread will be stopped, so null this now, inside lock (_threadLock) + } + #endregion + + Thread.Sleep(1); + } while (active); + + } + catch (Exception e) + { + Debug.LogException(e); + _requestQueueThread = null; + } + } + + private static void Post(CallRequestContainer reqContainer) + { + try + { + reqContainer.HttpRequest = (HttpWebRequest)WebRequest.Create(reqContainer.FullUrl); + reqContainer.HttpRequest.UserAgent = "UnityEngine-Unity; Version: " + _unityVersion; + reqContainer.HttpRequest.SendChunked = false; + // Prevents hitting a proxy if no proxy is available. TODO: Add support for proxy's. + reqContainer.HttpRequest.Proxy = null; + + foreach (var pair in reqContainer.RequestHeaders) + reqContainer.HttpRequest.Headers.Add(pair.Key, pair.Value); + + reqContainer.HttpRequest.ContentType = "application/json"; + reqContainer.HttpRequest.Method = "POST"; + reqContainer.HttpRequest.KeepAlive = PlayFabSettings.RequestKeepAlive; + reqContainer.HttpRequest.Timeout = PlayFabSettings.RequestTimeout; + reqContainer.HttpRequest.AllowWriteStreamBuffering = false; + reqContainer.HttpRequest.Proxy = null; + reqContainer.HttpRequest.ContentLength = reqContainer.Payload.LongLength; + reqContainer.HttpRequest.ReadWriteTimeout = PlayFabSettings.RequestTimeout; + + //Debug.Log("Get Stream"); + // Get Request Stream and send data in the body. + using (var stream = reqContainer.HttpRequest.GetRequestStream()) + { + //Debug.Log("Post Stream"); + stream.Write(reqContainer.Payload, 0, reqContainer.Payload.Length); + //Debug.Log("After Post stream"); + } + + reqContainer.HttpState = HttpRequestState.Sent; + } + catch (WebException e) + { + reqContainer.JsonResponse = ResponseToString(e.Response) ?? e.Status + ": WebException making http request to: " + reqContainer.FullUrl; + var enhancedError = new WebException(reqContainer.JsonResponse, e); + Debug.LogException(enhancedError); + QueueRequestError(reqContainer); + } + catch (Exception e) + { + reqContainer.JsonResponse = "Unhandled exception in Post : " + reqContainer.FullUrl; + var enhancedError = new Exception(reqContainer.JsonResponse, e); + Debug.LogException(enhancedError); + QueueRequestError(reqContainer); + } + } + + private static void ProcessHttpResponse(CallRequestContainer reqContainer) + { + try + { +#if PLAYFAB_REQUEST_TIMING + reqContainer.Timing.WorkerRequestMs = (int)reqContainer.Stopwatch.ElapsedMilliseconds; +#endif + // Get and check the response + var httpResponse = (HttpWebResponse)reqContainer.HttpRequest.GetResponse(); + if (httpResponse.StatusCode == HttpStatusCode.OK) + { + reqContainer.JsonResponse = ResponseToString(httpResponse); + } + + if (httpResponse.StatusCode != HttpStatusCode.OK || string.IsNullOrEmpty(reqContainer.JsonResponse)) + { + reqContainer.JsonResponse = reqContainer.JsonResponse ?? "No response from server"; + QueueRequestError(reqContainer); + return; + } + else + { + // Response Recieved Successfully, now process. + } + + reqContainer.HttpState = HttpRequestState.Received; + } + catch (Exception e) + { + var msg = "Unhandled exception in ProcessHttpResponse : " + reqContainer.FullUrl; + reqContainer.JsonResponse = reqContainer.JsonResponse ?? msg; + var enhancedError = new Exception(msg, e); + Debug.LogException(enhancedError); + QueueRequestError(reqContainer); + } + } + + /// + /// Set the reqContainer into an error state, and queue it to invoke the ErrorCallback for that request + /// + private static void QueueRequestError(CallRequestContainer reqContainer) + { + reqContainer.Error = PlayFabHttp.GeneratePlayFabError(reqContainer.ApiEndpoint, reqContainer.JsonResponse, reqContainer.CustomData); // Decode the server-json error + reqContainer.HttpState = HttpRequestState.Error; + lock (ResultQueueTransferThread) + { + //Queue The result callbacks to run on the main thread. + ResultQueueTransferThread.Enqueue(() => + { + PlayFabHttp.SendErrorEvent(reqContainer.ApiRequest, reqContainer.Error); + if (reqContainer.ErrorCallback != null) + reqContainer.ErrorCallback(reqContainer.Error); + }); + } + } + + private static void ProcessJsonResponse(CallRequestContainer reqContainer) + { + try + { + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var httpResult = serializer.DeserializeObject(reqContainer.JsonResponse); + +#if PLAYFAB_REQUEST_TIMING + reqContainer.Timing.WorkerRequestMs = (int)reqContainer.Stopwatch.ElapsedMilliseconds; +#endif + + //This would happen if playfab returned a 500 internal server error or a bad json response. + if (httpResult == null || httpResult.code != 200) + { + QueueRequestError(reqContainer); + return; + } + + reqContainer.JsonResponse = serializer.SerializeObject(httpResult.data); + reqContainer.DeserializeResultJson(); // Assigns Result with a properly typed object + reqContainer.ApiResult.Request = reqContainer.ApiRequest; + reqContainer.ApiResult.CustomData = reqContainer.CustomData; + + if(_isApplicationPlaying) + { + PlayFabHttp.instance.OnPlayFabApiResult(reqContainer); + } + +#if !DISABLE_PLAYFABCLIENT_API + lock (ResultQueueTransferThread) + { + ResultQueueTransferThread.Enqueue(() => { PlayFabDeviceUtil.OnPlayFabLogin(reqContainer.ApiResult, reqContainer.settings, reqContainer.instanceApi); }); + } +#endif + lock (ResultQueueTransferThread) + { + //Queue The result callbacks to run on the main thread. + ResultQueueTransferThread.Enqueue(() => + { +#if PLAYFAB_REQUEST_TIMING + reqContainer.Stopwatch.Stop(); + reqContainer.Timing.MainThreadRequestMs = (int)reqContainer.Stopwatch.ElapsedMilliseconds; + PlayFabHttp.SendRequestTiming(reqContainer.Timing); +#endif + try + { + PlayFabHttp.SendEvent(reqContainer.ApiEndpoint, reqContainer.ApiRequest, reqContainer.ApiResult, ApiProcessingEventType.Post); + reqContainer.InvokeSuccessCallback(); + } + catch (Exception e) + { + Debug.LogException(e); // Log the user's callback exception back to them without halting PlayFabHttp + } + }); + } + } + catch (Exception e) + { + var msg = "Unhandled exception in ProcessJsonResponse : " + reqContainer.FullUrl; + reqContainer.JsonResponse = reqContainer.JsonResponse ?? msg; + var enhancedError = new Exception(msg, e); + Debug.LogException(enhancedError); + QueueRequestError(reqContainer); + } + } + + public void Update() + { + lock (ResultQueueTransferThread) + { + while (ResultQueueTransferThread.Count > 0) + { + var actionToQueue = ResultQueueTransferThread.Dequeue(); + ResultQueueMainThread.Enqueue(actionToQueue); + } + } + + while (ResultQueueMainThread.Count > 0) + { + var finishedRequest = ResultQueueMainThread.Dequeue(); + finishedRequest(); + } + } + + private static string ResponseToString(WebResponse webResponse) + { + if (webResponse == null) + return null; + + try + { + using (var responseStream = webResponse.GetResponseStream()) + { + if (responseStream == null) + return null; + using (var stream = new StreamReader(responseStream)) + { + return stream.ReadToEnd(); + } + } + } + catch (WebException webException) + { + try + { + using (var responseStream = webException.Response.GetResponseStream()) + { + if (responseStream == null) + return null; + using (var stream = new StreamReader(responseStream)) + { + return stream.ReadToEnd(); + } + } + } + catch (Exception e) + { + Debug.LogException(e); + return null; + } + } + catch (Exception e) + { + Debug.LogException(e); + return null; + } + } + + public int GetPendingMessages() + { + var count = 0; + lock (ActiveRequests) + count += ActiveRequests.Count + _activeCallCount; + lock (ResultQueueTransferThread) + count += ResultQueueTransferThread.Count; + return count; + } + } +} + +#endif diff --git a/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs.meta b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs.meta new file mode 100644 index 00000000..3ebab9de --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 18fd1a0daadd68d45aebf8c19cac2bda +timeCreated: 1466016486 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs b/Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs new file mode 100644 index 00000000..52486e69 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs @@ -0,0 +1,2081 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) 2011, The Outercurve Foundation. +// +// Licensed under the MIT License (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.opensource.org/licenses/mit-license.php +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me) +// https://github.com/facebook-csharp-sdk/simple-json +//----------------------------------------------------------------------- + +// VERSION: + +// NOTE: uncomment the following line to make SimpleJson class internal. +//#define SIMPLE_JSON_INTERNAL + +// NOTE: uncomment the following line to make JsonArray and JsonObject class internal. +//#define SIMPLE_JSON_OBJARRAYINTERNAL + +// NOTE: uncomment the following line to enable dynamic support. +//#define SIMPLE_JSON_DYNAMIC + +// NOTE: uncomment the following line to enable DataContract support. +//#define SIMPLE_JSON_DATACONTRACT + +// NOTE: uncomment the following line to enable IReadOnlyCollection and IReadOnlyList support. +//#define SIMPLE_JSON_READONLY_COLLECTIONS + +// NOTE: uncomment the following line if you are compiling under Windows Store app/library. +// usually already defined in properties +#if UNITY_WSA && UNITY_WP8 +#define NETFX_CORE +#endif + +// If you are targetting WinStore, WP8 and NET4.5+ PCL make sure to +#if UNITY_WP8 || UNITY_WP8_1 || UNITY_WSA +// #define SIMPLE_JSON_TYPEINFO +#endif + +// original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html + +#if NETFX_CORE +#define SIMPLE_JSON_TYPEINFO +#endif + +using System; +using System.CodeDom.Compiler; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +#if SIMPLE_JSON_DYNAMIC +using System.Dynamic; +#endif +using System.Globalization; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; +using System.Text; + +// ReSharper disable LoopCanBeConvertedToQuery +// ReSharper disable RedundantExplicitArrayCreation +// ReSharper disable SuggestUseVarKeywordEvident +namespace PlayFab.Json +{ + public enum NullValueHandling + { + Include, // Include null values when serializing and deserializing objects + Ignore // Ignore null values when serializing and deserializing objects + } + + /// + /// Customize the json output of a field or property + /// + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class JsonProperty : Attribute + { + public string PropertyName = null; + public NullValueHandling NullValueHandling = NullValueHandling.Include; + } + + /// + /// Represents the json array. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonArray : List + { + /// + /// Initializes a new instance of the class. + /// + public JsonArray() { } + + /// + /// Initializes a new instance of the class. + /// + /// The capacity of the json array. + public JsonArray(int capacity) : base(capacity) { } + + /// + /// The json representation of the array. + /// + /// The json representation of the array. + public override string ToString() + { + return PlayFabSimpleJson.SerializeObject(this) ?? string.Empty; + } + } + + /// + /// Represents the json object. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonObject : +#if SIMPLE_JSON_DYNAMIC + DynamicObject, +#endif + IDictionary + { + private const int DICTIONARY_DEFAULT_SIZE = 16; + /// + /// The internal member dictionary. + /// + private readonly Dictionary _members; + + /// + /// Initializes a new instance of . + /// + public JsonObject() + { + _members = new Dictionary(DICTIONARY_DEFAULT_SIZE); + } + + /// + /// Initializes a new instance of . + /// + /// The implementation to use when comparing keys, or null to use the default for the type of the key. + public JsonObject(IEqualityComparer comparer) + { + _members = new Dictionary(comparer); + } + + /// + /// Gets the at the specified index. + /// + /// + public object this[int index] + { + get { return GetAtIndex(_members, index); } + } + + internal static object GetAtIndex(IDictionary obj, int index) + { + if (obj == null) + throw new ArgumentNullException("obj"); + if (index >= obj.Count) + throw new ArgumentOutOfRangeException("index"); + int i = 0; + foreach (KeyValuePair o in obj) + if (i++ == index) return o.Value; + return null; + } + + /// + /// Adds the specified key. + /// + /// The key. + /// The value. + public void Add(string key, object value) + { + _members.Add(key, value); + } + + /// + /// Determines whether the specified key contains key. + /// + /// The key. + /// + /// true if the specified key contains key; otherwise, false. + /// + public bool ContainsKey(string key) + { + return _members.ContainsKey(key); + } + + /// + /// Gets the keys. + /// + /// The keys. + public ICollection Keys + { + get { return _members.Keys; } + } + + /// + /// Removes the specified key. + /// + /// The key. + /// + public bool Remove(string key) + { + return _members.Remove(key); + } + + /// + /// Tries the get value. + /// + /// The key. + /// The value. + /// + public bool TryGetValue(string key, out object value) + { + return _members.TryGetValue(key, out value); + } + + /// + /// Gets the values. + /// + /// The values. + public ICollection Values + { + get { return _members.Values; } + } + + /// + /// Gets or sets the with the specified key. + /// + /// + public object this[string key] + { + get { return _members[key]; } + set { _members[key] = value; } + } + + /// + /// Adds the specified item. + /// + /// The item. + public void Add(KeyValuePair item) + { + _members.Add(item.Key, item.Value); + } + + /// + /// Clears this instance. + /// + public void Clear() + { + _members.Clear(); + } + + /// + /// Determines whether [contains] [the specified item]. + /// + /// The item. + /// + /// true if [contains] [the specified item]; otherwise, false. + /// + public bool Contains(KeyValuePair item) + { + object value; + return _members.TryGetValue(item.Key, out value) && value == item.Value; + } + + /// + /// Copies to. + /// + /// The array. + /// Index of the array. + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + if (array == null) throw new ArgumentNullException("array"); + int num = Count; + foreach (KeyValuePair kvp in _members) + { + array[arrayIndex++] = kvp; + if (--num <= 0) + return; + } + } + + /// + /// Gets the count. + /// + /// The count. + public int Count + { + get { return _members.Count; } + } + + /// + /// Gets a value indicating whether this instance is read only. + /// + /// + /// true if this instance is read only; otherwise, false. + /// + public bool IsReadOnly + { + get { return false; } + } + + /// + /// Removes the specified item. + /// + /// The item. + /// + public bool Remove(KeyValuePair item) + { + return _members.Remove(item.Key); + } + + /// + /// Gets the enumerator. + /// + /// + public IEnumerator> GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// + /// An object that can be used to iterate through the collection. + /// + IEnumerator IEnumerable.GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns a json that represents the current . + /// + /// + /// A json that represents the current . + /// + public override string ToString() + { + return PlayFabSimpleJson.SerializeObject(_members); + } + +#if SIMPLE_JSON_DYNAMIC + /// + /// Provides implementation for type conversion operations. Classes derived from the class can override this method to specify dynamic behavior for operations that convert an object from one type to another. + /// + /// Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the class, binder.Type returns the type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion. + /// The result of the type conversion operation. + /// + /// Alwasy returns true. + /// + public override bool TryConvert(ConvertBinder binder, out object result) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + Type targetType = binder.Type; + + if ((targetType == typeof(IEnumerable)) || + (targetType == typeof(IEnumerable>)) || + (targetType == typeof(IDictionary)) || + (targetType == typeof(IDictionary))) + { + result = this; + return true; + } + + return base.TryConvert(binder, out result); + } + + /// + /// Provides the implementation for operations that delete an object member. This method is not intended for use in C# or Visual Basic. + /// + /// Provides information about the deletion. + /// + /// Alwasy returns true. + /// + public override bool TryDeleteMember(DeleteMemberBinder binder) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + return _members.Remove(binder.Name); + } + + /// + /// Provides the implementation for operations that get a value by index. Classes derived from the class can override this method to specify dynamic behavior for indexing operations. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, is equal to 3. + /// The result of the index operation. + /// + /// Alwasy returns true. + /// + public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + result = ((IDictionary)this)[(string)indexes[0]]; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that get member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as getting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The result of the get operation. For example, if the method is called for a property, you can assign the property value to . + /// + /// Alwasy returns true. + /// + public override bool TryGetMember(GetMemberBinder binder, out object result) + { + object value; + if (_members.TryGetValue(binder.Name, out value)) + { + result = value; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that set a value by index. Classes derived from the class can override this method to specify dynamic behavior for operations that access objects by a specified index. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 3. + /// The value to set to the object that has the specified index. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 10. + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown. + /// + public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + ((IDictionary)this)[(string)indexes[0]] = value; + return true; + } + return base.TrySetIndex(binder, indexes, value); + } + + /// + /// Provides the implementation for operations that set member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as setting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, the is "Test". + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.) + /// + public override bool TrySetMember(SetMemberBinder binder, object value) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + _members[binder.Name] = value; + return true; + } + + /// + /// Returns the enumeration of all dynamic member names. + /// + /// + /// A sequence that contains dynamic member names. + /// + public override IEnumerable GetDynamicMemberNames() + { + foreach (var key in Keys) + yield return key; + } +#endif + } + + /// + /// Private. Do not call from client code. + /// This class encodes and decodes JSON strings. + /// Spec. details, see http://www.json.org/ + /// + /// JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). + /// All numbers are parsed to doubles. + /// + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + static class PlayFabSimpleJson + { + private enum TokenType : byte + { + NONE = 0, + CURLY_OPEN = 1, + CURLY_CLOSE = 2, + SQUARED_OPEN = 3, + SQUARED_CLOSE = 4, + COLON = 5, + COMMA = 6, + STRING = 7, + NUMBER = 8, + TRUE = 9, + FALSE = 10, + NULL = 11, + } + private const int BUILDER_INIT = 2000; + + private static readonly char[] EscapeTable; + private static readonly char[] EscapeCharacters = new char[] { '"', '\\', '\b', '\f', '\n', '\r', '\t' }; + // private static readonly string EscapeCharactersString = new string(EscapeCharacters); + internal static readonly List NumberTypes = new List { + typeof(bool), typeof(byte), typeof(ushort), typeof(uint), typeof(ulong), typeof(sbyte), typeof(short), typeof(int), typeof(long), typeof(double), typeof(float), typeof(decimal) + }; + + // Performance stuff + [ThreadStatic] + private static StringBuilder _serializeObjectBuilder; + [ThreadStatic] + private static StringBuilder _parseStringBuilder; + + static PlayFabSimpleJson() + { + EscapeTable = new char[93]; + EscapeTable['"'] = '"'; + EscapeTable['\\'] = '\\'; + EscapeTable['\b'] = 'b'; + EscapeTable['\f'] = 'f'; + EscapeTable['\n'] = 'n'; + EscapeTable['\r'] = 'r'; + EscapeTable['\t'] = 't'; + } + + /// + /// Parses the string json into a value + /// + /// A JSON string. + /// An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false + public static object DeserializeObject(string json) + { + object obj; + if (TryDeserializeObject(json, out obj)) + return obj; + throw new SerializationException("Invalid JSON string"); + } + + /// + /// Try parsing the json string into a value. + /// + /// + /// A JSON string. + /// + /// + /// The object. + /// + /// + /// Returns true if successfull otherwise false. + /// + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + public static bool TryDeserializeObject(string json, out object obj) + { + bool success = true; + if (json != null) + { + int index = 0; + obj = ParseValue(json, ref index, ref success); + } + else + obj = null; + + return success; + } + + public static object DeserializeObject(string json, Type type, IJsonSerializerStrategy jsonSerializerStrategy = null) + { + object jsonObject = DeserializeObject(json); + if (type == null || jsonObject != null && ReflectionUtils.IsAssignableFrom(jsonObject.GetType(), type)) + return jsonObject; + return (jsonSerializerStrategy ?? CurrentJsonSerializerStrategy).DeserializeObject(jsonObject, type); + } + + public static T DeserializeObject(string json, IJsonSerializerStrategy jsonSerializerStrategy = null) + { + return (T)DeserializeObject(json, typeof(T), jsonSerializerStrategy); + } + + /// + /// Converts a IDictionary<string,object> / IList<object> object into a JSON string + /// + /// A IDictionary<string,object> / IList<object> + /// Serializer strategy to use + /// A JSON encoded string, or null if object 'json' is not serializable + public static string SerializeObject(object json, IJsonSerializerStrategy jsonSerializerStrategy = null) + { + if (_serializeObjectBuilder == null) + _serializeObjectBuilder = new StringBuilder(BUILDER_INIT); + _serializeObjectBuilder.Length = 0; + + if (jsonSerializerStrategy == null) + jsonSerializerStrategy = CurrentJsonSerializerStrategy; + + bool success = SerializeValue(jsonSerializerStrategy, json, _serializeObjectBuilder); + return (success ? _serializeObjectBuilder.ToString() : null); + } + + public static string EscapeToJavascriptString(string jsonString) + { + if (string.IsNullOrEmpty(jsonString)) + return jsonString; + + StringBuilder sb = new StringBuilder(); + char c; + + for (int i = 0; i < jsonString.Length;) + { + c = jsonString[i++]; + + if (c == '\\') + { + int remainingLength = jsonString.Length - i; + if (remainingLength >= 2) + { + char lookahead = jsonString[i]; + if (lookahead == '\\') + { + sb.Append('\\'); + ++i; + } + else if (lookahead == '"') + { + sb.Append("\""); + ++i; + } + else if (lookahead == 't') + { + sb.Append('\t'); + ++i; + } + else if (lookahead == 'b') + { + sb.Append('\b'); + ++i; + } + else if (lookahead == 'n') + { + sb.Append('\n'); + ++i; + } + else if (lookahead == 'r') + { + sb.Append('\r'); + ++i; + } + } + } + else + { + sb.Append(c); + } + } + return sb.ToString(); + } + + static IDictionary ParseObject(string json, ref int index, ref bool success) + { + IDictionary table = new JsonObject(); + TokenType token; + + // { + NextToken(json, ref index); + + bool done = false; + while (!done) + { + token = LookAhead(json, index); + if (token == TokenType.NONE) + { + success = false; + return null; + } + else if (token == TokenType.COMMA) + NextToken(json, ref index); + else if (token == TokenType.CURLY_CLOSE) + { + NextToken(json, ref index); + return table; + } + else + { + // name + string name = ParseString(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + // : + token = NextToken(json, ref index); + if (token != TokenType.COLON) + { + success = false; + return null; + } + // value + object value = ParseValue(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + table[name] = value; + } + } + return table; + } + + static JsonArray ParseArray(string json, ref int index, ref bool success) + { + JsonArray array = new JsonArray(); + + // [ + NextToken(json, ref index); + + bool done = false; + while (!done) + { + TokenType token = LookAhead(json, index); + if (token == TokenType.NONE) + { + success = false; + return null; + } + else if (token == TokenType.COMMA) + NextToken(json, ref index); + else if (token == TokenType.SQUARED_CLOSE) + { + NextToken(json, ref index); + break; + } + else + { + object value = ParseValue(json, ref index, ref success); + if (!success) + return null; + array.Add(value); + } + } + return array; + } + + static object ParseValue(string json, ref int index, ref bool success) + { + switch (LookAhead(json, index)) + { + case TokenType.STRING: + return ParseString(json, ref index, ref success); + case TokenType.NUMBER: + return ParseNumber(json, ref index, ref success); + case TokenType.CURLY_OPEN: + return ParseObject(json, ref index, ref success); + case TokenType.SQUARED_OPEN: + return ParseArray(json, ref index, ref success); + case TokenType.TRUE: + NextToken(json, ref index); + return true; + case TokenType.FALSE: + NextToken(json, ref index); + return false; + case TokenType.NULL: + NextToken(json, ref index); + return null; + case TokenType.NONE: + break; + } + success = false; + return null; + } + + static string ParseString(string json, ref int index, ref bool success) + { + if (_parseStringBuilder == null) + _parseStringBuilder = new StringBuilder(BUILDER_INIT); + _parseStringBuilder.Length = 0; + + EatWhitespace(json, ref index); + + // " + char c = json[index++]; + bool complete = false; + while (!complete) + { + if (index == json.Length) + break; + + c = json[index++]; + if (c == '"') + { + complete = true; + break; + } + else if (c == '\\') + { + if (index == json.Length) + break; + c = json[index++]; + if (c == '"') + _parseStringBuilder.Append('"'); + else if (c == '\\') + _parseStringBuilder.Append('\\'); + else if (c == '/') + _parseStringBuilder.Append('/'); + else if (c == 'b') + _parseStringBuilder.Append('\b'); + else if (c == 'f') + _parseStringBuilder.Append('\f'); + else if (c == 'n') + _parseStringBuilder.Append('\n'); + else if (c == 'r') + _parseStringBuilder.Append('\r'); + else if (c == 't') + _parseStringBuilder.Append('\t'); + else if (c == 'u') + { + int remainingLength = json.Length - index; + if (remainingLength >= 4) + { + // parse the 32 bit hex into an integer codepoint + uint codePoint; + if (!(success = UInt32.TryParse(json.Substring(index, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codePoint))) + return ""; + + // convert the integer codepoint to a unicode char and add to string + if (0xD800 <= codePoint && codePoint <= 0xDBFF) // if high surrogate + { + index += 4; // skip 4 chars + remainingLength = json.Length - index; + if (remainingLength >= 6) + { + uint lowCodePoint; + if (json.Substring(index, 2) == "\\u" && UInt32.TryParse(json.Substring(index + 2, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out lowCodePoint)) + { + if (0xDC00 <= lowCodePoint && lowCodePoint <= 0xDFFF) // if low surrogate + { + _parseStringBuilder.Append((char)codePoint); + _parseStringBuilder.Append((char)lowCodePoint); + index += 6; // skip 6 chars + continue; + } + } + } + success = false; // invalid surrogate pair + return ""; + } + _parseStringBuilder.Append(ConvertFromUtf32((int)codePoint)); + // skip 4 chars + index += 4; + } + else + break; + } + } + else + _parseStringBuilder.Append(c); + } + if (!complete) + { + success = false; + return null; + } + return _parseStringBuilder.ToString(); + } + + private static string ConvertFromUtf32(int utf32) + { + // http://www.java2s.com/Open-Source/CSharp/2.6.4-mono-.net-core/System/System/Char.cs.htm + if (utf32 < 0 || utf32 > 0x10FFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must be from 0 to 0x10FFFF."); + if (0xD800 <= utf32 && utf32 <= 0xDFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must not be in surrogate pair range."); + if (utf32 < 0x10000) + return new string((char)utf32, 1); + utf32 -= 0x10000; + return new string(new char[] { (char)((utf32 >> 10) + 0xD800), (char)(utf32 % 0x0400 + 0xDC00) }); + } + + static object ParseNumber(string json, ref int index, ref bool success) + { + EatWhitespace(json, ref index); + int lastIndex = GetLastIndexOfNumber(json, index); + int charLength = (lastIndex - index) + 1; + object returnNumber; + string str = json.Substring(index, charLength); + if (str.IndexOf(".", StringComparison.OrdinalIgnoreCase) != -1 || str.IndexOf("e", StringComparison.OrdinalIgnoreCase) != -1) + { + double number; + success = double.TryParse(json.Substring(index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + else if (str.IndexOf("-", StringComparison.OrdinalIgnoreCase) == -1) + { + ulong number; + success = ulong.TryParse(json.Substring(index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + else + { + long number; + success = long.TryParse(json.Substring(index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + index = lastIndex + 1; + return returnNumber; + } + + static int GetLastIndexOfNumber(string json, int index) + { + int lastIndex; + for (lastIndex = index; lastIndex < json.Length; lastIndex++) + if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) break; + return lastIndex - 1; + } + + static void EatWhitespace(string json, ref int index) + { + for (; index < json.Length; index++) + if (" \t\n\r\b\f".IndexOf(json[index]) == -1) break; + } + + static TokenType LookAhead(string json, int index) + { + int saveIndex = index; + return NextToken(json, ref saveIndex); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + static TokenType NextToken(string json, ref int index) + { + EatWhitespace(json, ref index); + if (index == json.Length) + return TokenType.NONE; + char c = json[index]; + index++; + switch (c) + { + case '{': + return TokenType.CURLY_OPEN; + case '}': + return TokenType.CURLY_CLOSE; + case '[': + return TokenType.SQUARED_OPEN; + case ']': + return TokenType.SQUARED_CLOSE; + case ',': + return TokenType.COMMA; + case '"': + return TokenType.STRING; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + return TokenType.NUMBER; + case ':': + return TokenType.COLON; + } + index--; + int remainingLength = json.Length - index; + // false + if (remainingLength >= 5) + { + if (json[index] == 'f' && json[index + 1] == 'a' && json[index + 2] == 'l' && json[index + 3] == 's' && json[index + 4] == 'e') + { + index += 5; + return TokenType.FALSE; + } + } + // true + if (remainingLength >= 4) + { + if (json[index] == 't' && json[index + 1] == 'r' && json[index + 2] == 'u' && json[index + 3] == 'e') + { + index += 4; + return TokenType.TRUE; + } + } + // null + if (remainingLength >= 4) + { + if (json[index] == 'n' && json[index + 1] == 'u' && json[index + 2] == 'l' && json[index + 3] == 'l') + { + index += 4; + return TokenType.NULL; + } + } + return TokenType.NONE; + } + + static bool SerializeValue(IJsonSerializerStrategy jsonSerializerStrategy, object value, StringBuilder builder) + { + bool success = true; + string stringValue = value as string; + if (value == null) + builder.Append("null"); + else if (stringValue != null) + success = SerializeString(stringValue, builder); + else + { + IDictionary dict = value as IDictionary; + Type type = value.GetType(); + Type[] genArgs = ReflectionUtils.GetGenericTypeArguments(type); + var isStringKeyDictionary = type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>) && genArgs[0] == typeof(string); + if (isStringKeyDictionary) + { + var strDictValue = value as IDictionary; + success = SerializeObject(jsonSerializerStrategy, strDictValue.Keys, strDictValue.Values, builder); + } + else if (dict != null) + { + success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder); + } + else + { + IDictionary stringDictionary = value as IDictionary; + if (stringDictionary != null) + { + success = SerializeObject(jsonSerializerStrategy, stringDictionary.Keys, stringDictionary.Values, builder); + } + else + { + IEnumerable enumerableValue = value as IEnumerable; + if (enumerableValue != null) + success = SerializeArray(jsonSerializerStrategy, enumerableValue, builder); + else if (IsNumeric(value)) + success = SerializeNumber(value, builder); + else if (value is bool) + builder.Append((bool)value ? "true" : "false"); + else + { + object serializedObject; + success = jsonSerializerStrategy.TrySerializeNonPrimitiveObject(value, out serializedObject); + if (success) + SerializeValue(jsonSerializerStrategy, serializedObject, builder); + } + } + } + } + return success; + } + + static bool SerializeObject(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable keys, IEnumerable values, StringBuilder builder) + { + builder.Append("{"); + IEnumerator ke = keys.GetEnumerator(); + IEnumerator ve = values.GetEnumerator(); + bool first = true; + while (ke.MoveNext() && ve.MoveNext()) + { + object key = ke.Current; + object value = ve.Current; + if (!first) + builder.Append(","); + string stringKey = key as string; + if (stringKey != null) + SerializeString(stringKey, builder); + else + if (!SerializeValue(jsonSerializerStrategy, value, builder)) return false; + builder.Append(":"); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + builder.Append("}"); + return true; + } + + static bool SerializeArray(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable anArray, StringBuilder builder) + { + builder.Append("["); + bool first = true; + foreach (object value in anArray) + { + if (!first) + builder.Append(","); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + builder.Append("]"); + return true; + } + + static bool SerializeString(string aString, StringBuilder builder) + { + // Happy path if there's nothing to be escaped. IndexOfAny is highly optimized (and unmanaged) + if (aString.IndexOfAny(EscapeCharacters) == -1) + { + builder.Append('"'); + builder.Append(aString); + builder.Append('"'); + + return true; + } + + builder.Append('"'); + int safeCharacterCount = 0; + char[] charArray = aString.ToCharArray(); + + for (int i = 0; i < charArray.Length; i++) + { + char c = charArray[i]; + + // Non ascii characters are fine, buffer them up and send them to the builder + // in larger chunks if possible. The escape table is a 1:1 translation table + // with \0 [default(char)] denoting a safe character. + if (c >= EscapeTable.Length || EscapeTable[c] == default(char)) + { + safeCharacterCount++; + } + else + { + if (safeCharacterCount > 0) + { + builder.Append(charArray, i - safeCharacterCount, safeCharacterCount); + safeCharacterCount = 0; + } + + builder.Append('\\'); + builder.Append(EscapeTable[c]); + } + } + + if (safeCharacterCount > 0) + { + builder.Append(charArray, charArray.Length - safeCharacterCount, safeCharacterCount); + } + + builder.Append('"'); + return true; + } + + static bool SerializeNumber(object number, StringBuilder builder) + { + if (number is decimal) + builder.Append(((decimal)number).ToString("R", CultureInfo.InvariantCulture)); + else if (number is double) + builder.Append(((double)number).ToString("R", CultureInfo.InvariantCulture)); + else if (number is float) + builder.Append(((float)number).ToString("R", CultureInfo.InvariantCulture)); + else if (NumberTypes.IndexOf(number.GetType()) != -1) + builder.Append(number); + return true; + } + + /// + /// Determines if a given object is numeric in any way + /// (can be integer, double, null, etc). + /// + static bool IsNumeric(object value) + { + if (value is sbyte) return true; + if (value is byte) return true; + if (value is short) return true; + if (value is ushort) return true; + if (value is int) return true; + if (value is uint) return true; + if (value is long) return true; + if (value is ulong) return true; + if (value is float) return true; + if (value is double) return true; + if (value is decimal) return true; + return false; + } + + private static IJsonSerializerStrategy _currentJsonSerializerStrategy; + public static IJsonSerializerStrategy CurrentJsonSerializerStrategy + { + get + { + return _currentJsonSerializerStrategy ?? + (_currentJsonSerializerStrategy = +#if SIMPLE_JSON_DATACONTRACT + DataContractJsonSerializerStrategy +#else + PocoJsonSerializerStrategy +#endif +); + } + set + { + _currentJsonSerializerStrategy = value; + } + } + + private static PocoJsonSerializerStrategy _pocoJsonSerializerStrategy; + [EditorBrowsable(EditorBrowsableState.Advanced)] + public static PocoJsonSerializerStrategy PocoJsonSerializerStrategy + { + get + { + return _pocoJsonSerializerStrategy ?? (_pocoJsonSerializerStrategy = new PocoJsonSerializerStrategy()); + } + } + +#if SIMPLE_JSON_DATACONTRACT + + private static DataContractJsonSerializerStrategy _dataContractJsonSerializerStrategy; + [System.ComponentModel.EditorBrowsable(EditorBrowsableState.Advanced)] + public static DataContractJsonSerializerStrategy DataContractJsonSerializerStrategy + { + get + { + return _dataContractJsonSerializerStrategy ?? (_dataContractJsonSerializerStrategy = new DataContractJsonSerializerStrategy()); + } + } + +#endif + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + interface IJsonSerializerStrategy + { + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + bool TrySerializeNonPrimitiveObject(object input, out object output); + object DeserializeObject(object value, Type type); + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class PocoJsonSerializerStrategy : IJsonSerializerStrategy + { + internal IDictionary ConstructorCache; + internal IDictionary> GetCache; + internal IDictionary>> SetCache; + + internal static readonly Type[] EmptyTypes = new Type[0]; + internal static readonly Type[] ArrayConstructorParameterTypes = new Type[] { typeof(int) }; + + private static readonly string[] Iso8601Format = new string[] + { + @"yyyy-MM-dd\THH:mm:ss.FFFFFFF\Z", + @"yyyy-MM-dd\THH:mm:ss\Z", + @"yyyy-MM-dd\THH:mm:ssK" + }; + + public PocoJsonSerializerStrategy() + { + ConstructorCache = new ReflectionUtils.ThreadSafeDictionary(ContructorDelegateFactory); + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + protected virtual string MapClrMemberNameToJsonFieldName(MemberInfo memberInfo) + { + // TODO: Optimize and/or cache + foreach (JsonProperty eachAttr in memberInfo.GetCustomAttributes(typeof(JsonProperty), true)) + if (!string.IsNullOrEmpty(eachAttr.PropertyName)) + return eachAttr.PropertyName; + return memberInfo.Name; + } + + protected virtual void MapClrMemberNameToJsonFieldName(MemberInfo memberInfo, out string jsonName, out JsonProperty jsonProp) + { + jsonName = memberInfo.Name; + jsonProp = null; + // TODO: Optimize and/or cache + foreach (JsonProperty eachAttr in memberInfo.GetCustomAttributes(typeof(JsonProperty), true)) + { + jsonProp = eachAttr; + if (!string.IsNullOrEmpty(eachAttr.PropertyName)) + jsonName = eachAttr.PropertyName; + } + } + + internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key) + { + return ReflectionUtils.GetContructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes); + } + + internal virtual IDictionary GetterValueFactory(Type type) + { + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (getMethod.IsStatic || !getMethod.IsPublic) + continue; + result[propertyInfo] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[fieldInfo] = ReflectionUtils.GetGetMethod(fieldInfo); + } + return result; + } + + internal virtual IDictionary> SetterValueFactory(Type type) + { + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (setMethod.IsStatic || !setMethod.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(propertyInfo)] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsInitOnly || fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(fieldInfo)] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + return result; + } + + public virtual bool TrySerializeNonPrimitiveObject(object input, out object output) + { + return TrySerializeKnownTypes(input, out output) || TrySerializeUnknownTypes(input, out output); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual object DeserializeObject(object value, Type type) + { + if (type == null) throw new ArgumentNullException("type"); + if (value != null && type.IsInstanceOfType(value)) return value; + + string str = value as string; + if (type == typeof(Guid) && string.IsNullOrEmpty(str)) + return default(Guid); + + if (value == null) + return null; + + object obj = null; + + if (str != null) + { + if (str.Length != 0) // We know it can't be null now. + { + if (type == typeof(DateTime) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTime))) + return DateTime.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(DateTimeOffset) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTimeOffset))) + return DateTimeOffset.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(Guid) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid))) + return new Guid(str); + if (type == typeof(Uri)) + { + bool isValid = Uri.IsWellFormedUriString(str, UriKind.RelativeOrAbsolute); + + Uri result; + if (isValid && Uri.TryCreate(str, UriKind.RelativeOrAbsolute, out result)) + return result; + + return null; + } + + if (type == typeof(string)) + return str; + + return Convert.ChangeType(str, type, CultureInfo.InvariantCulture); + } + else + { + if (type == typeof(Guid)) + obj = default(Guid); + else if (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + obj = null; + else + obj = str; + } + // Empty string case + if (!ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + return str; + } + else if (value is bool) + return value; + + bool valueIsLong = value is long; + bool valueIsUlong = value is ulong; + bool valueIsDouble = value is double; + Type nullableType = Nullable.GetUnderlyingType(type); + if (nullableType != null && PlayFabSimpleJson.NumberTypes.IndexOf(nullableType) != -1) + type = nullableType; // Just use the regular type for the conversion + bool isNumberType = PlayFabSimpleJson.NumberTypes.IndexOf(type) != -1; + bool isEnumType = type.GetTypeInfo().IsEnum; + if ((valueIsLong && type == typeof(long)) || (valueIsUlong && type == typeof(ulong)) || (valueIsDouble && type == typeof(double))) + return value; + if ((valueIsLong || valueIsUlong || valueIsDouble) && isEnumType) + return Enum.ToObject(type, Convert.ChangeType(value, Enum.GetUnderlyingType(type), CultureInfo.InvariantCulture)); + if ((valueIsLong || valueIsUlong || valueIsDouble) && isNumberType) + return Convert.ChangeType(value, type, CultureInfo.InvariantCulture); + + IDictionary objects = value as IDictionary; + if (objects != null) + { + IDictionary jsonObject = objects; + + if (ReflectionUtils.IsTypeDictionary(type)) + { + // if dictionary then + Type[] types = ReflectionUtils.GetGenericTypeArguments(type); + Type keyType = types[0]; + Type valueType = types[1]; + + Type genericType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); + + IDictionary dict = (IDictionary)ConstructorCache[genericType](); + + foreach (KeyValuePair kvp in jsonObject) + dict.Add(kvp.Key, DeserializeObject(kvp.Value, valueType)); + + obj = dict; + } + else + { + if (type == typeof(object)) + obj = value; + else + { + obj = ConstructorCache[type](); + foreach (KeyValuePair> setter in SetCache[type]) + { + object jsonValue; + if (jsonObject.TryGetValue(setter.Key, out jsonValue)) + { + jsonValue = DeserializeObject(jsonValue, setter.Value.Key); + setter.Value.Value(obj, jsonValue); + } + } + } + } + } + else + { + IList valueAsList = value as IList; + if (valueAsList != null) + { + IList jsonObject = valueAsList; + IList list = null; + + if (type.IsArray) + { + list = (IList)ConstructorCache[type](jsonObject.Count); + int i = 0; + foreach (object o in jsonObject) + list[i++] = DeserializeObject(o, type.GetElementType()); + } + else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type) || type == typeof(object)) + { + Type innerType = ReflectionUtils.GetGenericListElementType(type); + ReflectionUtils.ConstructorDelegate ctrDelegate = null; + if (type != typeof(object)) + ctrDelegate = ConstructorCache[type]; + if (ctrDelegate == null) + ctrDelegate = ConstructorCache[typeof(List<>).MakeGenericType(innerType)]; + list = (IList)ctrDelegate(); + foreach (object o in jsonObject) + list.Add(DeserializeObject(o, innerType)); + } + obj = list; + } + return obj; + } + if (ReflectionUtils.IsNullableType(type)) + return ReflectionUtils.ToNullableType(obj, type); + return obj; + } + + protected virtual object SerializeEnum(Enum p) + { + return Convert.ToDouble(p, CultureInfo.InvariantCulture); + } + + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeKnownTypes(object input, out object output) + { + bool returnValue = true; + if (input is DateTime) + output = ((DateTime)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is DateTimeOffset) + output = ((DateTimeOffset)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is Guid) + output = ((Guid)input).ToString("D"); + else if (input is Uri) + output = input.ToString(); + else + { + Enum inputEnum = input as Enum; + if (inputEnum != null) + output = SerializeEnum(inputEnum); + else + { + returnValue = false; + output = null; + } + } + return returnValue; + } + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeUnknownTypes(object input, out object output) + { + if (input == null) throw new ArgumentNullException("input"); + output = null; + Type type = input.GetType(); + if (type.FullName == null) + return false; + IDictionary obj = new JsonObject(); + IDictionary getters = GetCache[type]; + foreach (KeyValuePair getter in getters) + { + if (getter.Value == null) + continue; + string jsonKey; + JsonProperty jsonProp; + MapClrMemberNameToJsonFieldName(getter.Key, out jsonKey, out jsonProp); + if (obj.ContainsKey(jsonKey)) + throw new Exception("The given key is defined multiple times in the same type: " + input.GetType().Name + "." + jsonKey); + object value = getter.Value(input); + if (jsonProp == null || jsonProp.NullValueHandling == NullValueHandling.Include || value != null) + obj.Add(jsonKey, value); + } + output = obj; + return true; + } + } + +#if SIMPLE_JSON_DATACONTRACT + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class DataContractJsonSerializerStrategy : PocoJsonSerializerStrategy + { + public DataContractJsonSerializerStrategy() + { + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + internal override IDictionary GetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.GetterValueFactory(type); + string jsonKey; + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (!getMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(fieldInfo); + } + return result; + } + + internal override IDictionary> SetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.SetterValueFactory(type); + string jsonKey; + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (!setMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsInitOnly && !fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + // todo implement sorting for DATACONTRACT. + return result; + } + + private static bool CanAdd(MemberInfo info, out string jsonKey) + { + jsonKey = null; + if (ReflectionUtils.GetAttribute(info, typeof(IgnoreDataMemberAttribute)) != null) + return false; + DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)ReflectionUtils.GetAttribute(info, typeof(DataMemberAttribute)); + if (dataMemberAttribute == null) + return false; + jsonKey = string.IsNullOrEmpty(dataMemberAttribute.Name) ? info.Name : dataMemberAttribute.Name; + return true; + } + } + +#endif + + // This class is meant to be copied into other libraries. So we want to exclude it from Code Analysis rules + // that might be in place in the target project. + [GeneratedCode("reflection-utils", "1.0.0")] +#if SIMPLE_JSON_REFLECTION_UTILS_PUBLIC + public +#else + internal +#endif + class ReflectionUtils + { + private static readonly object[] EmptyObjects = new object[0]; + + public delegate object GetDelegate(object source); + public delegate void SetDelegate(object source, object value); + public delegate object ConstructorDelegate(params object[] args); + + public delegate TValue ThreadSafeDictionaryValueFactory(TKey key); + + [ThreadStatic] + private static object[] _1ObjArray; + +#if SIMPLE_JSON_TYPEINFO + public static TypeInfo GetTypeInfo(Type type) + { + return type.GetTypeInfo(); + } +#else + public static Type GetTypeInfo(Type type) + { + return type; + } +#endif + + public static Attribute GetAttribute(MemberInfo info, Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (info == null || type == null || !info.IsDefined(type)) + return null; + return info.GetCustomAttribute(type); +#else + if (info == null || type == null || !Attribute.IsDefined(info, type)) + return null; + return Attribute.GetCustomAttribute(info, type); +#endif + } + + public static Type GetGenericListElementType(Type type) + { + if (type == typeof(object)) + return type; + + IEnumerable interfaces; +#if SIMPLE_JSON_TYPEINFO + interfaces = type.GetTypeInfo().ImplementedInterfaces; +#else + interfaces = type.GetInterfaces(); +#endif + foreach (Type implementedInterface in interfaces) + { + if (IsTypeGeneric(implementedInterface) && + implementedInterface.GetGenericTypeDefinition() == typeof(IList<>)) + { + return GetGenericTypeArguments(implementedInterface)[0]; + } + } + return GetGenericTypeArguments(type)[0]; + } + + public static Attribute GetAttribute(Type objectType, Type attributeType) + { + +#if SIMPLE_JSON_TYPEINFO + if (objectType == null || attributeType == null || !objectType.GetTypeInfo().IsDefined(attributeType)) + return null; + return objectType.GetTypeInfo().GetCustomAttribute(attributeType); +#else + if (objectType == null || attributeType == null || !Attribute.IsDefined(objectType, attributeType)) + return null; + return Attribute.GetCustomAttribute(objectType, attributeType); +#endif + } + + public static Type[] GetGenericTypeArguments(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().GenericTypeArguments; +#else + return type.GetGenericArguments(); +#endif + } + + public static bool IsTypeGeneric(Type type) + { + return GetTypeInfo(type).IsGenericType; + } + + public static bool IsTypeGenericeCollectionInterface(Type type) + { + if (!IsTypeGeneric(type)) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + + return (genericDefinition == typeof(IList<>) + || genericDefinition == typeof(ICollection<>) + || genericDefinition == typeof(IEnumerable<>) +#if SIMPLE_JSON_READONLY_COLLECTIONS + || genericDefinition == typeof(IReadOnlyCollection<>) + || genericDefinition == typeof(IReadOnlyList<>) +#endif +); + } + + public static bool IsAssignableFrom(Type type1, Type type2) + { + return GetTypeInfo(type1).IsAssignableFrom(GetTypeInfo(type2)); + } + + public static bool IsTypeDictionary(Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (typeof(IDictionary<,>).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())) + return true; +#else + if (typeof(System.Collections.IDictionary).IsAssignableFrom(type)) + return true; +#endif + if (!GetTypeInfo(type).IsGenericType) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + return genericDefinition == typeof(IDictionary<,>) || genericDefinition == typeof(Dictionary<,>); + } + + public static bool IsNullableType(Type type) + { + return GetTypeInfo(type).IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); + } + + public static object ToNullableType(object obj, Type nullableType) + { + return obj == null ? null : Convert.ChangeType(obj, Nullable.GetUnderlyingType(nullableType), CultureInfo.InvariantCulture); + } + + public static bool IsValueType(Type type) + { + return GetTypeInfo(type).IsValueType; + } + + public static IEnumerable GetConstructors(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().DeclaredConstructors; +#else + return type.GetConstructors(); +#endif + } + + public static ConstructorInfo GetConstructorInfo(Type type, params Type[] argsType) + { + IEnumerable constructorInfos = GetConstructors(type); + int i; + bool matches; + foreach (ConstructorInfo constructorInfo in constructorInfos) + { + ParameterInfo[] parameters = constructorInfo.GetParameters(); + if (argsType.Length != parameters.Length) + continue; + + i = 0; + matches = true; + foreach (ParameterInfo parameterInfo in constructorInfo.GetParameters()) + { + if (parameterInfo.ParameterType != argsType[i]) + { + matches = false; + break; + } + } + + if (matches) + return constructorInfo; + } + + return null; + } + + public static IEnumerable GetProperties(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeProperties(); +#else + return type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static IEnumerable GetFields(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeFields(); +#else + return type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static MethodInfo GetGetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.GetMethod; +#else + return propertyInfo.GetGetMethod(true); +#endif + } + + public static MethodInfo GetSetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.SetMethod; +#else + return propertyInfo.GetSetMethod(true); +#endif + } + + public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo) + { + return GetConstructorByReflection(constructorInfo); + } + + public static ConstructorDelegate GetContructor(Type type, params Type[] argsType) + { + return GetConstructorByReflection(type, argsType); + } + + public static ConstructorDelegate GetConstructorByReflection(ConstructorInfo constructorInfo) + { + return delegate (object[] args) + { + var x = constructorInfo; + return x.Invoke(args); + }; + } + + public static ConstructorDelegate GetConstructorByReflection(Type type, params Type[] argsType) + { + ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); + return constructorInfo == null ? null : GetConstructorByReflection(constructorInfo); + } + + public static GetDelegate GetGetMethod(PropertyInfo propertyInfo) + { + return GetGetMethodByReflection(propertyInfo); + } + + public static GetDelegate GetGetMethod(FieldInfo fieldInfo) + { + return GetGetMethodByReflection(fieldInfo); + } + + public static GetDelegate GetGetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetGetterMethodInfo(propertyInfo); + return delegate (object source) { return methodInfo.Invoke(source, EmptyObjects); }; + } + + public static GetDelegate GetGetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source) { return fieldInfo.GetValue(source); }; + } + + public static SetDelegate GetSetMethod(PropertyInfo propertyInfo) + { + return GetSetMethodByReflection(propertyInfo); + } + + public static SetDelegate GetSetMethod(FieldInfo fieldInfo) + { + return GetSetMethodByReflection(fieldInfo); + } + + public static SetDelegate GetSetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetSetterMethodInfo(propertyInfo); + return delegate (object source, object value) + { + if (_1ObjArray == null) + _1ObjArray = new object[1]; + _1ObjArray[0] = value; + methodInfo.Invoke(source, _1ObjArray); + }; + } + + public static SetDelegate GetSetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source, object value) { fieldInfo.SetValue(source, value); }; + } + + public sealed class ThreadSafeDictionary : IDictionary + { + private readonly object _lock = new object(); + private readonly ThreadSafeDictionaryValueFactory _valueFactory; + private Dictionary _dictionary; + + public ThreadSafeDictionary(ThreadSafeDictionaryValueFactory valueFactory) + { + _valueFactory = valueFactory; + } + + private TValue Get(TKey key) + { + if (_dictionary == null) + return AddValue(key); + TValue value; + if (!_dictionary.TryGetValue(key, out value)) + return AddValue(key); + return value; + } + + private TValue AddValue(TKey key) + { + TValue value = _valueFactory(key); + lock (_lock) + { + if (_dictionary == null) + { + _dictionary = new Dictionary(); + _dictionary[key] = value; + } + else + { + TValue val; + if (_dictionary.TryGetValue(key, out val)) + return val; + Dictionary dict = new Dictionary(_dictionary); + dict[key] = value; + _dictionary = dict; + } + } + return value; + } + + public void Add(TKey key, TValue value) + { + throw new NotImplementedException(); + } + + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + public ICollection Keys + { + get { return _dictionary.Keys; } + } + + public bool Remove(TKey key) + { + throw new NotImplementedException(); + } + + public bool TryGetValue(TKey key, out TValue value) + { + value = this[key]; + return true; + } + + public ICollection Values + { + get { return _dictionary.Values; } + } + + public TValue this[TKey key] + { + get { return Get(key); } + set { throw new NotImplementedException(); } + } + + public void Add(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public bool Contains(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + public int Count + { + get { return _dictionary.Count; } + } + + public bool IsReadOnly + { + get { throw new NotImplementedException(); } + } + + public bool Remove(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public IEnumerator> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + } + } +} + +// ReSharper restore LoopCanBeConvertedToQuery +// ReSharper restore RedundantExplicitArrayCreation +// ReSharper restore SuggestUseVarKeywordEvident diff --git a/Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs.meta b/Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs.meta new file mode 100644 index 00000000..38d3b82f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bce6184794650f24fa8ac244b25edc17 +timeCreated: 1462682372 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/SingletonMonoBehaviour.cs b/Assets/PlayFabSDK/Shared/Internal/SingletonMonoBehaviour.cs new file mode 100644 index 00000000..4abc8b34 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/SingletonMonoBehaviour.cs @@ -0,0 +1,58 @@ +using UnityEngine; + +namespace PlayFab.Internal +{ + //public to be accessible by Unity engine + public class SingletonMonoBehaviour : MonoBehaviour where T : SingletonMonoBehaviour + { + private static T _instance; + + public static T instance + { + get + { + CreateInstance(); + return _instance; + } + } + + public static void CreateInstance() + { + if (_instance == null) + { + //find existing instance + _instance = FindObjectOfType(); + if (_instance == null) + { + //create new instance + var go = new GameObject(typeof(T).Name); + _instance = go.AddComponent(); + } + //initialize instance if necessary + if (!_instance.initialized) + { + _instance.Initialize(); + _instance.initialized = true; + } + } + } + + public virtual void Awake () + { + if (Application.isPlaying) + { + DontDestroyOnLoad(this); + } + + //check if instance already exists when reloading original scene + if (_instance != null) + { + DestroyImmediate (gameObject); + } + } + + protected bool initialized; + + protected virtual void Initialize() { } + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/SingletonMonoBehaviour.cs.meta b/Assets/PlayFabSDK/Shared/Internal/SingletonMonoBehaviour.cs.meta new file mode 100644 index 00000000..4a1f14a2 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/SingletonMonoBehaviour.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f6a51fa1ed684497db153f40961979c4 +timeCreated: 1462682373 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/Util.cs b/Assets/PlayFabSDK/Shared/Internal/Util.cs new file mode 100644 index 00000000..6c5e4650 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/Util.cs @@ -0,0 +1,157 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; + +#if NETFX_CORE +using System.Reflection; +#endif + +namespace PlayFab.Internal +{ + public static class PlayFabUtil + { + static PlayFabUtil() { } + + private static string _localSettingsFileName = "playfab.local.settings.json"; + public static readonly string[] _defaultDateTimeFormats = new string[]{ // All parseable ISO 8601 formats for DateTime.[Try]ParseExact - Lets us deserialize any legacy timestamps in one of these formats + // These are the standard format with ISO 8601 UTC markers (T/Z) + "yyyy-MM-ddTHH:mm:ss.FFFFFFZ", + "yyyy-MM-ddTHH:mm:ss.FFFFZ", + "yyyy-MM-ddTHH:mm:ss.FFFZ", // DEFAULT_UTC_OUTPUT_INDEX + "yyyy-MM-ddTHH:mm:ss.FFZ", + "yyyy-MM-ddTHH:mm:ssZ", + "yyyy-MM-dd HH:mm:ssZ", // Added for Android Push Plugin + + // These are the standard format without ISO 8601 UTC markers (T/Z) + "yyyy-MM-dd HH:mm:ss.FFFFFF", + "yyyy-MM-dd HH:mm:ss.FFFF", + "yyyy-MM-dd HH:mm:ss.FFF", + "yyyy-MM-dd HH:mm:ss.FF", // DEFAULT_LOCAL_OUTPUT_INDEX + "yyyy-MM-dd HH:mm:ss", + + // These are the result of an input bug, which we now have to support as long as the db has entries formatted like this + "yyyy-MM-dd HH:mm.ss.FFFF", + "yyyy-MM-dd HH:mm.ss.FFF", + "yyyy-MM-dd HH:mm.ss.FF", + "yyyy-MM-dd HH:mm.ss", + }; + public const int DEFAULT_UTC_OUTPUT_INDEX = 2; // The default format everybody should use + public const int DEFAULT_LOCAL_OUTPUT_INDEX = 9; // The default format if you want to use local time (This doesn't have universal support in all PlayFab code) + public static DateTimeStyles DateTimeStyles = DateTimeStyles.RoundtripKind; + + public static string timeStamp + { + get { return DateTime.Now.ToString(_defaultDateTimeFormats[DEFAULT_LOCAL_OUTPUT_INDEX]); } + } + + public static string utcTimeStamp + { + get { return DateTime.UtcNow.ToString(_defaultDateTimeFormats[DEFAULT_UTC_OUTPUT_INDEX]); } + } + + public static string Format(string text, params object[] args) + { + return args.Length > 0 ? string.Format(text, args) : text; + } + + [ThreadStatic] + private static StringBuilder _sb; + /// + /// A threadsafe way to block and load a text file + /// + /// Load a text file, and return the file as text. + /// Used for small (usually json) files. + /// + public static string ReadAllFileText(string filename) + { + if (!File.Exists(filename)) + { + return string.Empty; + } + + if (_sb == null) + { + _sb = new StringBuilder(); + } + _sb.Length = 0; + + using (var fs = new FileStream(filename, FileMode.Open)) + { + using (var br = new BinaryReader(fs)) + { + while (br.BaseStream.Position != br.BaseStream.Length) + { + _sb.Append(br.ReadChar()); + } + } + } + + return _sb.ToString(); + } + + public static T TryEnumParse(string value, T defaultValue) + { + try + { + return (T)Enum.Parse(typeof(T), value); + } + catch (InvalidCastException) + { + return defaultValue; + } + catch (Exception e) + { + UnityEngine.Debug.LogError("Enum cast failed with unknown error: " + e.Message); + return defaultValue; + } + } + +#if UNITY_2017_1_OR_NEWER + internal static string GetLocalSettingsFileProperty(string propertyKey) + { + string envFileContent = null; + + string currDir = Directory.GetCurrentDirectory(); + string currDirEnvFile = Path.Combine(currDir, _localSettingsFileName); + + if (File.Exists(currDirEnvFile)) + { + envFileContent = ReadAllFileText(currDirEnvFile); + } + else + { + string tempDir = Path.GetTempPath(); + string tempDirEnvFile = Path.Combine(tempDir, _localSettingsFileName); + + if (File.Exists(tempDirEnvFile)) + { + envFileContent = ReadAllFileText(tempDirEnvFile); + } + } + + if (!string.IsNullOrEmpty(envFileContent)) + { + var serializer = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + var envJson = serializer.DeserializeObject>(envFileContent); + try + { + object result; + if (envJson.TryGetValue(propertyKey, out result)) + { + return result == null ? null : result.ToString(); + } + + return null; + } + catch (KeyNotFoundException) + { + return string.Empty; + } + } + return string.Empty; + } +#endif + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/Util.cs.meta b/Assets/PlayFabSDK/Shared/Internal/Util.cs.meta new file mode 100644 index 00000000..199e91ed --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/Util.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b3bfc0fbdbe1a36429699dfc30c9e488 +timeCreated: 1462682372 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Internal/wsaReflectionExtensions.cs b/Assets/PlayFabSDK/Shared/Internal/wsaReflectionExtensions.cs new file mode 100644 index 00000000..db85a94e --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/wsaReflectionExtensions.cs @@ -0,0 +1,66 @@ +#if UNITY_WSA && UNITY_WP8 +#define NETFX_CORE +#endif + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; + +namespace PlayFab +{ + public static class WsaReflectionExtensions + { +#if !NETFX_CORE + public static Delegate CreateDelegate(this MethodInfo methodInfo, Type delegateType, object instance) + { + return Delegate.CreateDelegate(delegateType, instance, methodInfo); + } + public static Type GetTypeInfo(this Type type) + { + return type; + } + public static Type AsType(this Type type) + { + return type; + } + public static string GetDelegateName(this Delegate delegateInstance) + { + return delegateInstance.Method.Name; + } +#else + public static bool IsInstanceOfType(this Type type, object obj) + { + return obj != null && type.GetTypeInfo().IsAssignableFrom(obj.GetType().GetTypeInfo()); + } + public static string GetDelegateName(this Delegate delegateInstance) + { + return delegateInstance.ToString(); + } + public static MethodInfo GetMethod(this Type type, string methodName) + { + return type.GetTypeInfo().GetDeclaredMethod(methodName); + } + public static IEnumerable GetFields(this TypeInfo typeInfo) + { + return typeInfo.DeclaredFields; + } + public static TypeInfo GetTypeInfo(this TypeInfo typeInfo) + { + return typeInfo; + } + public static IEnumerable GetConstructors(this TypeInfo typeInfo) + { + return typeInfo.DeclaredConstructors; + } + public static IEnumerable GetMethods(this TypeInfo typeInfo, BindingFlags ignored) + { + return typeInfo.DeclaredMethods; + } + public static IEnumerable GetTypes(this Assembly assembly) + { + return assembly.DefinedTypes; + } +#endif + } +} diff --git a/Assets/PlayFabSDK/Shared/Internal/wsaReflectionExtensions.cs.meta b/Assets/PlayFabSDK/Shared/Internal/wsaReflectionExtensions.cs.meta new file mode 100644 index 00000000..aa63e032 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Internal/wsaReflectionExtensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1b20d57e2279b3a408268b20c2be2208 +timeCreated: 1468890373 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Models.meta b/Assets/PlayFabSDK/Shared/Models.meta new file mode 100644 index 00000000..ab8f60da --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Models.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 34c5d2725a89d1c40af9b10a9b9dcbc5 +folderAsset: yes +timeCreated: 1467491757 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Models/PlayFabSharedSettings.cs b/Assets/PlayFabSDK/Shared/Models/PlayFabSharedSettings.cs new file mode 100644 index 00000000..8067a126 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Models/PlayFabSharedSettings.cs @@ -0,0 +1,36 @@ +using UnityEngine; +using PlayFab; + +#if UNITY_5_3_OR_NEWER +[CreateAssetMenu(fileName = "PlayFabSharedSettings", menuName = "PlayFab/CreateSharedSettings", order = 1)] +#endif +public class PlayFabSharedSettings : ScriptableObject +{ + public string TitleId; + + internal string VerticalName = null; +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || UNITY_EDITOR || ENABLE_PLAYFAB_SECRETKEY + public string DeveloperSecretKey; +#endif + public string ProductionEnvironmentUrl = ""; + +#if UNITY_2017_2_OR_NEWER + public WebRequestType RequestType = WebRequestType.UnityWebRequest; +#else + public WebRequestType RequestType = WebRequestType.UnityWww; +#endif + + public bool DisableDeviceInfo; + public bool DisableFocusTimeCollection; + + public int RequestTimeout = 2000; + public bool RequestKeepAlive = true; + public bool CompressResponses = false; + public bool DecompressWithDownloadHandler = true; + + public PlayFabLogLevel LogLevel = PlayFabLogLevel.Warning | PlayFabLogLevel.Error; + public string LoggerHost = ""; + public int LoggerPort = 0; + public bool EnableRealTimeLogging = false; + public int LogCapLimit = 30; +} diff --git a/Assets/PlayFabSDK/Shared/Models/PlayFabSharedSettings.cs.meta b/Assets/PlayFabSDK/Shared/Models/PlayFabSharedSettings.cs.meta new file mode 100644 index 00000000..5612c93a --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Models/PlayFabSharedSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 093286084a3d1994a9c28281a1c38b1d +timeCreated: 1467748518 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Models/SharedModels.cs b/Assets/PlayFabSDK/Shared/Models/SharedModels.cs new file mode 100644 index 00000000..0d147cb8 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Models/SharedModels.cs @@ -0,0 +1,44 @@ +using PlayFab.Internal; + +namespace PlayFab.SharedModels +{ + public class HttpResponseObject + { + public int code; + public string status; + public object data; + } + + public class PlayFabBaseModel + { + public string ToJson() + { + var json = PluginManager.GetPlugin(PluginContract.PlayFab_Serializer); + return json.SerializeObject(this); + } + } + + public interface IPlayFabInstanceApi { } + + public class PlayFabRequestCommon : PlayFabBaseModel + { + public PlayFabAuthenticationContext AuthenticationContext; + } + + public class PlayFabResultCommon : PlayFabBaseModel + { + public PlayFabRequestCommon Request; + public object CustomData; + } + + public class PlayFabLoginResultCommon : PlayFabResultCommon + { + public PlayFabAuthenticationContext AuthenticationContext; + } + + public class PlayFabResult where TResult : PlayFabResultCommon + { + public TResult Result; + public object CustomData; + } +} diff --git a/Assets/PlayFabSDK/Shared/Models/SharedModels.cs.meta b/Assets/PlayFabSDK/Shared/Models/SharedModels.cs.meta new file mode 100644 index 00000000..ba966239 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Models/SharedModels.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8e2ad5324972b434883785ddddf9c851 +timeCreated: 1467491766 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public.meta b/Assets/PlayFabSDK/Shared/Public.meta new file mode 100644 index 00000000..340516d7 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85636a5aec9f04e91a75e422c19ff5da +folderAsset: yes +timeCreated: 1462682372 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/IPlayFabPlugin.cs b/Assets/PlayFabSDK/Shared/Public/IPlayFabPlugin.cs new file mode 100644 index 00000000..676ca434 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/IPlayFabPlugin.cs @@ -0,0 +1,9 @@ +namespace PlayFab +{ + /// + /// Base interface of any PlayFab SDK plugin. + /// + public interface IPlayFabPlugin + { + } +} \ No newline at end of file diff --git a/Assets/PlayFabSDK/Shared/Public/IPlayFabPlugin.cs.meta b/Assets/PlayFabSDK/Shared/Public/IPlayFabPlugin.cs.meta new file mode 100644 index 00000000..25d6f1b9 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/IPlayFabPlugin.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c515d14de9458ef449d382c41e4943b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/ISerializerPlugin.cs b/Assets/PlayFabSDK/Shared/Public/ISerializerPlugin.cs new file mode 100644 index 00000000..d2889c9d --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/ISerializerPlugin.cs @@ -0,0 +1,15 @@ +namespace PlayFab +{ + /// + /// Interface of any data serializer SDK plugin. + /// + public interface ISerializerPlugin : IPlayFabPlugin + { + T DeserializeObject(string serialized); + T DeserializeObject(string serialized, object serializerStrategy); + object DeserializeObject(string serialized); + + string SerializeObject(object obj); + string SerializeObject(object obj, object serializerStrategy); + } +} \ No newline at end of file diff --git a/Assets/PlayFabSDK/Shared/Public/ISerializerPlugin.cs.meta b/Assets/PlayFabSDK/Shared/Public/ISerializerPlugin.cs.meta new file mode 100644 index 00000000..1a0051ce --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/ISerializerPlugin.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d33ec65e8a628fe44a4aa5c55289a16d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/ITransportPlugin.cs b/Assets/PlayFabSDK/Shared/Public/ITransportPlugin.cs new file mode 100644 index 00000000..0206bb72 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/ITransportPlugin.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace PlayFab +{ + /// + /// Interface of any transport SDK plugin. + /// + public interface ITransportPlugin: IPlayFabPlugin + { + bool IsInitialized { get; } + void Initialize(); + + // Mirroring MonoBehaviour - Relayed from PlayFabHTTP + void Update(); + void OnDestroy(); + + void SimpleGetCall(string fullUrl, Action successCallback, Action errorCallback); + void SimplePutCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback); + + void SimplePostCall(string fullUrl, byte[] payload, Action successCallback, Action errorCallback); + + void MakeApiCall(object reqContainer); + + int GetPendingMessages(); + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/ITransportPlugin.cs.meta b/Assets/PlayFabSDK/Shared/Public/ITransportPlugin.cs.meta new file mode 100644 index 00000000..ebf43af4 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/ITransportPlugin.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b97cd56b9c312144bb35f37b431aa18f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabApiSettings.cs b/Assets/PlayFabSDK/Shared/Public/PlayFabApiSettings.cs new file mode 100644 index 00000000..d9e3c72f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabApiSettings.cs @@ -0,0 +1,102 @@ +using System.Collections.Generic; +using System; + +namespace PlayFab +{ + public class PlayFabApiSettings + { + private string _ProductionEnvironmentUrl = PlayFabSettings.DefaultPlayFabApiUrl; + public readonly Dictionary _requestGetParams = new Dictionary { + { "sdk", PlayFabSettings.VersionString } + }; + + public virtual Dictionary RequestGetParams { get { return _requestGetParams; } } + + /// This is only for customers running a private cluster. Generally you shouldn't touch this + public virtual string ProductionEnvironmentUrl { get { return _ProductionEnvironmentUrl; } set { _ProductionEnvironmentUrl = value; } } + /// You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website) + public virtual string TitleId { get; set; } + + /// The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this + internal virtual string VerticalName { get; set; } +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || UNITY_EDITOR || ENABLE_PLAYFAB_SECRETKEY + /// You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website) + public virtual string DeveloperSecretKey { get; set; } +#endif + /// Set this to true to prevent hardware information from leaving the device + public virtual bool DisableDeviceInfo { get; set; } + /// Set this to true to prevent focus change information from leaving the device + public virtual bool DisableFocusTimeCollection { get; set; } + + /// Set to enable Gzip compression on all responses. Defaults to false. + public virtual bool CompressResponses { get; set; } + + /// Enables the custom Gzip DownloadHandler on all responses. Defaults to true. + internal virtual bool DecompressWithDownloadHandler { get; set; } = true; + + + public virtual string GetFullUrl(string apiCall, Dictionary getParams) + { + return PlayFabSettings.GetFullUrl(apiCall, getParams, this); + } + } + + /// + /// This is only meant for PlayFabSettings to use as a redirect to store values on PlayFabSharedSettings instead of locally + /// + internal class PlayFabSettingsRedirect : PlayFabApiSettings + { + private readonly Func GetSO; + public PlayFabSettingsRedirect(Func getSO) { GetSO = getSO; } + + public override string ProductionEnvironmentUrl + { + get { var so = GetSO(); return so == null ? base.ProductionEnvironmentUrl : so.ProductionEnvironmentUrl; } + set { var so = GetSO(); if (so != null) so.ProductionEnvironmentUrl = value; base.ProductionEnvironmentUrl = value; } + } + + internal override string VerticalName + { + get { var so = GetSO(); return so == null ? base.VerticalName : so.VerticalName; } + set { var so = GetSO(); if (so != null) so.VerticalName = value; base.VerticalName = value; } + } + +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || UNITY_EDITOR || ENABLE_PLAYFAB_SECRETKEY + public override string DeveloperSecretKey + { + get { var so = GetSO(); return so == null ? base.DeveloperSecretKey : so.DeveloperSecretKey; } + set { var so = GetSO(); if (so != null) so.DeveloperSecretKey = value; base.DeveloperSecretKey = value; } + } +#endif + + public override string TitleId + { + get { var so = GetSO(); return so == null ? base.TitleId : so.TitleId; } + set { var so = GetSO(); if (so != null) so.TitleId = value; base.TitleId = value; } + } + + public override bool DisableDeviceInfo + { + get { var so = GetSO(); return so == null ? base.DisableDeviceInfo : so.DisableDeviceInfo; } + set { var so = GetSO(); if (so != null) so.DisableDeviceInfo = value; base.DisableDeviceInfo = value; } + } + + public override bool DisableFocusTimeCollection + { + get { var so = GetSO(); return so == null ? base.DisableFocusTimeCollection : so.DisableFocusTimeCollection; } + set { var so = GetSO(); if (so != null) so.DisableFocusTimeCollection = value; base.DisableFocusTimeCollection = value; } + } + + public override bool CompressResponses + { + get { var so = GetSO(); return so == null ? base.CompressResponses : so.CompressResponses; } + set { var so = GetSO(); if (so != null) so.CompressResponses = value; base.CompressResponses = value; } + } + + internal override bool DecompressWithDownloadHandler + { + get { var so = GetSO(); return so == null ? base.DecompressWithDownloadHandler : so.DecompressWithDownloadHandler; } + set { var so = GetSO(); if (so != null) so.DecompressWithDownloadHandler = value; base.DecompressWithDownloadHandler = value; } + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabApiSettings.cs.meta b/Assets/PlayFabSDK/Shared/Public/PlayFabApiSettings.cs.meta new file mode 100644 index 00000000..de68200a --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabApiSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 66cd997c6a8b2ed4d8d2b5c2a97b6e22 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabAuthenticationContext.cs b/Assets/PlayFabSDK/Shared/Public/PlayFabAuthenticationContext.cs new file mode 100644 index 00000000..cf951449 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabAuthenticationContext.cs @@ -0,0 +1,87 @@ +namespace PlayFab +{ + public sealed class PlayFabAuthenticationContext + { + public PlayFabAuthenticationContext() + { + } + + public PlayFabAuthenticationContext(string clientSessionTicket, string entityToken, string playFabId, string entityId, string entityType, string telemetryKey = null) : this() + { +#if !DISABLE_PLAYFABCLIENT_API + ClientSessionTicket = clientSessionTicket; + PlayFabId = playFabId; +#endif +#if !DISABLE_PLAYFABENTITY_API + EntityToken = entityToken; + EntityId = entityId; + EntityType = entityType; +#endif + TelemetryKey = telemetryKey; + } + + public void CopyFrom(PlayFabAuthenticationContext other) + { +#if !DISABLE_PLAYFABCLIENT_API + ClientSessionTicket = other.ClientSessionTicket; + PlayFabId = other.PlayFabId; +#endif +#if !DISABLE_PLAYFABENTITY_API + EntityToken = other.EntityToken; + EntityId = other.EntityId; + EntityType = other.EntityType; +#endif + TelemetryKey = other.TelemetryKey; + } + +#if !DISABLE_PLAYFABCLIENT_API + /// Allows access to the ClientAPI + public string ClientSessionTicket; + /// The master player entity Id + public string PlayFabId; + public bool IsClientLoggedIn() + { + return !string.IsNullOrEmpty(ClientSessionTicket); + } +#endif + +#if !DISABLE_PLAYFABENTITY_API + /// Allows access to most Entity APIs + public string EntityToken; + /// + /// Clients: The title player entity Id (unless replaced with a related entity) + /// Servers: The title id (unless replaced with a related entity) + /// + public string EntityId; + /// + /// Describes the type of entity identified by EntityId + /// + public string EntityType; + public bool IsEntityLoggedIn() + { + return !string.IsNullOrEmpty(EntityToken); + } +#endif + + public string TelemetryKey; + + public bool IsTelemetryKeyProvided() + { + return !string.IsNullOrEmpty(TelemetryKey); + } + + public void ForgetAllCredentials() + { +#if !DISABLE_PLAYFABCLIENT_API + PlayFabId = null; + ClientSessionTicket = null; +#endif +#if !DISABLE_PLAYFABENTITY_API + EntityToken = null; + EntityId = null; + EntityType = null; +#endif + TelemetryKey = null; + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabAuthenticationContext.cs.meta b/Assets/PlayFabSDK/Shared/Public/PlayFabAuthenticationContext.cs.meta new file mode 100644 index 00000000..54e8f4f4 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabAuthenticationContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5e4df1f8e07aee2409343554f628ce8b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabDataGatherer.cs b/Assets/PlayFabSDK/Shared/Public/PlayFabDataGatherer.cs new file mode 100644 index 00000000..1ac5d571 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabDataGatherer.cs @@ -0,0 +1,138 @@ +using UnityEngine; +using System.Text; +using PlayFab.SharedModels; +using UnityEngine.Rendering; +#if NETFX_CORE +using System.Reflection; +#endif + +namespace PlayFab +{ + public class PlayFabDataGatherer + { +#if UNITY_5 || UNITY_5_3_OR_NEWER + // UNITY_5 Application info + public string ProductName; + public string ProductBundle; + public string Version; + public string Company; + public RuntimePlatform Platform; + // UNITY_5 Graphics Abilities + public bool GraphicsMultiThreaded; +#else + public enum GraphicsDeviceType + { + OpenGL2 = 0, Direct3D9 = 1, Direct3D11 = 2, PlayStation3 = 3, Null = 4, Xbox360 = 6, OpenGLES2 = 8, OpenGLES3 = 11, PlayStationVita = 12, + PlayStation4 = 13, XboxOne = 14, PlayStationMobile = 15, Metal = 16, OpenGLCore = 17, Direct3D12 = 18, Nintendo3DS = 19 + } + + // RuntimePlatform Enum info: + // OSXEditor = 0, OSXPlayer = 1, WindowsPlayer = 2, OSXWebPlayer = 3, OSXDashboardPlayer = 4, WindowsWebPlayer = 5, WindowsEditor = 7, + // IPhonePlayer = 8, PS3 = 9, XBOX360 = 10, Android = 11, LinuxPlayer = 13, FlashPlayer = 15, WebGLPlayer = 17, MetroPlayerX86 = 18, + // WSAPlayerX86 = 18, MetroPlayerX64 = 19,WSAPlayerX64 = 19, MetroPlayerARM = 20, WSAPlayerARM = 20, WP8Player = 21, + // EditorBrowsable(EditorBrowsableState.Never)] BB10Player = 22, BlackBerryPlayer = 22, TizenPlayer = 23, PSP2 = 24, PS4 = 25, + // PSM = 26, XboxOne = 27, SamsungTVPlayer = 28, WiiU = 30, tvOS = 31 +#endif +#if !UNITY_5_0 && (UNITY_5 || UNITY_5_3_OR_NEWER) + public GraphicsDeviceType GraphicsType; +#endif + + // Application info + public string DataPath; + public string PersistentDataPath; + public string StreamingAssetsPath; + public int TargetFrameRate; + public string UnityVersion; + public bool RunInBackground; + + //DEVICE & OS + public string DeviceModel; + //public enum DeviceType { Unknown, Handheld, Console, Desktop } + public DeviceType DeviceType; + public string DeviceUniqueId; + public string OperatingSystem; + + //GRAPHICS ABILITIES + public int GraphicsDeviceId; + public string GraphicsDeviceName; + public int GraphicsMemorySize; + public int GraphicsShaderLevel; + + //SYSTEM INFO + public int SystemMemorySize; + public int ProcessorCount; + public int ProcessorFrequency; + public string ProcessorType; + public bool SupportsAccelerometer; + public bool SupportsGyroscope; + public bool SupportsLocationService; + + public PlayFabDataGatherer() + { +#if UNITY_5 || UNITY_5_3_OR_NEWER + // UNITY_5 Application info + ProductName = Application.productName; + Version = Application.version; + Company = Application.companyName; + Platform = Application.platform; + // UNITY_5 Graphics Abilities + GraphicsMultiThreaded = SystemInfo.graphicsMultiThreaded; +#endif +#if !UNITY_5_0 && (UNITY_5 || UNITY_5_3_OR_NEWER) + GraphicsType = SystemInfo.graphicsDeviceType; +#endif + + //Only Used on iOS & Android +#if UNITY_5_6_OR_NEWER && (UNITY_ANDROID || UNITY_IOS || UNITY_IPHONE) + ProductBundle = Application.identifier; +#elif UNITY_ANDROID || UNITY_IOS || UNITY_IPHONE + ProductBundle = Application.bundleIdentifier; +#endif + + // Application info + DataPath = Application.dataPath; +#if !UNITY_SWITCH + PersistentDataPath = Application.persistentDataPath; +#endif + StreamingAssetsPath = Application.streamingAssetsPath; + TargetFrameRate = Application.targetFrameRate; + UnityVersion = Application.unityVersion; + + //DEVICE & OS + DeviceModel = SystemInfo.deviceModel; + DeviceType = SystemInfo.deviceType; + + DeviceUniqueId = PlayFabSettings.DeviceUniqueIdentifier; + OperatingSystem = SystemInfo.operatingSystem; + + //GRAPHICS ABILITIES + GraphicsDeviceId = SystemInfo.graphicsDeviceID; + GraphicsDeviceName = SystemInfo.graphicsDeviceName; + GraphicsMemorySize = SystemInfo.graphicsMemorySize; + GraphicsShaderLevel = SystemInfo.graphicsShaderLevel; + + //SYSTEM INFO + SystemMemorySize = SystemInfo.systemMemorySize; + ProcessorCount = SystemInfo.processorCount; +#if UNITY_5_3_OR_NEWER + ProcessorFrequency = SystemInfo.processorFrequency; // Not Supported in PRE Unity 5_2 +#endif + ProcessorType = SystemInfo.processorType; + SupportsAccelerometer = SystemInfo.supportsAccelerometer; + SupportsGyroscope = SystemInfo.supportsGyroscope; + SupportsLocationService = SystemInfo.supportsLocationService; + } + + public string GenerateReport() + { + var sb = new StringBuilder(); + sb.Append("Logging System Info: ========================================\n"); + foreach (var field in GetType().GetTypeInfo().GetFields()) + { + var fld = field.GetValue(this).ToString(); + sb.AppendFormat("System Info - {0}: {1}\n", field.Name, fld); + } + return sb.ToString(); + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabDataGatherer.cs.meta b/Assets/PlayFabSDK/Shared/Public/PlayFabDataGatherer.cs.meta new file mode 100644 index 00000000..8998e9aa --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabDataGatherer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9021fc3e0230b9a4db0f0e1b104b764b +timeCreated: 1464569227 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabEvents.cs b/Assets/PlayFabSDK/Shared/Public/PlayFabEvents.cs new file mode 100644 index 00000000..c51fe881 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabEvents.cs @@ -0,0 +1,3554 @@ +using PlayFab.SharedModels; +using PlayFab.Internal; + +namespace PlayFab.Events +{ + public partial class PlayFabEvents + { + public delegate void PlayFabErrorEvent(PlayFabRequestCommon request, PlayFabError error); + public delegate void PlayFabResultEvent(TResult result) where TResult : PlayFabResultCommon; + public delegate void PlayFabRequestEvent(TRequest request) where TRequest : PlayFabRequestCommon; + public event PlayFabErrorEvent OnGlobalErrorEvent; + + private static PlayFabEvents _instance; + /// + /// Private constructor because we call PlayFabEvents.init(); + /// + private PlayFabEvents() { } + + public static PlayFabEvents Init() + { + if (_instance == null) + { + _instance = new PlayFabEvents(); + } + PlayFabHttp.ApiProcessingEventHandler += _instance.OnProcessingEvent; + PlayFabHttp.ApiProcessingErrorEventHandler += _instance.OnProcessingErrorEvent; + return _instance; + } + + public void UnregisterInstance(object instance) + { +#if !DISABLE_PLAYFABCLIENT_API + if (OnLoginResultEvent != null) { foreach (var each in OnLoginResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginResultEvent -= (PlayFabResultEvent)each; } } } +#endif +#if ENABLE_PLAYFABADMIN_API + if (OnAdminAbortTaskInstanceRequestEvent != null) { foreach (var each in OnAdminAbortTaskInstanceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAbortTaskInstanceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminAbortTaskInstanceResultEvent != null) { foreach (var each in OnAdminAbortTaskInstanceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAbortTaskInstanceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminAddLocalizedNewsRequestEvent != null) { foreach (var each in OnAdminAddLocalizedNewsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddLocalizedNewsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminAddLocalizedNewsResultEvent != null) { foreach (var each in OnAdminAddLocalizedNewsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddLocalizedNewsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminAddNewsRequestEvent != null) { foreach (var each in OnAdminAddNewsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddNewsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminAddNewsResultEvent != null) { foreach (var each in OnAdminAddNewsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddNewsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminAddPlayerTagRequestEvent != null) { foreach (var each in OnAdminAddPlayerTagRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddPlayerTagRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminAddPlayerTagResultEvent != null) { foreach (var each in OnAdminAddPlayerTagResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddPlayerTagResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminAddUserVirtualCurrencyRequestEvent != null) { foreach (var each in OnAdminAddUserVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddUserVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminAddUserVirtualCurrencyResultEvent != null) { foreach (var each in OnAdminAddUserVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddUserVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminAddVirtualCurrencyTypesRequestEvent != null) { foreach (var each in OnAdminAddVirtualCurrencyTypesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddVirtualCurrencyTypesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminAddVirtualCurrencyTypesResultEvent != null) { foreach (var each in OnAdminAddVirtualCurrencyTypesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminAddVirtualCurrencyTypesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminBanUsersRequestEvent != null) { foreach (var each in OnAdminBanUsersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminBanUsersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminBanUsersResultEvent != null) { foreach (var each in OnAdminBanUsersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminBanUsersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCheckLimitedEditionItemAvailabilityRequestEvent != null) { foreach (var each in OnAdminCheckLimitedEditionItemAvailabilityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCheckLimitedEditionItemAvailabilityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCheckLimitedEditionItemAvailabilityResultEvent != null) { foreach (var each in OnAdminCheckLimitedEditionItemAvailabilityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCheckLimitedEditionItemAvailabilityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent != null) { foreach (var each in OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent != null) { foreach (var each in OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCreateCloudScriptTaskRequestEvent != null) { foreach (var each in OnAdminCreateCloudScriptTaskRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateCloudScriptTaskRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCreateCloudScriptTaskResultEvent != null) { foreach (var each in OnAdminCreateCloudScriptTaskResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateCloudScriptTaskResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCreateInsightsScheduledScalingTaskRequestEvent != null) { foreach (var each in OnAdminCreateInsightsScheduledScalingTaskRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateInsightsScheduledScalingTaskRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCreateInsightsScheduledScalingTaskResultEvent != null) { foreach (var each in OnAdminCreateInsightsScheduledScalingTaskResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateInsightsScheduledScalingTaskResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCreateOpenIdConnectionRequestEvent != null) { foreach (var each in OnAdminCreateOpenIdConnectionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateOpenIdConnectionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCreateOpenIdConnectionResultEvent != null) { foreach (var each in OnAdminCreateOpenIdConnectionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateOpenIdConnectionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCreatePlayerSharedSecretRequestEvent != null) { foreach (var each in OnAdminCreatePlayerSharedSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreatePlayerSharedSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCreatePlayerSharedSecretResultEvent != null) { foreach (var each in OnAdminCreatePlayerSharedSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreatePlayerSharedSecretResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCreatePlayerStatisticDefinitionRequestEvent != null) { foreach (var each in OnAdminCreatePlayerStatisticDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreatePlayerStatisticDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCreatePlayerStatisticDefinitionResultEvent != null) { foreach (var each in OnAdminCreatePlayerStatisticDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreatePlayerStatisticDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminCreateSegmentRequestEvent != null) { foreach (var each in OnAdminCreateSegmentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateSegmentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminCreateSegmentResultEvent != null) { foreach (var each in OnAdminCreateSegmentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminCreateSegmentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteContentRequestEvent != null) { foreach (var each in OnAdminDeleteContentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteContentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteContentResultEvent != null) { foreach (var each in OnAdminDeleteContentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteContentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteMasterPlayerAccountRequestEvent != null) { foreach (var each in OnAdminDeleteMasterPlayerAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteMasterPlayerAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteMasterPlayerAccountResultEvent != null) { foreach (var each in OnAdminDeleteMasterPlayerAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteMasterPlayerAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteMasterPlayerEventDataRequestEvent != null) { foreach (var each in OnAdminDeleteMasterPlayerEventDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteMasterPlayerEventDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteMasterPlayerEventDataResultEvent != null) { foreach (var each in OnAdminDeleteMasterPlayerEventDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteMasterPlayerEventDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteMembershipSubscriptionRequestEvent != null) { foreach (var each in OnAdminDeleteMembershipSubscriptionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteMembershipSubscriptionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteMembershipSubscriptionResultEvent != null) { foreach (var each in OnAdminDeleteMembershipSubscriptionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteMembershipSubscriptionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteOpenIdConnectionRequestEvent != null) { foreach (var each in OnAdminDeleteOpenIdConnectionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteOpenIdConnectionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteOpenIdConnectionResultEvent != null) { foreach (var each in OnAdminDeleteOpenIdConnectionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteOpenIdConnectionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeletePlayerRequestEvent != null) { foreach (var each in OnAdminDeletePlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeletePlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeletePlayerResultEvent != null) { foreach (var each in OnAdminDeletePlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeletePlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeletePlayerSharedSecretRequestEvent != null) { foreach (var each in OnAdminDeletePlayerSharedSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeletePlayerSharedSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeletePlayerSharedSecretResultEvent != null) { foreach (var each in OnAdminDeletePlayerSharedSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeletePlayerSharedSecretResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteSegmentRequestEvent != null) { foreach (var each in OnAdminDeleteSegmentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteSegmentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteSegmentResultEvent != null) { foreach (var each in OnAdminDeleteSegmentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteSegmentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteStoreRequestEvent != null) { foreach (var each in OnAdminDeleteStoreRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteStoreRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteStoreResultEvent != null) { foreach (var each in OnAdminDeleteStoreResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteStoreResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteTaskRequestEvent != null) { foreach (var each in OnAdminDeleteTaskRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteTaskRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteTaskResultEvent != null) { foreach (var each in OnAdminDeleteTaskResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteTaskResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteTitleRequestEvent != null) { foreach (var each in OnAdminDeleteTitleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteTitleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteTitleResultEvent != null) { foreach (var each in OnAdminDeleteTitleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteTitleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminDeleteTitleDataOverrideRequestEvent != null) { foreach (var each in OnAdminDeleteTitleDataOverrideRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteTitleDataOverrideRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminDeleteTitleDataOverrideResultEvent != null) { foreach (var each in OnAdminDeleteTitleDataOverrideResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminDeleteTitleDataOverrideResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminExportMasterPlayerDataRequestEvent != null) { foreach (var each in OnAdminExportMasterPlayerDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminExportMasterPlayerDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminExportMasterPlayerDataResultEvent != null) { foreach (var each in OnAdminExportMasterPlayerDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminExportMasterPlayerDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminExportPlayersInSegmentRequestEvent != null) { foreach (var each in OnAdminExportPlayersInSegmentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminExportPlayersInSegmentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminExportPlayersInSegmentResultEvent != null) { foreach (var each in OnAdminExportPlayersInSegmentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminExportPlayersInSegmentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent != null) { foreach (var each in OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent != null) { foreach (var each in OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetAllSegmentsRequestEvent != null) { foreach (var each in OnAdminGetAllSegmentsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetAllSegmentsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetAllSegmentsResultEvent != null) { foreach (var each in OnAdminGetAllSegmentsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetAllSegmentsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetCatalogItemsRequestEvent != null) { foreach (var each in OnAdminGetCatalogItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCatalogItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetCatalogItemsResultEvent != null) { foreach (var each in OnAdminGetCatalogItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCatalogItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetCloudScriptRevisionRequestEvent != null) { foreach (var each in OnAdminGetCloudScriptRevisionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCloudScriptRevisionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetCloudScriptRevisionResultEvent != null) { foreach (var each in OnAdminGetCloudScriptRevisionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCloudScriptRevisionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetCloudScriptTaskInstanceRequestEvent != null) { foreach (var each in OnAdminGetCloudScriptTaskInstanceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCloudScriptTaskInstanceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetCloudScriptTaskInstanceResultEvent != null) { foreach (var each in OnAdminGetCloudScriptTaskInstanceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCloudScriptTaskInstanceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetCloudScriptVersionsRequestEvent != null) { foreach (var each in OnAdminGetCloudScriptVersionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCloudScriptVersionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetCloudScriptVersionsResultEvent != null) { foreach (var each in OnAdminGetCloudScriptVersionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetCloudScriptVersionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetContentListRequestEvent != null) { foreach (var each in OnAdminGetContentListRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetContentListRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetContentListResultEvent != null) { foreach (var each in OnAdminGetContentListResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetContentListResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetContentUploadUrlRequestEvent != null) { foreach (var each in OnAdminGetContentUploadUrlRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetContentUploadUrlRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetContentUploadUrlResultEvent != null) { foreach (var each in OnAdminGetContentUploadUrlResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetContentUploadUrlResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetDataReportRequestEvent != null) { foreach (var each in OnAdminGetDataReportRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetDataReportRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetDataReportResultEvent != null) { foreach (var each in OnAdminGetDataReportResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetDataReportResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayedTitleListRequestEvent != null) { foreach (var each in OnAdminGetPlayedTitleListRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayedTitleListRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayedTitleListResultEvent != null) { foreach (var each in OnAdminGetPlayedTitleListResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayedTitleListResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayerIdFromAuthTokenRequestEvent != null) { foreach (var each in OnAdminGetPlayerIdFromAuthTokenRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerIdFromAuthTokenRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayerIdFromAuthTokenResultEvent != null) { foreach (var each in OnAdminGetPlayerIdFromAuthTokenResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerIdFromAuthTokenResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayerProfileRequestEvent != null) { foreach (var each in OnAdminGetPlayerProfileRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerProfileRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayerProfileResultEvent != null) { foreach (var each in OnAdminGetPlayerProfileResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerProfileResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayerSegmentsRequestEvent != null) { foreach (var each in OnAdminGetPlayerSegmentsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerSegmentsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayerSegmentsResultEvent != null) { foreach (var each in OnAdminGetPlayerSegmentsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerSegmentsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayerSharedSecretsRequestEvent != null) { foreach (var each in OnAdminGetPlayerSharedSecretsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerSharedSecretsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayerSharedSecretsResultEvent != null) { foreach (var each in OnAdminGetPlayerSharedSecretsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerSharedSecretsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayersInSegmentRequestEvent != null) { foreach (var each in OnAdminGetPlayersInSegmentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayersInSegmentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayersInSegmentResultEvent != null) { foreach (var each in OnAdminGetPlayersInSegmentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayersInSegmentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayerStatisticDefinitionsRequestEvent != null) { foreach (var each in OnAdminGetPlayerStatisticDefinitionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerStatisticDefinitionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayerStatisticDefinitionsResultEvent != null) { foreach (var each in OnAdminGetPlayerStatisticDefinitionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerStatisticDefinitionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayerStatisticVersionsRequestEvent != null) { foreach (var each in OnAdminGetPlayerStatisticVersionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerStatisticVersionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayerStatisticVersionsResultEvent != null) { foreach (var each in OnAdminGetPlayerStatisticVersionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerStatisticVersionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPlayerTagsRequestEvent != null) { foreach (var each in OnAdminGetPlayerTagsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerTagsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPlayerTagsResultEvent != null) { foreach (var each in OnAdminGetPlayerTagsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPlayerTagsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPolicyRequestEvent != null) { foreach (var each in OnAdminGetPolicyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPolicyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPolicyResultEvent != null) { foreach (var each in OnAdminGetPolicyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPolicyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetPublisherDataRequestEvent != null) { foreach (var each in OnAdminGetPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetPublisherDataResultEvent != null) { foreach (var each in OnAdminGetPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetRandomResultTablesRequestEvent != null) { foreach (var each in OnAdminGetRandomResultTablesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetRandomResultTablesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetRandomResultTablesResultEvent != null) { foreach (var each in OnAdminGetRandomResultTablesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetRandomResultTablesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetSegmentExportRequestEvent != null) { foreach (var each in OnAdminGetSegmentExportRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetSegmentExportRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetSegmentExportResultEvent != null) { foreach (var each in OnAdminGetSegmentExportResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetSegmentExportResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetSegmentsRequestEvent != null) { foreach (var each in OnAdminGetSegmentsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetSegmentsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetSegmentsResultEvent != null) { foreach (var each in OnAdminGetSegmentsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetSegmentsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetStoreItemsRequestEvent != null) { foreach (var each in OnAdminGetStoreItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetStoreItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetStoreItemsResultEvent != null) { foreach (var each in OnAdminGetStoreItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetStoreItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetTaskInstancesRequestEvent != null) { foreach (var each in OnAdminGetTaskInstancesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTaskInstancesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetTaskInstancesResultEvent != null) { foreach (var each in OnAdminGetTaskInstancesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTaskInstancesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetTasksRequestEvent != null) { foreach (var each in OnAdminGetTasksRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTasksRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetTasksResultEvent != null) { foreach (var each in OnAdminGetTasksResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTasksResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetTitleDataRequestEvent != null) { foreach (var each in OnAdminGetTitleDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTitleDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetTitleDataResultEvent != null) { foreach (var each in OnAdminGetTitleDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTitleDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetTitleInternalDataRequestEvent != null) { foreach (var each in OnAdminGetTitleInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTitleInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetTitleInternalDataResultEvent != null) { foreach (var each in OnAdminGetTitleInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetTitleInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserAccountInfoRequestEvent != null) { foreach (var each in OnAdminGetUserAccountInfoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserAccountInfoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserAccountInfoResultEvent != null) { foreach (var each in OnAdminGetUserAccountInfoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserAccountInfoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserBansRequestEvent != null) { foreach (var each in OnAdminGetUserBansRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserBansRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserBansResultEvent != null) { foreach (var each in OnAdminGetUserBansResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserBansResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserDataRequestEvent != null) { foreach (var each in OnAdminGetUserDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserDataResultEvent != null) { foreach (var each in OnAdminGetUserDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserInternalDataRequestEvent != null) { foreach (var each in OnAdminGetUserInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserInternalDataResultEvent != null) { foreach (var each in OnAdminGetUserInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserInventoryRequestEvent != null) { foreach (var each in OnAdminGetUserInventoryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserInventoryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserInventoryResultEvent != null) { foreach (var each in OnAdminGetUserInventoryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserInventoryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserPublisherDataRequestEvent != null) { foreach (var each in OnAdminGetUserPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserPublisherDataResultEvent != null) { foreach (var each in OnAdminGetUserPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserPublisherInternalDataRequestEvent != null) { foreach (var each in OnAdminGetUserPublisherInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserPublisherInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserPublisherInternalDataResultEvent != null) { foreach (var each in OnAdminGetUserPublisherInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserPublisherInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserPublisherReadOnlyDataRequestEvent != null) { foreach (var each in OnAdminGetUserPublisherReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserPublisherReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserPublisherReadOnlyDataResultEvent != null) { foreach (var each in OnAdminGetUserPublisherReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserPublisherReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGetUserReadOnlyDataRequestEvent != null) { foreach (var each in OnAdminGetUserReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGetUserReadOnlyDataResultEvent != null) { foreach (var each in OnAdminGetUserReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGetUserReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminGrantItemsToUsersRequestEvent != null) { foreach (var each in OnAdminGrantItemsToUsersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGrantItemsToUsersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminGrantItemsToUsersResultEvent != null) { foreach (var each in OnAdminGrantItemsToUsersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminGrantItemsToUsersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent != null) { foreach (var each in OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminIncrementLimitedEditionItemAvailabilityResultEvent != null) { foreach (var each in OnAdminIncrementLimitedEditionItemAvailabilityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminIncrementLimitedEditionItemAvailabilityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminIncrementPlayerStatisticVersionRequestEvent != null) { foreach (var each in OnAdminIncrementPlayerStatisticVersionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminIncrementPlayerStatisticVersionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminIncrementPlayerStatisticVersionResultEvent != null) { foreach (var each in OnAdminIncrementPlayerStatisticVersionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminIncrementPlayerStatisticVersionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminListOpenIdConnectionRequestEvent != null) { foreach (var each in OnAdminListOpenIdConnectionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminListOpenIdConnectionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminListOpenIdConnectionResultEvent != null) { foreach (var each in OnAdminListOpenIdConnectionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminListOpenIdConnectionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminListVirtualCurrencyTypesRequestEvent != null) { foreach (var each in OnAdminListVirtualCurrencyTypesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminListVirtualCurrencyTypesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminListVirtualCurrencyTypesResultEvent != null) { foreach (var each in OnAdminListVirtualCurrencyTypesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminListVirtualCurrencyTypesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRefundPurchaseRequestEvent != null) { foreach (var each in OnAdminRefundPurchaseRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRefundPurchaseRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRefundPurchaseResultEvent != null) { foreach (var each in OnAdminRefundPurchaseResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRefundPurchaseResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRemovePlayerTagRequestEvent != null) { foreach (var each in OnAdminRemovePlayerTagRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRemovePlayerTagRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRemovePlayerTagResultEvent != null) { foreach (var each in OnAdminRemovePlayerTagResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRemovePlayerTagResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRemoveVirtualCurrencyTypesRequestEvent != null) { foreach (var each in OnAdminRemoveVirtualCurrencyTypesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRemoveVirtualCurrencyTypesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRemoveVirtualCurrencyTypesResultEvent != null) { foreach (var each in OnAdminRemoveVirtualCurrencyTypesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRemoveVirtualCurrencyTypesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminResetCharacterStatisticsRequestEvent != null) { foreach (var each in OnAdminResetCharacterStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResetCharacterStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminResetCharacterStatisticsResultEvent != null) { foreach (var each in OnAdminResetCharacterStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResetCharacterStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminResetPasswordRequestEvent != null) { foreach (var each in OnAdminResetPasswordRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResetPasswordRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminResetPasswordResultEvent != null) { foreach (var each in OnAdminResetPasswordResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResetPasswordResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminResetUserStatisticsRequestEvent != null) { foreach (var each in OnAdminResetUserStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResetUserStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminResetUserStatisticsResultEvent != null) { foreach (var each in OnAdminResetUserStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResetUserStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminResolvePurchaseDisputeRequestEvent != null) { foreach (var each in OnAdminResolvePurchaseDisputeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResolvePurchaseDisputeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminResolvePurchaseDisputeResultEvent != null) { foreach (var each in OnAdminResolvePurchaseDisputeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminResolvePurchaseDisputeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRevokeAllBansForUserRequestEvent != null) { foreach (var each in OnAdminRevokeAllBansForUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeAllBansForUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRevokeAllBansForUserResultEvent != null) { foreach (var each in OnAdminRevokeAllBansForUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeAllBansForUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRevokeBansRequestEvent != null) { foreach (var each in OnAdminRevokeBansRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeBansRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRevokeBansResultEvent != null) { foreach (var each in OnAdminRevokeBansResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeBansResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRevokeInventoryItemRequestEvent != null) { foreach (var each in OnAdminRevokeInventoryItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeInventoryItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRevokeInventoryItemResultEvent != null) { foreach (var each in OnAdminRevokeInventoryItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeInventoryItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRevokeInventoryItemsRequestEvent != null) { foreach (var each in OnAdminRevokeInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRevokeInventoryItemsResultEvent != null) { foreach (var each in OnAdminRevokeInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRevokeInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminRunTaskRequestEvent != null) { foreach (var each in OnAdminRunTaskRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRunTaskRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminRunTaskResultEvent != null) { foreach (var each in OnAdminRunTaskResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminRunTaskResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSendAccountRecoveryEmailRequestEvent != null) { foreach (var each in OnAdminSendAccountRecoveryEmailRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSendAccountRecoveryEmailRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSendAccountRecoveryEmailResultEvent != null) { foreach (var each in OnAdminSendAccountRecoveryEmailResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSendAccountRecoveryEmailResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetCatalogItemsRequestEvent != null) { foreach (var each in OnAdminSetCatalogItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetCatalogItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetCatalogItemsResultEvent != null) { foreach (var each in OnAdminSetCatalogItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetCatalogItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetMembershipOverrideRequestEvent != null) { foreach (var each in OnAdminSetMembershipOverrideRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetMembershipOverrideRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetMembershipOverrideResultEvent != null) { foreach (var each in OnAdminSetMembershipOverrideResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetMembershipOverrideResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetPlayerSecretRequestEvent != null) { foreach (var each in OnAdminSetPlayerSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetPlayerSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetPlayerSecretResultEvent != null) { foreach (var each in OnAdminSetPlayerSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetPlayerSecretResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetPublishedRevisionRequestEvent != null) { foreach (var each in OnAdminSetPublishedRevisionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetPublishedRevisionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetPublishedRevisionResultEvent != null) { foreach (var each in OnAdminSetPublishedRevisionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetPublishedRevisionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetPublisherDataRequestEvent != null) { foreach (var each in OnAdminSetPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetPublisherDataResultEvent != null) { foreach (var each in OnAdminSetPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetStoreItemsRequestEvent != null) { foreach (var each in OnAdminSetStoreItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetStoreItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetStoreItemsResultEvent != null) { foreach (var each in OnAdminSetStoreItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetStoreItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetTitleDataRequestEvent != null) { foreach (var each in OnAdminSetTitleDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetTitleDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetTitleDataResultEvent != null) { foreach (var each in OnAdminSetTitleDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetTitleDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetTitleDataAndOverridesRequestEvent != null) { foreach (var each in OnAdminSetTitleDataAndOverridesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetTitleDataAndOverridesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetTitleDataAndOverridesResultEvent != null) { foreach (var each in OnAdminSetTitleDataAndOverridesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetTitleDataAndOverridesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetTitleInternalDataRequestEvent != null) { foreach (var each in OnAdminSetTitleInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetTitleInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetTitleInternalDataResultEvent != null) { foreach (var each in OnAdminSetTitleInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetTitleInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSetupPushNotificationRequestEvent != null) { foreach (var each in OnAdminSetupPushNotificationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetupPushNotificationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSetupPushNotificationResultEvent != null) { foreach (var each in OnAdminSetupPushNotificationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSetupPushNotificationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminSubtractUserVirtualCurrencyRequestEvent != null) { foreach (var each in OnAdminSubtractUserVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSubtractUserVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminSubtractUserVirtualCurrencyResultEvent != null) { foreach (var each in OnAdminSubtractUserVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminSubtractUserVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateBansRequestEvent != null) { foreach (var each in OnAdminUpdateBansRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateBansRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateBansResultEvent != null) { foreach (var each in OnAdminUpdateBansResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateBansResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateCatalogItemsRequestEvent != null) { foreach (var each in OnAdminUpdateCatalogItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateCatalogItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateCatalogItemsResultEvent != null) { foreach (var each in OnAdminUpdateCatalogItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateCatalogItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateCloudScriptRequestEvent != null) { foreach (var each in OnAdminUpdateCloudScriptRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateCloudScriptRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateCloudScriptResultEvent != null) { foreach (var each in OnAdminUpdateCloudScriptResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateCloudScriptResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateOpenIdConnectionRequestEvent != null) { foreach (var each in OnAdminUpdateOpenIdConnectionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateOpenIdConnectionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateOpenIdConnectionResultEvent != null) { foreach (var each in OnAdminUpdateOpenIdConnectionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateOpenIdConnectionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdatePlayerSharedSecretRequestEvent != null) { foreach (var each in OnAdminUpdatePlayerSharedSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdatePlayerSharedSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdatePlayerSharedSecretResultEvent != null) { foreach (var each in OnAdminUpdatePlayerSharedSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdatePlayerSharedSecretResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdatePlayerStatisticDefinitionRequestEvent != null) { foreach (var each in OnAdminUpdatePlayerStatisticDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdatePlayerStatisticDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdatePlayerStatisticDefinitionResultEvent != null) { foreach (var each in OnAdminUpdatePlayerStatisticDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdatePlayerStatisticDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdatePolicyRequestEvent != null) { foreach (var each in OnAdminUpdatePolicyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdatePolicyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdatePolicyResultEvent != null) { foreach (var each in OnAdminUpdatePolicyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdatePolicyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateRandomResultTablesRequestEvent != null) { foreach (var each in OnAdminUpdateRandomResultTablesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateRandomResultTablesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateRandomResultTablesResultEvent != null) { foreach (var each in OnAdminUpdateRandomResultTablesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateRandomResultTablesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateSegmentRequestEvent != null) { foreach (var each in OnAdminUpdateSegmentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateSegmentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateSegmentResultEvent != null) { foreach (var each in OnAdminUpdateSegmentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateSegmentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateStoreItemsRequestEvent != null) { foreach (var each in OnAdminUpdateStoreItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateStoreItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateStoreItemsResultEvent != null) { foreach (var each in OnAdminUpdateStoreItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateStoreItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateTaskRequestEvent != null) { foreach (var each in OnAdminUpdateTaskRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateTaskRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateTaskResultEvent != null) { foreach (var each in OnAdminUpdateTaskResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateTaskResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateUserDataRequestEvent != null) { foreach (var each in OnAdminUpdateUserDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateUserDataResultEvent != null) { foreach (var each in OnAdminUpdateUserDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateUserInternalDataRequestEvent != null) { foreach (var each in OnAdminUpdateUserInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateUserInternalDataResultEvent != null) { foreach (var each in OnAdminUpdateUserInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateUserPublisherDataRequestEvent != null) { foreach (var each in OnAdminUpdateUserPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateUserPublisherDataResultEvent != null) { foreach (var each in OnAdminUpdateUserPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateUserPublisherInternalDataRequestEvent != null) { foreach (var each in OnAdminUpdateUserPublisherInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserPublisherInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateUserPublisherInternalDataResultEvent != null) { foreach (var each in OnAdminUpdateUserPublisherInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserPublisherInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateUserPublisherReadOnlyDataRequestEvent != null) { foreach (var each in OnAdminUpdateUserPublisherReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserPublisherReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateUserPublisherReadOnlyDataResultEvent != null) { foreach (var each in OnAdminUpdateUserPublisherReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserPublisherReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateUserReadOnlyDataRequestEvent != null) { foreach (var each in OnAdminUpdateUserReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateUserReadOnlyDataResultEvent != null) { foreach (var each in OnAdminUpdateUserReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAdminUpdateUserTitleDisplayNameRequestEvent != null) { foreach (var each in OnAdminUpdateUserTitleDisplayNameRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserTitleDisplayNameRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAdminUpdateUserTitleDisplayNameResultEvent != null) { foreach (var each in OnAdminUpdateUserTitleDisplayNameResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAdminUpdateUserTitleDisplayNameResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABCLIENT_API + if (OnAcceptTradeRequestEvent != null) { foreach (var each in OnAcceptTradeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAcceptTradeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAcceptTradeResultEvent != null) { foreach (var each in OnAcceptTradeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAcceptTradeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddFriendRequestEvent != null) { foreach (var each in OnAddFriendRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddFriendRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddFriendResultEvent != null) { foreach (var each in OnAddFriendResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddFriendResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddGenericIDRequestEvent != null) { foreach (var each in OnAddGenericIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddGenericIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddGenericIDResultEvent != null) { foreach (var each in OnAddGenericIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddGenericIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddOrUpdateContactEmailRequestEvent != null) { foreach (var each in OnAddOrUpdateContactEmailRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddOrUpdateContactEmailRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddOrUpdateContactEmailResultEvent != null) { foreach (var each in OnAddOrUpdateContactEmailResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddOrUpdateContactEmailResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddSharedGroupMembersRequestEvent != null) { foreach (var each in OnAddSharedGroupMembersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddSharedGroupMembersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddSharedGroupMembersResultEvent != null) { foreach (var each in OnAddSharedGroupMembersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddSharedGroupMembersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddUsernamePasswordRequestEvent != null) { foreach (var each in OnAddUsernamePasswordRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddUsernamePasswordRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddUsernamePasswordResultEvent != null) { foreach (var each in OnAddUsernamePasswordResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddUsernamePasswordResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddUserVirtualCurrencyRequestEvent != null) { foreach (var each in OnAddUserVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddUserVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddUserVirtualCurrencyResultEvent != null) { foreach (var each in OnAddUserVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddUserVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAndroidDevicePushNotificationRegistrationRequestEvent != null) { foreach (var each in OnAndroidDevicePushNotificationRegistrationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAndroidDevicePushNotificationRegistrationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAndroidDevicePushNotificationRegistrationResultEvent != null) { foreach (var each in OnAndroidDevicePushNotificationRegistrationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAndroidDevicePushNotificationRegistrationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAttributeInstallRequestEvent != null) { foreach (var each in OnAttributeInstallRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAttributeInstallRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAttributeInstallResultEvent != null) { foreach (var each in OnAttributeInstallResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAttributeInstallResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCancelTradeRequestEvent != null) { foreach (var each in OnCancelTradeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCancelTradeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCancelTradeResultEvent != null) { foreach (var each in OnCancelTradeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCancelTradeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnConfirmPurchaseRequestEvent != null) { foreach (var each in OnConfirmPurchaseRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConfirmPurchaseRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnConfirmPurchaseResultEvent != null) { foreach (var each in OnConfirmPurchaseResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConfirmPurchaseResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnConsumeItemRequestEvent != null) { foreach (var each in OnConsumeItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumeItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnConsumeItemResultEvent != null) { foreach (var each in OnConsumeItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumeItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnConsumeMicrosoftStoreEntitlementsRequestEvent != null) { foreach (var each in OnConsumeMicrosoftStoreEntitlementsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumeMicrosoftStoreEntitlementsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnConsumeMicrosoftStoreEntitlementsResultEvent != null) { foreach (var each in OnConsumeMicrosoftStoreEntitlementsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumeMicrosoftStoreEntitlementsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnConsumePS5EntitlementsRequestEvent != null) { foreach (var each in OnConsumePS5EntitlementsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumePS5EntitlementsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnConsumePS5EntitlementsResultEvent != null) { foreach (var each in OnConsumePS5EntitlementsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumePS5EntitlementsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnConsumePSNEntitlementsRequestEvent != null) { foreach (var each in OnConsumePSNEntitlementsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumePSNEntitlementsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnConsumePSNEntitlementsResultEvent != null) { foreach (var each in OnConsumePSNEntitlementsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumePSNEntitlementsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnConsumeXboxEntitlementsRequestEvent != null) { foreach (var each in OnConsumeXboxEntitlementsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumeXboxEntitlementsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnConsumeXboxEntitlementsResultEvent != null) { foreach (var each in OnConsumeXboxEntitlementsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnConsumeXboxEntitlementsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCreateSharedGroupRequestEvent != null) { foreach (var each in OnCreateSharedGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCreateSharedGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCreateSharedGroupResultEvent != null) { foreach (var each in OnCreateSharedGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCreateSharedGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExecuteCloudScriptRequestEvent != null) { foreach (var each in OnExecuteCloudScriptRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExecuteCloudScriptRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExecuteCloudScriptResultEvent != null) { foreach (var each in OnExecuteCloudScriptResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExecuteCloudScriptResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetAccountInfoRequestEvent != null) { foreach (var each in OnGetAccountInfoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetAccountInfoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetAccountInfoResultEvent != null) { foreach (var each in OnGetAccountInfoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetAccountInfoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetAdPlacementsRequestEvent != null) { foreach (var each in OnGetAdPlacementsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetAdPlacementsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetAdPlacementsResultEvent != null) { foreach (var each in OnGetAdPlacementsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetAdPlacementsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetAllUsersCharactersRequestEvent != null) { foreach (var each in OnGetAllUsersCharactersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetAllUsersCharactersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetAllUsersCharactersResultEvent != null) { foreach (var each in OnGetAllUsersCharactersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetAllUsersCharactersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetCatalogItemsRequestEvent != null) { foreach (var each in OnGetCatalogItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCatalogItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetCatalogItemsResultEvent != null) { foreach (var each in OnGetCatalogItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCatalogItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetCharacterDataRequestEvent != null) { foreach (var each in OnGetCharacterDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetCharacterDataResultEvent != null) { foreach (var each in OnGetCharacterDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetCharacterInventoryRequestEvent != null) { foreach (var each in OnGetCharacterInventoryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterInventoryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetCharacterInventoryResultEvent != null) { foreach (var each in OnGetCharacterInventoryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterInventoryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetCharacterLeaderboardRequestEvent != null) { foreach (var each in OnGetCharacterLeaderboardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterLeaderboardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetCharacterLeaderboardResultEvent != null) { foreach (var each in OnGetCharacterLeaderboardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterLeaderboardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetCharacterReadOnlyDataRequestEvent != null) { foreach (var each in OnGetCharacterReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetCharacterReadOnlyDataResultEvent != null) { foreach (var each in OnGetCharacterReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetCharacterStatisticsRequestEvent != null) { foreach (var each in OnGetCharacterStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetCharacterStatisticsResultEvent != null) { foreach (var each in OnGetCharacterStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetCharacterStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetContentDownloadUrlRequestEvent != null) { foreach (var each in OnGetContentDownloadUrlRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetContentDownloadUrlRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetContentDownloadUrlResultEvent != null) { foreach (var each in OnGetContentDownloadUrlResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetContentDownloadUrlResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetFriendLeaderboardRequestEvent != null) { foreach (var each in OnGetFriendLeaderboardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetFriendLeaderboardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetFriendLeaderboardResultEvent != null) { foreach (var each in OnGetFriendLeaderboardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetFriendLeaderboardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetFriendLeaderboardAroundPlayerRequestEvent != null) { foreach (var each in OnGetFriendLeaderboardAroundPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetFriendLeaderboardAroundPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetFriendLeaderboardAroundPlayerResultEvent != null) { foreach (var each in OnGetFriendLeaderboardAroundPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetFriendLeaderboardAroundPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetFriendsListRequestEvent != null) { foreach (var each in OnGetFriendsListRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetFriendsListRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetFriendsListResultEvent != null) { foreach (var each in OnGetFriendsListResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetFriendsListResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetLeaderboardRequestEvent != null) { foreach (var each in OnGetLeaderboardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetLeaderboardResultEvent != null) { foreach (var each in OnGetLeaderboardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetLeaderboardAroundCharacterRequestEvent != null) { foreach (var each in OnGetLeaderboardAroundCharacterRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardAroundCharacterRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetLeaderboardAroundCharacterResultEvent != null) { foreach (var each in OnGetLeaderboardAroundCharacterResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardAroundCharacterResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetLeaderboardAroundPlayerRequestEvent != null) { foreach (var each in OnGetLeaderboardAroundPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardAroundPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetLeaderboardAroundPlayerResultEvent != null) { foreach (var each in OnGetLeaderboardAroundPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardAroundPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetLeaderboardForUserCharactersRequestEvent != null) { foreach (var each in OnGetLeaderboardForUserCharactersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardForUserCharactersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetLeaderboardForUserCharactersResultEvent != null) { foreach (var each in OnGetLeaderboardForUserCharactersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetLeaderboardForUserCharactersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPaymentTokenRequestEvent != null) { foreach (var each in OnGetPaymentTokenRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPaymentTokenRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPaymentTokenResultEvent != null) { foreach (var each in OnGetPaymentTokenResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPaymentTokenResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPhotonAuthenticationTokenRequestEvent != null) { foreach (var each in OnGetPhotonAuthenticationTokenRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPhotonAuthenticationTokenRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPhotonAuthenticationTokenResultEvent != null) { foreach (var each in OnGetPhotonAuthenticationTokenResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPhotonAuthenticationTokenResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayerCombinedInfoRequestEvent != null) { foreach (var each in OnGetPlayerCombinedInfoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerCombinedInfoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayerCombinedInfoResultEvent != null) { foreach (var each in OnGetPlayerCombinedInfoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerCombinedInfoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayerProfileRequestEvent != null) { foreach (var each in OnGetPlayerProfileRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerProfileRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayerProfileResultEvent != null) { foreach (var each in OnGetPlayerProfileResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerProfileResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayerSegmentsRequestEvent != null) { foreach (var each in OnGetPlayerSegmentsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerSegmentsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayerSegmentsResultEvent != null) { foreach (var each in OnGetPlayerSegmentsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerSegmentsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayerStatisticsRequestEvent != null) { foreach (var each in OnGetPlayerStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayerStatisticsResultEvent != null) { foreach (var each in OnGetPlayerStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayerStatisticVersionsRequestEvent != null) { foreach (var each in OnGetPlayerStatisticVersionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerStatisticVersionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayerStatisticVersionsResultEvent != null) { foreach (var each in OnGetPlayerStatisticVersionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerStatisticVersionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayerTagsRequestEvent != null) { foreach (var each in OnGetPlayerTagsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerTagsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayerTagsResultEvent != null) { foreach (var each in OnGetPlayerTagsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerTagsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayerTradesRequestEvent != null) { foreach (var each in OnGetPlayerTradesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerTradesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayerTradesResultEvent != null) { foreach (var each in OnGetPlayerTradesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayerTradesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromFacebookIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromFacebookIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromFacebookIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromFacebookIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromFacebookIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromFacebookIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromGameCenterIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromGameCenterIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGameCenterIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromGameCenterIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromGameCenterIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGameCenterIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromGenericIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromGenericIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGenericIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromGenericIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromGenericIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGenericIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromGoogleIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromGoogleIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGoogleIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromGoogleIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromGoogleIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGoogleIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromKongregateIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromKongregateIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromKongregateIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromKongregateIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromKongregateIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromKongregateIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromPSNAccountIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromPSNAccountIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromPSNAccountIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromPSNAccountIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromPSNAccountIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromPSNAccountIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromPSNOnlineIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromPSNOnlineIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromPSNOnlineIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromPSNOnlineIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromPSNOnlineIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromPSNOnlineIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromSteamIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromSteamIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromSteamIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromSteamIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromSteamIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromSteamIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromTwitchIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromTwitchIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromTwitchIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromTwitchIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromTwitchIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromTwitchIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPlayFabIDsFromXboxLiveIDsRequestEvent != null) { foreach (var each in OnGetPlayFabIDsFromXboxLiveIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromXboxLiveIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPlayFabIDsFromXboxLiveIDsResultEvent != null) { foreach (var each in OnGetPlayFabIDsFromXboxLiveIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPlayFabIDsFromXboxLiveIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPublisherDataRequestEvent != null) { foreach (var each in OnGetPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPublisherDataResultEvent != null) { foreach (var each in OnGetPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetPurchaseRequestEvent != null) { foreach (var each in OnGetPurchaseRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPurchaseRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetPurchaseResultEvent != null) { foreach (var each in OnGetPurchaseResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetPurchaseResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetSharedGroupDataRequestEvent != null) { foreach (var each in OnGetSharedGroupDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetSharedGroupDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetSharedGroupDataResultEvent != null) { foreach (var each in OnGetSharedGroupDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetSharedGroupDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetStoreItemsRequestEvent != null) { foreach (var each in OnGetStoreItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetStoreItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetStoreItemsResultEvent != null) { foreach (var each in OnGetStoreItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetStoreItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetTimeRequestEvent != null) { foreach (var each in OnGetTimeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTimeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetTimeResultEvent != null) { foreach (var each in OnGetTimeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTimeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetTitleDataRequestEvent != null) { foreach (var each in OnGetTitleDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTitleDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetTitleDataResultEvent != null) { foreach (var each in OnGetTitleDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTitleDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetTitleNewsRequestEvent != null) { foreach (var each in OnGetTitleNewsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTitleNewsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetTitleNewsResultEvent != null) { foreach (var each in OnGetTitleNewsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTitleNewsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetTitlePublicKeyRequestEvent != null) { foreach (var each in OnGetTitlePublicKeyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTitlePublicKeyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetTitlePublicKeyResultEvent != null) { foreach (var each in OnGetTitlePublicKeyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTitlePublicKeyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetTradeStatusRequestEvent != null) { foreach (var each in OnGetTradeStatusRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTradeStatusRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetTradeStatusResultEvent != null) { foreach (var each in OnGetTradeStatusResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetTradeStatusResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetUserDataRequestEvent != null) { foreach (var each in OnGetUserDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetUserDataResultEvent != null) { foreach (var each in OnGetUserDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetUserInventoryRequestEvent != null) { foreach (var each in OnGetUserInventoryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserInventoryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetUserInventoryResultEvent != null) { foreach (var each in OnGetUserInventoryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserInventoryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetUserPublisherDataRequestEvent != null) { foreach (var each in OnGetUserPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetUserPublisherDataResultEvent != null) { foreach (var each in OnGetUserPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetUserPublisherReadOnlyDataRequestEvent != null) { foreach (var each in OnGetUserPublisherReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserPublisherReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetUserPublisherReadOnlyDataResultEvent != null) { foreach (var each in OnGetUserPublisherReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserPublisherReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGetUserReadOnlyDataRequestEvent != null) { foreach (var each in OnGetUserReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGetUserReadOnlyDataResultEvent != null) { foreach (var each in OnGetUserReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGetUserReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGrantCharacterToUserRequestEvent != null) { foreach (var each in OnGrantCharacterToUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGrantCharacterToUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGrantCharacterToUserResultEvent != null) { foreach (var each in OnGrantCharacterToUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGrantCharacterToUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkAndroidDeviceIDRequestEvent != null) { foreach (var each in OnLinkAndroidDeviceIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkAndroidDeviceIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkAndroidDeviceIDResultEvent != null) { foreach (var each in OnLinkAndroidDeviceIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkAndroidDeviceIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkAppleRequestEvent != null) { foreach (var each in OnLinkAppleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkAppleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkAppleResultEvent != null) { foreach (var each in OnLinkAppleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkAppleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkCustomIDRequestEvent != null) { foreach (var each in OnLinkCustomIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkCustomIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkCustomIDResultEvent != null) { foreach (var each in OnLinkCustomIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkCustomIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkFacebookAccountRequestEvent != null) { foreach (var each in OnLinkFacebookAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkFacebookAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkFacebookAccountResultEvent != null) { foreach (var each in OnLinkFacebookAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkFacebookAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkFacebookInstantGamesIdRequestEvent != null) { foreach (var each in OnLinkFacebookInstantGamesIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkFacebookInstantGamesIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkFacebookInstantGamesIdResultEvent != null) { foreach (var each in OnLinkFacebookInstantGamesIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkFacebookInstantGamesIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkGameCenterAccountRequestEvent != null) { foreach (var each in OnLinkGameCenterAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkGameCenterAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkGameCenterAccountResultEvent != null) { foreach (var each in OnLinkGameCenterAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkGameCenterAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkGoogleAccountRequestEvent != null) { foreach (var each in OnLinkGoogleAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkGoogleAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkGoogleAccountResultEvent != null) { foreach (var each in OnLinkGoogleAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkGoogleAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkGooglePlayGamesServicesAccountRequestEvent != null) { foreach (var each in OnLinkGooglePlayGamesServicesAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkGooglePlayGamesServicesAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkGooglePlayGamesServicesAccountResultEvent != null) { foreach (var each in OnLinkGooglePlayGamesServicesAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkGooglePlayGamesServicesAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkIOSDeviceIDRequestEvent != null) { foreach (var each in OnLinkIOSDeviceIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkIOSDeviceIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkIOSDeviceIDResultEvent != null) { foreach (var each in OnLinkIOSDeviceIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkIOSDeviceIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkKongregateRequestEvent != null) { foreach (var each in OnLinkKongregateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkKongregateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkKongregateResultEvent != null) { foreach (var each in OnLinkKongregateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkKongregateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkNintendoServiceAccountRequestEvent != null) { foreach (var each in OnLinkNintendoServiceAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkNintendoServiceAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkNintendoServiceAccountResultEvent != null) { foreach (var each in OnLinkNintendoServiceAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkNintendoServiceAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkNintendoSwitchDeviceIdRequestEvent != null) { foreach (var each in OnLinkNintendoSwitchDeviceIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkNintendoSwitchDeviceIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkNintendoSwitchDeviceIdResultEvent != null) { foreach (var each in OnLinkNintendoSwitchDeviceIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkNintendoSwitchDeviceIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkOpenIdConnectRequestEvent != null) { foreach (var each in OnLinkOpenIdConnectRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkOpenIdConnectRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkOpenIdConnectResultEvent != null) { foreach (var each in OnLinkOpenIdConnectResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkOpenIdConnectResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkPSNAccountRequestEvent != null) { foreach (var each in OnLinkPSNAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkPSNAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkPSNAccountResultEvent != null) { foreach (var each in OnLinkPSNAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkPSNAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkSteamAccountRequestEvent != null) { foreach (var each in OnLinkSteamAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkSteamAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkSteamAccountResultEvent != null) { foreach (var each in OnLinkSteamAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkSteamAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkTwitchRequestEvent != null) { foreach (var each in OnLinkTwitchRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkTwitchRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkTwitchResultEvent != null) { foreach (var each in OnLinkTwitchResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkTwitchResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLinkXboxAccountRequestEvent != null) { foreach (var each in OnLinkXboxAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkXboxAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLinkXboxAccountResultEvent != null) { foreach (var each in OnLinkXboxAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLinkXboxAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnLoginWithAndroidDeviceIDRequestEvent != null) { foreach (var each in OnLoginWithAndroidDeviceIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithAndroidDeviceIDRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithAppleRequestEvent != null) { foreach (var each in OnLoginWithAppleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithAppleRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithCustomIDRequestEvent != null) { foreach (var each in OnLoginWithCustomIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithCustomIDRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithEmailAddressRequestEvent != null) { foreach (var each in OnLoginWithEmailAddressRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithEmailAddressRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithFacebookRequestEvent != null) { foreach (var each in OnLoginWithFacebookRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithFacebookRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithFacebookInstantGamesIdRequestEvent != null) { foreach (var each in OnLoginWithFacebookInstantGamesIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithFacebookInstantGamesIdRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithGameCenterRequestEvent != null) { foreach (var each in OnLoginWithGameCenterRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithGameCenterRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithGoogleAccountRequestEvent != null) { foreach (var each in OnLoginWithGoogleAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithGoogleAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithGooglePlayGamesServicesRequestEvent != null) { foreach (var each in OnLoginWithGooglePlayGamesServicesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithGooglePlayGamesServicesRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithIOSDeviceIDRequestEvent != null) { foreach (var each in OnLoginWithIOSDeviceIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithIOSDeviceIDRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithKongregateRequestEvent != null) { foreach (var each in OnLoginWithKongregateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithKongregateRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithNintendoServiceAccountRequestEvent != null) { foreach (var each in OnLoginWithNintendoServiceAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithNintendoServiceAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithNintendoSwitchDeviceIdRequestEvent != null) { foreach (var each in OnLoginWithNintendoSwitchDeviceIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithNintendoSwitchDeviceIdRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithOpenIdConnectRequestEvent != null) { foreach (var each in OnLoginWithOpenIdConnectRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithOpenIdConnectRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithPlayFabRequestEvent != null) { foreach (var each in OnLoginWithPlayFabRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithPlayFabRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithPSNRequestEvent != null) { foreach (var each in OnLoginWithPSNRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithPSNRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithSteamRequestEvent != null) { foreach (var each in OnLoginWithSteamRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithSteamRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithTwitchRequestEvent != null) { foreach (var each in OnLoginWithTwitchRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithTwitchRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnLoginWithXboxRequestEvent != null) { foreach (var each in OnLoginWithXboxRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLoginWithXboxRequestEvent -= (PlayFabRequestEvent)each; } } } + + if (OnOpenTradeRequestEvent != null) { foreach (var each in OnOpenTradeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnOpenTradeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnOpenTradeResultEvent != null) { foreach (var each in OnOpenTradeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnOpenTradeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnPayForPurchaseRequestEvent != null) { foreach (var each in OnPayForPurchaseRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnPayForPurchaseRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnPayForPurchaseResultEvent != null) { foreach (var each in OnPayForPurchaseResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnPayForPurchaseResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnPurchaseItemRequestEvent != null) { foreach (var each in OnPurchaseItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnPurchaseItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnPurchaseItemResultEvent != null) { foreach (var each in OnPurchaseItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnPurchaseItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRedeemCouponRequestEvent != null) { foreach (var each in OnRedeemCouponRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRedeemCouponRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRedeemCouponResultEvent != null) { foreach (var each in OnRedeemCouponResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRedeemCouponResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRefreshPSNAuthTokenRequestEvent != null) { foreach (var each in OnRefreshPSNAuthTokenRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRefreshPSNAuthTokenRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRefreshPSNAuthTokenResultEvent != null) { foreach (var each in OnRefreshPSNAuthTokenResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRefreshPSNAuthTokenResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRegisterForIOSPushNotificationRequestEvent != null) { foreach (var each in OnRegisterForIOSPushNotificationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRegisterForIOSPushNotificationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRegisterForIOSPushNotificationResultEvent != null) { foreach (var each in OnRegisterForIOSPushNotificationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRegisterForIOSPushNotificationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRegisterPlayFabUserRequestEvent != null) { foreach (var each in OnRegisterPlayFabUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRegisterPlayFabUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRegisterPlayFabUserResultEvent != null) { foreach (var each in OnRegisterPlayFabUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRegisterPlayFabUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRemoveContactEmailRequestEvent != null) { foreach (var each in OnRemoveContactEmailRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveContactEmailRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRemoveContactEmailResultEvent != null) { foreach (var each in OnRemoveContactEmailResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveContactEmailResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRemoveFriendRequestEvent != null) { foreach (var each in OnRemoveFriendRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveFriendRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRemoveFriendResultEvent != null) { foreach (var each in OnRemoveFriendResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveFriendResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRemoveGenericIDRequestEvent != null) { foreach (var each in OnRemoveGenericIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveGenericIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRemoveGenericIDResultEvent != null) { foreach (var each in OnRemoveGenericIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveGenericIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRemoveSharedGroupMembersRequestEvent != null) { foreach (var each in OnRemoveSharedGroupMembersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveSharedGroupMembersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRemoveSharedGroupMembersResultEvent != null) { foreach (var each in OnRemoveSharedGroupMembersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRemoveSharedGroupMembersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnReportAdActivityRequestEvent != null) { foreach (var each in OnReportAdActivityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnReportAdActivityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnReportAdActivityResultEvent != null) { foreach (var each in OnReportAdActivityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnReportAdActivityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnReportDeviceInfoRequestEvent != null) { foreach (var each in OnReportDeviceInfoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnReportDeviceInfoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnReportDeviceInfoResultEvent != null) { foreach (var each in OnReportDeviceInfoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnReportDeviceInfoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnReportPlayerRequestEvent != null) { foreach (var each in OnReportPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnReportPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnReportPlayerResultEvent != null) { foreach (var each in OnReportPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnReportPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRestoreIOSPurchasesRequestEvent != null) { foreach (var each in OnRestoreIOSPurchasesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRestoreIOSPurchasesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRestoreIOSPurchasesResultEvent != null) { foreach (var each in OnRestoreIOSPurchasesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRestoreIOSPurchasesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnRewardAdActivityRequestEvent != null) { foreach (var each in OnRewardAdActivityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRewardAdActivityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnRewardAdActivityResultEvent != null) { foreach (var each in OnRewardAdActivityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnRewardAdActivityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnSendAccountRecoveryEmailRequestEvent != null) { foreach (var each in OnSendAccountRecoveryEmailRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSendAccountRecoveryEmailRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnSendAccountRecoveryEmailResultEvent != null) { foreach (var each in OnSendAccountRecoveryEmailResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSendAccountRecoveryEmailResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnSetFriendTagsRequestEvent != null) { foreach (var each in OnSetFriendTagsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSetFriendTagsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnSetFriendTagsResultEvent != null) { foreach (var each in OnSetFriendTagsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSetFriendTagsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnSetPlayerSecretRequestEvent != null) { foreach (var each in OnSetPlayerSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSetPlayerSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnSetPlayerSecretResultEvent != null) { foreach (var each in OnSetPlayerSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSetPlayerSecretResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnStartPurchaseRequestEvent != null) { foreach (var each in OnStartPurchaseRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnStartPurchaseRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnStartPurchaseResultEvent != null) { foreach (var each in OnStartPurchaseResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnStartPurchaseResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnSubtractUserVirtualCurrencyRequestEvent != null) { foreach (var each in OnSubtractUserVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSubtractUserVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnSubtractUserVirtualCurrencyResultEvent != null) { foreach (var each in OnSubtractUserVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnSubtractUserVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkAndroidDeviceIDRequestEvent != null) { foreach (var each in OnUnlinkAndroidDeviceIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkAndroidDeviceIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkAndroidDeviceIDResultEvent != null) { foreach (var each in OnUnlinkAndroidDeviceIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkAndroidDeviceIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkAppleRequestEvent != null) { foreach (var each in OnUnlinkAppleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkAppleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkAppleResultEvent != null) { foreach (var each in OnUnlinkAppleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkAppleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkCustomIDRequestEvent != null) { foreach (var each in OnUnlinkCustomIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkCustomIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkCustomIDResultEvent != null) { foreach (var each in OnUnlinkCustomIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkCustomIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkFacebookAccountRequestEvent != null) { foreach (var each in OnUnlinkFacebookAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkFacebookAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkFacebookAccountResultEvent != null) { foreach (var each in OnUnlinkFacebookAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkFacebookAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkFacebookInstantGamesIdRequestEvent != null) { foreach (var each in OnUnlinkFacebookInstantGamesIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkFacebookInstantGamesIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkFacebookInstantGamesIdResultEvent != null) { foreach (var each in OnUnlinkFacebookInstantGamesIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkFacebookInstantGamesIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkGameCenterAccountRequestEvent != null) { foreach (var each in OnUnlinkGameCenterAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkGameCenterAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkGameCenterAccountResultEvent != null) { foreach (var each in OnUnlinkGameCenterAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkGameCenterAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkGoogleAccountRequestEvent != null) { foreach (var each in OnUnlinkGoogleAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkGoogleAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkGoogleAccountResultEvent != null) { foreach (var each in OnUnlinkGoogleAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkGoogleAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkGooglePlayGamesServicesAccountRequestEvent != null) { foreach (var each in OnUnlinkGooglePlayGamesServicesAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkGooglePlayGamesServicesAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkGooglePlayGamesServicesAccountResultEvent != null) { foreach (var each in OnUnlinkGooglePlayGamesServicesAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkGooglePlayGamesServicesAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkIOSDeviceIDRequestEvent != null) { foreach (var each in OnUnlinkIOSDeviceIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkIOSDeviceIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkIOSDeviceIDResultEvent != null) { foreach (var each in OnUnlinkIOSDeviceIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkIOSDeviceIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkKongregateRequestEvent != null) { foreach (var each in OnUnlinkKongregateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkKongregateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkKongregateResultEvent != null) { foreach (var each in OnUnlinkKongregateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkKongregateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkNintendoServiceAccountRequestEvent != null) { foreach (var each in OnUnlinkNintendoServiceAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkNintendoServiceAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkNintendoServiceAccountResultEvent != null) { foreach (var each in OnUnlinkNintendoServiceAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkNintendoServiceAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkNintendoSwitchDeviceIdRequestEvent != null) { foreach (var each in OnUnlinkNintendoSwitchDeviceIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkNintendoSwitchDeviceIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkNintendoSwitchDeviceIdResultEvent != null) { foreach (var each in OnUnlinkNintendoSwitchDeviceIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkNintendoSwitchDeviceIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkOpenIdConnectRequestEvent != null) { foreach (var each in OnUnlinkOpenIdConnectRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkOpenIdConnectRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkOpenIdConnectResultEvent != null) { foreach (var each in OnUnlinkOpenIdConnectResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkOpenIdConnectResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkPSNAccountRequestEvent != null) { foreach (var each in OnUnlinkPSNAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkPSNAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkPSNAccountResultEvent != null) { foreach (var each in OnUnlinkPSNAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkPSNAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkSteamAccountRequestEvent != null) { foreach (var each in OnUnlinkSteamAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkSteamAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkSteamAccountResultEvent != null) { foreach (var each in OnUnlinkSteamAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkSteamAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkTwitchRequestEvent != null) { foreach (var each in OnUnlinkTwitchRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkTwitchRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkTwitchResultEvent != null) { foreach (var each in OnUnlinkTwitchResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkTwitchResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlinkXboxAccountRequestEvent != null) { foreach (var each in OnUnlinkXboxAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkXboxAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlinkXboxAccountResultEvent != null) { foreach (var each in OnUnlinkXboxAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlinkXboxAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlockContainerInstanceRequestEvent != null) { foreach (var each in OnUnlockContainerInstanceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlockContainerInstanceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlockContainerInstanceResultEvent != null) { foreach (var each in OnUnlockContainerInstanceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlockContainerInstanceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUnlockContainerItemRequestEvent != null) { foreach (var each in OnUnlockContainerItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlockContainerItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUnlockContainerItemResultEvent != null) { foreach (var each in OnUnlockContainerItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUnlockContainerItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdateAvatarUrlRequestEvent != null) { foreach (var each in OnUpdateAvatarUrlRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateAvatarUrlRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdateAvatarUrlResultEvent != null) { foreach (var each in OnUpdateAvatarUrlResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateAvatarUrlResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdateCharacterDataRequestEvent != null) { foreach (var each in OnUpdateCharacterDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateCharacterDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdateCharacterDataResultEvent != null) { foreach (var each in OnUpdateCharacterDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateCharacterDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdateCharacterStatisticsRequestEvent != null) { foreach (var each in OnUpdateCharacterStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateCharacterStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdateCharacterStatisticsResultEvent != null) { foreach (var each in OnUpdateCharacterStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateCharacterStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdatePlayerStatisticsRequestEvent != null) { foreach (var each in OnUpdatePlayerStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdatePlayerStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdatePlayerStatisticsResultEvent != null) { foreach (var each in OnUpdatePlayerStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdatePlayerStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdateSharedGroupDataRequestEvent != null) { foreach (var each in OnUpdateSharedGroupDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateSharedGroupDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdateSharedGroupDataResultEvent != null) { foreach (var each in OnUpdateSharedGroupDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateSharedGroupDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdateUserDataRequestEvent != null) { foreach (var each in OnUpdateUserDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateUserDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdateUserDataResultEvent != null) { foreach (var each in OnUpdateUserDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateUserDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdateUserPublisherDataRequestEvent != null) { foreach (var each in OnUpdateUserPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateUserPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdateUserPublisherDataResultEvent != null) { foreach (var each in OnUpdateUserPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateUserPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnUpdateUserTitleDisplayNameRequestEvent != null) { foreach (var each in OnUpdateUserTitleDisplayNameRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateUserTitleDisplayNameRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnUpdateUserTitleDisplayNameResultEvent != null) { foreach (var each in OnUpdateUserTitleDisplayNameResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnUpdateUserTitleDisplayNameResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnValidateAmazonIAPReceiptRequestEvent != null) { foreach (var each in OnValidateAmazonIAPReceiptRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateAmazonIAPReceiptRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnValidateAmazonIAPReceiptResultEvent != null) { foreach (var each in OnValidateAmazonIAPReceiptResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateAmazonIAPReceiptResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnValidateGooglePlayPurchaseRequestEvent != null) { foreach (var each in OnValidateGooglePlayPurchaseRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateGooglePlayPurchaseRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnValidateGooglePlayPurchaseResultEvent != null) { foreach (var each in OnValidateGooglePlayPurchaseResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateGooglePlayPurchaseResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnValidateIOSReceiptRequestEvent != null) { foreach (var each in OnValidateIOSReceiptRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateIOSReceiptRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnValidateIOSReceiptResultEvent != null) { foreach (var each in OnValidateIOSReceiptResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateIOSReceiptResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnValidateWindowsStoreReceiptRequestEvent != null) { foreach (var each in OnValidateWindowsStoreReceiptRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateWindowsStoreReceiptRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnValidateWindowsStoreReceiptResultEvent != null) { foreach (var each in OnValidateWindowsStoreReceiptResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnValidateWindowsStoreReceiptResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnWriteCharacterEventRequestEvent != null) { foreach (var each in OnWriteCharacterEventRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnWriteCharacterEventRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnWriteCharacterEventResultEvent != null) { foreach (var each in OnWriteCharacterEventResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnWriteCharacterEventResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnWritePlayerEventRequestEvent != null) { foreach (var each in OnWritePlayerEventRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnWritePlayerEventRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnWritePlayerEventResultEvent != null) { foreach (var each in OnWritePlayerEventResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnWritePlayerEventResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnWriteTitleEventRequestEvent != null) { foreach (var each in OnWriteTitleEventRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnWriteTitleEventRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnWriteTitleEventResultEvent != null) { foreach (var each in OnWriteTitleEventResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnWriteTitleEventResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if ENABLE_PLAYFABSERVER_API + if (OnServerAddCharacterVirtualCurrencyRequestEvent != null) { foreach (var each in OnServerAddCharacterVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddCharacterVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAddCharacterVirtualCurrencyResultEvent != null) { foreach (var each in OnServerAddCharacterVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddCharacterVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerAddFriendRequestEvent != null) { foreach (var each in OnServerAddFriendRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddFriendRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAddFriendResultEvent != null) { foreach (var each in OnServerAddFriendResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddFriendResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerAddGenericIDRequestEvent != null) { foreach (var each in OnServerAddGenericIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddGenericIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAddGenericIDResultEvent != null) { foreach (var each in OnServerAddGenericIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddGenericIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerAddPlayerTagRequestEvent != null) { foreach (var each in OnServerAddPlayerTagRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddPlayerTagRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAddPlayerTagResultEvent != null) { foreach (var each in OnServerAddPlayerTagResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddPlayerTagResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerAddSharedGroupMembersRequestEvent != null) { foreach (var each in OnServerAddSharedGroupMembersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddSharedGroupMembersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAddSharedGroupMembersResultEvent != null) { foreach (var each in OnServerAddSharedGroupMembersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddSharedGroupMembersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerAddUserVirtualCurrencyRequestEvent != null) { foreach (var each in OnServerAddUserVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddUserVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAddUserVirtualCurrencyResultEvent != null) { foreach (var each in OnServerAddUserVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAddUserVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerAuthenticateSessionTicketRequestEvent != null) { foreach (var each in OnServerAuthenticateSessionTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAuthenticateSessionTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAuthenticateSessionTicketResultEvent != null) { foreach (var each in OnServerAuthenticateSessionTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAuthenticateSessionTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerAwardSteamAchievementRequestEvent != null) { foreach (var each in OnServerAwardSteamAchievementRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAwardSteamAchievementRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerAwardSteamAchievementResultEvent != null) { foreach (var each in OnServerAwardSteamAchievementResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerAwardSteamAchievementResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerBanUsersRequestEvent != null) { foreach (var each in OnServerBanUsersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerBanUsersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerBanUsersResultEvent != null) { foreach (var each in OnServerBanUsersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerBanUsersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerConsumeItemRequestEvent != null) { foreach (var each in OnServerConsumeItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerConsumeItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerConsumeItemResultEvent != null) { foreach (var each in OnServerConsumeItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerConsumeItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerCreateSharedGroupRequestEvent != null) { foreach (var each in OnServerCreateSharedGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerCreateSharedGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerCreateSharedGroupResultEvent != null) { foreach (var each in OnServerCreateSharedGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerCreateSharedGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerDeleteCharacterFromUserRequestEvent != null) { foreach (var each in OnServerDeleteCharacterFromUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeleteCharacterFromUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerDeleteCharacterFromUserResultEvent != null) { foreach (var each in OnServerDeleteCharacterFromUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeleteCharacterFromUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerDeletePlayerRequestEvent != null) { foreach (var each in OnServerDeletePlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeletePlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerDeletePlayerResultEvent != null) { foreach (var each in OnServerDeletePlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeletePlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerDeletePushNotificationTemplateRequestEvent != null) { foreach (var each in OnServerDeletePushNotificationTemplateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeletePushNotificationTemplateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerDeletePushNotificationTemplateResultEvent != null) { foreach (var each in OnServerDeletePushNotificationTemplateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeletePushNotificationTemplateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerDeleteSharedGroupRequestEvent != null) { foreach (var each in OnServerDeleteSharedGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeleteSharedGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerDeleteSharedGroupResultEvent != null) { foreach (var each in OnServerDeleteSharedGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerDeleteSharedGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerEvaluateRandomResultTableRequestEvent != null) { foreach (var each in OnServerEvaluateRandomResultTableRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerEvaluateRandomResultTableRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerEvaluateRandomResultTableResultEvent != null) { foreach (var each in OnServerEvaluateRandomResultTableResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerEvaluateRandomResultTableResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerExecuteCloudScriptRequestEvent != null) { foreach (var each in OnServerExecuteCloudScriptRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerExecuteCloudScriptRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerExecuteCloudScriptResultEvent != null) { foreach (var each in OnServerExecuteCloudScriptResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerExecuteCloudScriptResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetAllSegmentsRequestEvent != null) { foreach (var each in OnServerGetAllSegmentsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetAllSegmentsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetAllSegmentsResultEvent != null) { foreach (var each in OnServerGetAllSegmentsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetAllSegmentsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetAllUsersCharactersRequestEvent != null) { foreach (var each in OnServerGetAllUsersCharactersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetAllUsersCharactersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetAllUsersCharactersResultEvent != null) { foreach (var each in OnServerGetAllUsersCharactersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetAllUsersCharactersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetCatalogItemsRequestEvent != null) { foreach (var each in OnServerGetCatalogItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCatalogItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetCatalogItemsResultEvent != null) { foreach (var each in OnServerGetCatalogItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCatalogItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetCharacterDataRequestEvent != null) { foreach (var each in OnServerGetCharacterDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetCharacterDataResultEvent != null) { foreach (var each in OnServerGetCharacterDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetCharacterInternalDataRequestEvent != null) { foreach (var each in OnServerGetCharacterInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetCharacterInternalDataResultEvent != null) { foreach (var each in OnServerGetCharacterInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetCharacterInventoryRequestEvent != null) { foreach (var each in OnServerGetCharacterInventoryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterInventoryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetCharacterInventoryResultEvent != null) { foreach (var each in OnServerGetCharacterInventoryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterInventoryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetCharacterLeaderboardRequestEvent != null) { foreach (var each in OnServerGetCharacterLeaderboardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterLeaderboardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetCharacterLeaderboardResultEvent != null) { foreach (var each in OnServerGetCharacterLeaderboardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterLeaderboardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetCharacterReadOnlyDataRequestEvent != null) { foreach (var each in OnServerGetCharacterReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetCharacterReadOnlyDataResultEvent != null) { foreach (var each in OnServerGetCharacterReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetCharacterStatisticsRequestEvent != null) { foreach (var each in OnServerGetCharacterStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetCharacterStatisticsResultEvent != null) { foreach (var each in OnServerGetCharacterStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetCharacterStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetContentDownloadUrlRequestEvent != null) { foreach (var each in OnServerGetContentDownloadUrlRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetContentDownloadUrlRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetContentDownloadUrlResultEvent != null) { foreach (var each in OnServerGetContentDownloadUrlResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetContentDownloadUrlResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetFriendLeaderboardRequestEvent != null) { foreach (var each in OnServerGetFriendLeaderboardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetFriendLeaderboardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetFriendLeaderboardResultEvent != null) { foreach (var each in OnServerGetFriendLeaderboardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetFriendLeaderboardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetFriendsListRequestEvent != null) { foreach (var each in OnServerGetFriendsListRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetFriendsListRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetFriendsListResultEvent != null) { foreach (var each in OnServerGetFriendsListResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetFriendsListResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetLeaderboardRequestEvent != null) { foreach (var each in OnServerGetLeaderboardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetLeaderboardResultEvent != null) { foreach (var each in OnServerGetLeaderboardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetLeaderboardAroundCharacterRequestEvent != null) { foreach (var each in OnServerGetLeaderboardAroundCharacterRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardAroundCharacterRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetLeaderboardAroundCharacterResultEvent != null) { foreach (var each in OnServerGetLeaderboardAroundCharacterResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardAroundCharacterResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetLeaderboardAroundUserRequestEvent != null) { foreach (var each in OnServerGetLeaderboardAroundUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardAroundUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetLeaderboardAroundUserResultEvent != null) { foreach (var each in OnServerGetLeaderboardAroundUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardAroundUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetLeaderboardForUserCharactersRequestEvent != null) { foreach (var each in OnServerGetLeaderboardForUserCharactersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardForUserCharactersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetLeaderboardForUserCharactersResultEvent != null) { foreach (var each in OnServerGetLeaderboardForUserCharactersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetLeaderboardForUserCharactersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayerCombinedInfoRequestEvent != null) { foreach (var each in OnServerGetPlayerCombinedInfoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerCombinedInfoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayerCombinedInfoResultEvent != null) { foreach (var each in OnServerGetPlayerCombinedInfoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerCombinedInfoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayerProfileRequestEvent != null) { foreach (var each in OnServerGetPlayerProfileRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerProfileRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayerProfileResultEvent != null) { foreach (var each in OnServerGetPlayerProfileResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerProfileResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayerSegmentsRequestEvent != null) { foreach (var each in OnServerGetPlayerSegmentsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerSegmentsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayerSegmentsResultEvent != null) { foreach (var each in OnServerGetPlayerSegmentsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerSegmentsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayersInSegmentRequestEvent != null) { foreach (var each in OnServerGetPlayersInSegmentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayersInSegmentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayersInSegmentResultEvent != null) { foreach (var each in OnServerGetPlayersInSegmentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayersInSegmentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayerStatisticsRequestEvent != null) { foreach (var each in OnServerGetPlayerStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayerStatisticsResultEvent != null) { foreach (var each in OnServerGetPlayerStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayerStatisticVersionsRequestEvent != null) { foreach (var each in OnServerGetPlayerStatisticVersionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerStatisticVersionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayerStatisticVersionsResultEvent != null) { foreach (var each in OnServerGetPlayerStatisticVersionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerStatisticVersionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayerTagsRequestEvent != null) { foreach (var each in OnServerGetPlayerTagsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerTagsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayerTagsResultEvent != null) { foreach (var each in OnServerGetPlayerTagsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayerTagsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromFacebookIDsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromFacebookIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromFacebookIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromFacebookIDsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromFacebookIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromFacebookIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromGenericIDsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromGenericIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromGenericIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromGenericIDsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromGenericIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromGenericIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromPSNAccountIDsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromPSNAccountIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromPSNAccountIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromPSNAccountIDsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromPSNAccountIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromPSNAccountIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromPSNOnlineIDsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromPSNOnlineIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromPSNOnlineIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromPSNOnlineIDsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromPSNOnlineIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromPSNOnlineIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromSteamIDsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromSteamIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromSteamIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromSteamIDsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromSteamIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromSteamIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromTwitchIDsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromTwitchIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromTwitchIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromTwitchIDsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromTwitchIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromTwitchIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPlayFabIDsFromXboxLiveIDsRequestEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromXboxLiveIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromXboxLiveIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPlayFabIDsFromXboxLiveIDsResultEvent != null) { foreach (var each in OnServerGetPlayFabIDsFromXboxLiveIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPlayFabIDsFromXboxLiveIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetPublisherDataRequestEvent != null) { foreach (var each in OnServerGetPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetPublisherDataResultEvent != null) { foreach (var each in OnServerGetPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetRandomResultTablesRequestEvent != null) { foreach (var each in OnServerGetRandomResultTablesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetRandomResultTablesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetRandomResultTablesResultEvent != null) { foreach (var each in OnServerGetRandomResultTablesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetRandomResultTablesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetServerCustomIDsFromPlayFabIDsRequestEvent != null) { foreach (var each in OnServerGetServerCustomIDsFromPlayFabIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetServerCustomIDsFromPlayFabIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetServerCustomIDsFromPlayFabIDsResultEvent != null) { foreach (var each in OnServerGetServerCustomIDsFromPlayFabIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetServerCustomIDsFromPlayFabIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetSharedGroupDataRequestEvent != null) { foreach (var each in OnServerGetSharedGroupDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetSharedGroupDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetSharedGroupDataResultEvent != null) { foreach (var each in OnServerGetSharedGroupDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetSharedGroupDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetStoreItemsRequestEvent != null) { foreach (var each in OnServerGetStoreItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetStoreItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetStoreItemsResultEvent != null) { foreach (var each in OnServerGetStoreItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetStoreItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetTimeRequestEvent != null) { foreach (var each in OnServerGetTimeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTimeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetTimeResultEvent != null) { foreach (var each in OnServerGetTimeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTimeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetTitleDataRequestEvent != null) { foreach (var each in OnServerGetTitleDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTitleDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetTitleDataResultEvent != null) { foreach (var each in OnServerGetTitleDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTitleDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetTitleInternalDataRequestEvent != null) { foreach (var each in OnServerGetTitleInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTitleInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetTitleInternalDataResultEvent != null) { foreach (var each in OnServerGetTitleInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTitleInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetTitleNewsRequestEvent != null) { foreach (var each in OnServerGetTitleNewsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTitleNewsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetTitleNewsResultEvent != null) { foreach (var each in OnServerGetTitleNewsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetTitleNewsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserAccountInfoRequestEvent != null) { foreach (var each in OnServerGetUserAccountInfoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserAccountInfoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserAccountInfoResultEvent != null) { foreach (var each in OnServerGetUserAccountInfoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserAccountInfoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserBansRequestEvent != null) { foreach (var each in OnServerGetUserBansRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserBansRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserBansResultEvent != null) { foreach (var each in OnServerGetUserBansResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserBansResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserDataRequestEvent != null) { foreach (var each in OnServerGetUserDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserDataResultEvent != null) { foreach (var each in OnServerGetUserDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserInternalDataRequestEvent != null) { foreach (var each in OnServerGetUserInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserInternalDataResultEvent != null) { foreach (var each in OnServerGetUserInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserInventoryRequestEvent != null) { foreach (var each in OnServerGetUserInventoryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserInventoryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserInventoryResultEvent != null) { foreach (var each in OnServerGetUserInventoryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserInventoryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserPublisherDataRequestEvent != null) { foreach (var each in OnServerGetUserPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserPublisherDataResultEvent != null) { foreach (var each in OnServerGetUserPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserPublisherInternalDataRequestEvent != null) { foreach (var each in OnServerGetUserPublisherInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserPublisherInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserPublisherInternalDataResultEvent != null) { foreach (var each in OnServerGetUserPublisherInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserPublisherInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserPublisherReadOnlyDataRequestEvent != null) { foreach (var each in OnServerGetUserPublisherReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserPublisherReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserPublisherReadOnlyDataResultEvent != null) { foreach (var each in OnServerGetUserPublisherReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserPublisherReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGetUserReadOnlyDataRequestEvent != null) { foreach (var each in OnServerGetUserReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGetUserReadOnlyDataResultEvent != null) { foreach (var each in OnServerGetUserReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGetUserReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGrantCharacterToUserRequestEvent != null) { foreach (var each in OnServerGrantCharacterToUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantCharacterToUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGrantCharacterToUserResultEvent != null) { foreach (var each in OnServerGrantCharacterToUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantCharacterToUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGrantItemsToCharacterRequestEvent != null) { foreach (var each in OnServerGrantItemsToCharacterRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantItemsToCharacterRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGrantItemsToCharacterResultEvent != null) { foreach (var each in OnServerGrantItemsToCharacterResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantItemsToCharacterResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGrantItemsToUserRequestEvent != null) { foreach (var each in OnServerGrantItemsToUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantItemsToUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGrantItemsToUserResultEvent != null) { foreach (var each in OnServerGrantItemsToUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantItemsToUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerGrantItemsToUsersRequestEvent != null) { foreach (var each in OnServerGrantItemsToUsersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantItemsToUsersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerGrantItemsToUsersResultEvent != null) { foreach (var each in OnServerGrantItemsToUsersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerGrantItemsToUsersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkNintendoServiceAccountRequestEvent != null) { foreach (var each in OnServerLinkNintendoServiceAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkNintendoServiceAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkNintendoServiceAccountResultEvent != null) { foreach (var each in OnServerLinkNintendoServiceAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkNintendoServiceAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkNintendoServiceAccountSubjectRequestEvent != null) { foreach (var each in OnServerLinkNintendoServiceAccountSubjectRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkNintendoServiceAccountSubjectRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkNintendoServiceAccountSubjectResultEvent != null) { foreach (var each in OnServerLinkNintendoServiceAccountSubjectResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkNintendoServiceAccountSubjectResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkNintendoSwitchDeviceIdRequestEvent != null) { foreach (var each in OnServerLinkNintendoSwitchDeviceIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkNintendoSwitchDeviceIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkNintendoSwitchDeviceIdResultEvent != null) { foreach (var each in OnServerLinkNintendoSwitchDeviceIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkNintendoSwitchDeviceIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkPSNAccountRequestEvent != null) { foreach (var each in OnServerLinkPSNAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkPSNAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkPSNAccountResultEvent != null) { foreach (var each in OnServerLinkPSNAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkPSNAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkPSNIdRequestEvent != null) { foreach (var each in OnServerLinkPSNIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkPSNIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkPSNIdResultEvent != null) { foreach (var each in OnServerLinkPSNIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkPSNIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkServerCustomIdRequestEvent != null) { foreach (var each in OnServerLinkServerCustomIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkServerCustomIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkServerCustomIdResultEvent != null) { foreach (var each in OnServerLinkServerCustomIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkServerCustomIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkSteamIdRequestEvent != null) { foreach (var each in OnServerLinkSteamIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkSteamIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkSteamIdResultEvent != null) { foreach (var each in OnServerLinkSteamIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkSteamIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLinkXboxAccountRequestEvent != null) { foreach (var each in OnServerLinkXboxAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkXboxAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLinkXboxAccountResultEvent != null) { foreach (var each in OnServerLinkXboxAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLinkXboxAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLoginWithPSNRequestEvent != null) { foreach (var each in OnServerLoginWithPSNRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithPSNRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLoginWithPSNResultEvent != null) { foreach (var each in OnServerLoginWithPSNResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithPSNResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLoginWithServerCustomIdRequestEvent != null) { foreach (var each in OnServerLoginWithServerCustomIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithServerCustomIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLoginWithServerCustomIdResultEvent != null) { foreach (var each in OnServerLoginWithServerCustomIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithServerCustomIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLoginWithSteamIdRequestEvent != null) { foreach (var each in OnServerLoginWithSteamIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithSteamIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLoginWithSteamIdResultEvent != null) { foreach (var each in OnServerLoginWithSteamIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithSteamIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLoginWithXboxRequestEvent != null) { foreach (var each in OnServerLoginWithXboxRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithXboxRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLoginWithXboxResultEvent != null) { foreach (var each in OnServerLoginWithXboxResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithXboxResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerLoginWithXboxIdRequestEvent != null) { foreach (var each in OnServerLoginWithXboxIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithXboxIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerLoginWithXboxIdResultEvent != null) { foreach (var each in OnServerLoginWithXboxIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerLoginWithXboxIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerModifyItemUsesRequestEvent != null) { foreach (var each in OnServerModifyItemUsesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerModifyItemUsesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerModifyItemUsesResultEvent != null) { foreach (var each in OnServerModifyItemUsesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerModifyItemUsesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerMoveItemToCharacterFromCharacterRequestEvent != null) { foreach (var each in OnServerMoveItemToCharacterFromCharacterRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerMoveItemToCharacterFromCharacterRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerMoveItemToCharacterFromCharacterResultEvent != null) { foreach (var each in OnServerMoveItemToCharacterFromCharacterResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerMoveItemToCharacterFromCharacterResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerMoveItemToCharacterFromUserRequestEvent != null) { foreach (var each in OnServerMoveItemToCharacterFromUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerMoveItemToCharacterFromUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerMoveItemToCharacterFromUserResultEvent != null) { foreach (var each in OnServerMoveItemToCharacterFromUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerMoveItemToCharacterFromUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerMoveItemToUserFromCharacterRequestEvent != null) { foreach (var each in OnServerMoveItemToUserFromCharacterRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerMoveItemToUserFromCharacterRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerMoveItemToUserFromCharacterResultEvent != null) { foreach (var each in OnServerMoveItemToUserFromCharacterResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerMoveItemToUserFromCharacterResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRedeemCouponRequestEvent != null) { foreach (var each in OnServerRedeemCouponRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRedeemCouponRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRedeemCouponResultEvent != null) { foreach (var each in OnServerRedeemCouponResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRedeemCouponResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRemoveFriendRequestEvent != null) { foreach (var each in OnServerRemoveFriendRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemoveFriendRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRemoveFriendResultEvent != null) { foreach (var each in OnServerRemoveFriendResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemoveFriendResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRemoveGenericIDRequestEvent != null) { foreach (var each in OnServerRemoveGenericIDRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemoveGenericIDRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRemoveGenericIDResultEvent != null) { foreach (var each in OnServerRemoveGenericIDResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemoveGenericIDResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRemovePlayerTagRequestEvent != null) { foreach (var each in OnServerRemovePlayerTagRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemovePlayerTagRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRemovePlayerTagResultEvent != null) { foreach (var each in OnServerRemovePlayerTagResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemovePlayerTagResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRemoveSharedGroupMembersRequestEvent != null) { foreach (var each in OnServerRemoveSharedGroupMembersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemoveSharedGroupMembersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRemoveSharedGroupMembersResultEvent != null) { foreach (var each in OnServerRemoveSharedGroupMembersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRemoveSharedGroupMembersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerReportPlayerRequestEvent != null) { foreach (var each in OnServerReportPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerReportPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerReportPlayerResultEvent != null) { foreach (var each in OnServerReportPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerReportPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRevokeAllBansForUserRequestEvent != null) { foreach (var each in OnServerRevokeAllBansForUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeAllBansForUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRevokeAllBansForUserResultEvent != null) { foreach (var each in OnServerRevokeAllBansForUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeAllBansForUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRevokeBansRequestEvent != null) { foreach (var each in OnServerRevokeBansRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeBansRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRevokeBansResultEvent != null) { foreach (var each in OnServerRevokeBansResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeBansResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRevokeInventoryItemRequestEvent != null) { foreach (var each in OnServerRevokeInventoryItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeInventoryItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRevokeInventoryItemResultEvent != null) { foreach (var each in OnServerRevokeInventoryItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeInventoryItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerRevokeInventoryItemsRequestEvent != null) { foreach (var each in OnServerRevokeInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerRevokeInventoryItemsResultEvent != null) { foreach (var each in OnServerRevokeInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerRevokeInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSavePushNotificationTemplateRequestEvent != null) { foreach (var each in OnServerSavePushNotificationTemplateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSavePushNotificationTemplateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSavePushNotificationTemplateResultEvent != null) { foreach (var each in OnServerSavePushNotificationTemplateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSavePushNotificationTemplateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSendCustomAccountRecoveryEmailRequestEvent != null) { foreach (var each in OnServerSendCustomAccountRecoveryEmailRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendCustomAccountRecoveryEmailRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSendCustomAccountRecoveryEmailResultEvent != null) { foreach (var each in OnServerSendCustomAccountRecoveryEmailResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendCustomAccountRecoveryEmailResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSendEmailFromTemplateRequestEvent != null) { foreach (var each in OnServerSendEmailFromTemplateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendEmailFromTemplateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSendEmailFromTemplateResultEvent != null) { foreach (var each in OnServerSendEmailFromTemplateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendEmailFromTemplateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSendPushNotificationRequestEvent != null) { foreach (var each in OnServerSendPushNotificationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendPushNotificationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSendPushNotificationResultEvent != null) { foreach (var each in OnServerSendPushNotificationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendPushNotificationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSendPushNotificationFromTemplateRequestEvent != null) { foreach (var each in OnServerSendPushNotificationFromTemplateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendPushNotificationFromTemplateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSendPushNotificationFromTemplateResultEvent != null) { foreach (var each in OnServerSendPushNotificationFromTemplateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSendPushNotificationFromTemplateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSetFriendTagsRequestEvent != null) { foreach (var each in OnServerSetFriendTagsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetFriendTagsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSetFriendTagsResultEvent != null) { foreach (var each in OnServerSetFriendTagsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetFriendTagsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSetPlayerSecretRequestEvent != null) { foreach (var each in OnServerSetPlayerSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetPlayerSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSetPlayerSecretResultEvent != null) { foreach (var each in OnServerSetPlayerSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetPlayerSecretResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSetPublisherDataRequestEvent != null) { foreach (var each in OnServerSetPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSetPublisherDataResultEvent != null) { foreach (var each in OnServerSetPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSetTitleDataRequestEvent != null) { foreach (var each in OnServerSetTitleDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetTitleDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSetTitleDataResultEvent != null) { foreach (var each in OnServerSetTitleDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetTitleDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSetTitleInternalDataRequestEvent != null) { foreach (var each in OnServerSetTitleInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetTitleInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSetTitleInternalDataResultEvent != null) { foreach (var each in OnServerSetTitleInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSetTitleInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSubtractCharacterVirtualCurrencyRequestEvent != null) { foreach (var each in OnServerSubtractCharacterVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSubtractCharacterVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSubtractCharacterVirtualCurrencyResultEvent != null) { foreach (var each in OnServerSubtractCharacterVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSubtractCharacterVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerSubtractUserVirtualCurrencyRequestEvent != null) { foreach (var each in OnServerSubtractUserVirtualCurrencyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSubtractUserVirtualCurrencyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerSubtractUserVirtualCurrencyResultEvent != null) { foreach (var each in OnServerSubtractUserVirtualCurrencyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerSubtractUserVirtualCurrencyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlinkNintendoServiceAccountRequestEvent != null) { foreach (var each in OnServerUnlinkNintendoServiceAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkNintendoServiceAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlinkNintendoServiceAccountResultEvent != null) { foreach (var each in OnServerUnlinkNintendoServiceAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkNintendoServiceAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlinkNintendoSwitchDeviceIdRequestEvent != null) { foreach (var each in OnServerUnlinkNintendoSwitchDeviceIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkNintendoSwitchDeviceIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlinkNintendoSwitchDeviceIdResultEvent != null) { foreach (var each in OnServerUnlinkNintendoSwitchDeviceIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkNintendoSwitchDeviceIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlinkPSNAccountRequestEvent != null) { foreach (var each in OnServerUnlinkPSNAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkPSNAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlinkPSNAccountResultEvent != null) { foreach (var each in OnServerUnlinkPSNAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkPSNAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlinkServerCustomIdRequestEvent != null) { foreach (var each in OnServerUnlinkServerCustomIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkServerCustomIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlinkServerCustomIdResultEvent != null) { foreach (var each in OnServerUnlinkServerCustomIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkServerCustomIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlinkSteamIdRequestEvent != null) { foreach (var each in OnServerUnlinkSteamIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkSteamIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlinkSteamIdResultEvent != null) { foreach (var each in OnServerUnlinkSteamIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkSteamIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlinkXboxAccountRequestEvent != null) { foreach (var each in OnServerUnlinkXboxAccountRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkXboxAccountRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlinkXboxAccountResultEvent != null) { foreach (var each in OnServerUnlinkXboxAccountResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlinkXboxAccountResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlockContainerInstanceRequestEvent != null) { foreach (var each in OnServerUnlockContainerInstanceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlockContainerInstanceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlockContainerInstanceResultEvent != null) { foreach (var each in OnServerUnlockContainerInstanceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlockContainerInstanceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUnlockContainerItemRequestEvent != null) { foreach (var each in OnServerUnlockContainerItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlockContainerItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUnlockContainerItemResultEvent != null) { foreach (var each in OnServerUnlockContainerItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUnlockContainerItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateAvatarUrlRequestEvent != null) { foreach (var each in OnServerUpdateAvatarUrlRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateAvatarUrlRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateAvatarUrlResultEvent != null) { foreach (var each in OnServerUpdateAvatarUrlResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateAvatarUrlResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateBansRequestEvent != null) { foreach (var each in OnServerUpdateBansRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateBansRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateBansResultEvent != null) { foreach (var each in OnServerUpdateBansResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateBansResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateCharacterDataRequestEvent != null) { foreach (var each in OnServerUpdateCharacterDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateCharacterDataResultEvent != null) { foreach (var each in OnServerUpdateCharacterDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateCharacterInternalDataRequestEvent != null) { foreach (var each in OnServerUpdateCharacterInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateCharacterInternalDataResultEvent != null) { foreach (var each in OnServerUpdateCharacterInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateCharacterReadOnlyDataRequestEvent != null) { foreach (var each in OnServerUpdateCharacterReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateCharacterReadOnlyDataResultEvent != null) { foreach (var each in OnServerUpdateCharacterReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateCharacterStatisticsRequestEvent != null) { foreach (var each in OnServerUpdateCharacterStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateCharacterStatisticsResultEvent != null) { foreach (var each in OnServerUpdateCharacterStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateCharacterStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdatePlayerStatisticsRequestEvent != null) { foreach (var each in OnServerUpdatePlayerStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdatePlayerStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdatePlayerStatisticsResultEvent != null) { foreach (var each in OnServerUpdatePlayerStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdatePlayerStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateSharedGroupDataRequestEvent != null) { foreach (var each in OnServerUpdateSharedGroupDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateSharedGroupDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateSharedGroupDataResultEvent != null) { foreach (var each in OnServerUpdateSharedGroupDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateSharedGroupDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateUserDataRequestEvent != null) { foreach (var each in OnServerUpdateUserDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateUserDataResultEvent != null) { foreach (var each in OnServerUpdateUserDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateUserInternalDataRequestEvent != null) { foreach (var each in OnServerUpdateUserInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateUserInternalDataResultEvent != null) { foreach (var each in OnServerUpdateUserInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateUserInventoryItemCustomDataRequestEvent != null) { foreach (var each in OnServerUpdateUserInventoryItemCustomDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserInventoryItemCustomDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateUserInventoryItemCustomDataResultEvent != null) { foreach (var each in OnServerUpdateUserInventoryItemCustomDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserInventoryItemCustomDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateUserPublisherDataRequestEvent != null) { foreach (var each in OnServerUpdateUserPublisherDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserPublisherDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateUserPublisherDataResultEvent != null) { foreach (var each in OnServerUpdateUserPublisherDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserPublisherDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateUserPublisherInternalDataRequestEvent != null) { foreach (var each in OnServerUpdateUserPublisherInternalDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserPublisherInternalDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateUserPublisherInternalDataResultEvent != null) { foreach (var each in OnServerUpdateUserPublisherInternalDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserPublisherInternalDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateUserPublisherReadOnlyDataRequestEvent != null) { foreach (var each in OnServerUpdateUserPublisherReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserPublisherReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateUserPublisherReadOnlyDataResultEvent != null) { foreach (var each in OnServerUpdateUserPublisherReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserPublisherReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerUpdateUserReadOnlyDataRequestEvent != null) { foreach (var each in OnServerUpdateUserReadOnlyDataRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserReadOnlyDataRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerUpdateUserReadOnlyDataResultEvent != null) { foreach (var each in OnServerUpdateUserReadOnlyDataResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerUpdateUserReadOnlyDataResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerWriteCharacterEventRequestEvent != null) { foreach (var each in OnServerWriteCharacterEventRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerWriteCharacterEventRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerWriteCharacterEventResultEvent != null) { foreach (var each in OnServerWriteCharacterEventResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerWriteCharacterEventResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerWritePlayerEventRequestEvent != null) { foreach (var each in OnServerWritePlayerEventRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerWritePlayerEventRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerWritePlayerEventResultEvent != null) { foreach (var each in OnServerWritePlayerEventResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerWritePlayerEventResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnServerWriteTitleEventRequestEvent != null) { foreach (var each in OnServerWriteTitleEventRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerWriteTitleEventRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnServerWriteTitleEventResultEvent != null) { foreach (var each in OnServerWriteTitleEventResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnServerWriteTitleEventResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnAuthenticationAuthenticateGameServerWithCustomIdRequestEvent != null) { foreach (var each in OnAuthenticationAuthenticateGameServerWithCustomIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationAuthenticateGameServerWithCustomIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAuthenticationAuthenticateGameServerWithCustomIdResultEvent != null) { foreach (var each in OnAuthenticationAuthenticateGameServerWithCustomIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationAuthenticateGameServerWithCustomIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAuthenticationDeleteRequestEvent != null) { foreach (var each in OnAuthenticationDeleteRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationDeleteRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAuthenticationDeleteResultEvent != null) { foreach (var each in OnAuthenticationDeleteResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationDeleteResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAuthenticationGetEntityTokenRequestEvent != null) { foreach (var each in OnAuthenticationGetEntityTokenRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationGetEntityTokenRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAuthenticationGetEntityTokenResultEvent != null) { foreach (var each in OnAuthenticationGetEntityTokenResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationGetEntityTokenResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAuthenticationValidateEntityTokenRequestEvent != null) { foreach (var each in OnAuthenticationValidateEntityTokenRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationValidateEntityTokenRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAuthenticationValidateEntityTokenResultEvent != null) { foreach (var each in OnAuthenticationValidateEntityTokenResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAuthenticationValidateEntityTokenResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnCloudScriptExecuteEntityCloudScriptRequestEvent != null) { foreach (var each in OnCloudScriptExecuteEntityCloudScriptRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptExecuteEntityCloudScriptRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptExecuteEntityCloudScriptResultEvent != null) { foreach (var each in OnCloudScriptExecuteEntityCloudScriptResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptExecuteEntityCloudScriptResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptExecuteFunctionRequestEvent != null) { foreach (var each in OnCloudScriptExecuteFunctionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptExecuteFunctionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptExecuteFunctionResultEvent != null) { foreach (var each in OnCloudScriptExecuteFunctionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptExecuteFunctionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptGetFunctionRequestEvent != null) { foreach (var each in OnCloudScriptGetFunctionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptGetFunctionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptGetFunctionResultEvent != null) { foreach (var each in OnCloudScriptGetFunctionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptGetFunctionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptListEventHubFunctionsRequestEvent != null) { foreach (var each in OnCloudScriptListEventHubFunctionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListEventHubFunctionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptListEventHubFunctionsResultEvent != null) { foreach (var each in OnCloudScriptListEventHubFunctionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListEventHubFunctionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptListFunctionsRequestEvent != null) { foreach (var each in OnCloudScriptListFunctionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListFunctionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptListFunctionsResultEvent != null) { foreach (var each in OnCloudScriptListFunctionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListFunctionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptListHttpFunctionsRequestEvent != null) { foreach (var each in OnCloudScriptListHttpFunctionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListHttpFunctionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptListHttpFunctionsResultEvent != null) { foreach (var each in OnCloudScriptListHttpFunctionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListHttpFunctionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptListQueuedFunctionsRequestEvent != null) { foreach (var each in OnCloudScriptListQueuedFunctionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListQueuedFunctionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptListQueuedFunctionsResultEvent != null) { foreach (var each in OnCloudScriptListQueuedFunctionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptListQueuedFunctionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptPostFunctionResultForEntityTriggeredActionRequestEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForEntityTriggeredActionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForEntityTriggeredActionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptPostFunctionResultForEntityTriggeredActionResultEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForEntityTriggeredActionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForEntityTriggeredActionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptPostFunctionResultForFunctionExecutionRequestEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForFunctionExecutionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForFunctionExecutionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptPostFunctionResultForFunctionExecutionResultEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForFunctionExecutionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForFunctionExecutionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptPostFunctionResultForPlayerTriggeredActionRequestEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForPlayerTriggeredActionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForPlayerTriggeredActionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptPostFunctionResultForScheduledTaskResultEvent != null) { foreach (var each in OnCloudScriptPostFunctionResultForScheduledTaskResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptPostFunctionResultForScheduledTaskResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptRegisterEventHubFunctionRequestEvent != null) { foreach (var each in OnCloudScriptRegisterEventHubFunctionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptRegisterEventHubFunctionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptRegisterEventHubFunctionResultEvent != null) { foreach (var each in OnCloudScriptRegisterEventHubFunctionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptRegisterEventHubFunctionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptRegisterHttpFunctionRequestEvent != null) { foreach (var each in OnCloudScriptRegisterHttpFunctionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptRegisterHttpFunctionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptRegisterHttpFunctionResultEvent != null) { foreach (var each in OnCloudScriptRegisterHttpFunctionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptRegisterHttpFunctionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptRegisterQueuedFunctionRequestEvent != null) { foreach (var each in OnCloudScriptRegisterQueuedFunctionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptRegisterQueuedFunctionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptRegisterQueuedFunctionResultEvent != null) { foreach (var each in OnCloudScriptRegisterQueuedFunctionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptRegisterQueuedFunctionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnCloudScriptUnregisterFunctionRequestEvent != null) { foreach (var each in OnCloudScriptUnregisterFunctionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptUnregisterFunctionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnCloudScriptUnregisterFunctionResultEvent != null) { foreach (var each in OnCloudScriptUnregisterFunctionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnCloudScriptUnregisterFunctionResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnDataAbortFileUploadsRequestEvent != null) { foreach (var each in OnDataAbortFileUploadsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataAbortFileUploadsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnDataAbortFileUploadsResultEvent != null) { foreach (var each in OnDataAbortFileUploadsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataAbortFileUploadsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnDataDeleteFilesRequestEvent != null) { foreach (var each in OnDataDeleteFilesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataDeleteFilesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnDataDeleteFilesResultEvent != null) { foreach (var each in OnDataDeleteFilesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataDeleteFilesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnDataFinalizeFileUploadsRequestEvent != null) { foreach (var each in OnDataFinalizeFileUploadsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataFinalizeFileUploadsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnDataFinalizeFileUploadsResultEvent != null) { foreach (var each in OnDataFinalizeFileUploadsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataFinalizeFileUploadsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnDataGetFilesRequestEvent != null) { foreach (var each in OnDataGetFilesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataGetFilesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnDataGetFilesResultEvent != null) { foreach (var each in OnDataGetFilesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataGetFilesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnDataGetObjectsRequestEvent != null) { foreach (var each in OnDataGetObjectsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataGetObjectsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnDataGetObjectsResultEvent != null) { foreach (var each in OnDataGetObjectsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataGetObjectsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnDataInitiateFileUploadsRequestEvent != null) { foreach (var each in OnDataInitiateFileUploadsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataInitiateFileUploadsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnDataInitiateFileUploadsResultEvent != null) { foreach (var each in OnDataInitiateFileUploadsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataInitiateFileUploadsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnDataSetObjectsRequestEvent != null) { foreach (var each in OnDataSetObjectsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataSetObjectsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnDataSetObjectsResultEvent != null) { foreach (var each in OnDataSetObjectsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnDataSetObjectsResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnEconomyAddInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyAddInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyAddInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyAddInventoryItemsResultEvent != null) { foreach (var each in OnEconomyAddInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyAddInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyCreateDraftItemRequestEvent != null) { foreach (var each in OnEconomyCreateDraftItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyCreateDraftItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyCreateDraftItemResultEvent != null) { foreach (var each in OnEconomyCreateDraftItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyCreateDraftItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyCreateUploadUrlsRequestEvent != null) { foreach (var each in OnEconomyCreateUploadUrlsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyCreateUploadUrlsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyCreateUploadUrlsResultEvent != null) { foreach (var each in OnEconomyCreateUploadUrlsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyCreateUploadUrlsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyDeleteEntityItemReviewsRequestEvent != null) { foreach (var each in OnEconomyDeleteEntityItemReviewsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteEntityItemReviewsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyDeleteEntityItemReviewsResultEvent != null) { foreach (var each in OnEconomyDeleteEntityItemReviewsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteEntityItemReviewsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyDeleteInventoryCollectionRequestEvent != null) { foreach (var each in OnEconomyDeleteInventoryCollectionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteInventoryCollectionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyDeleteInventoryCollectionResultEvent != null) { foreach (var each in OnEconomyDeleteInventoryCollectionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteInventoryCollectionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyDeleteInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyDeleteInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyDeleteInventoryItemsResultEvent != null) { foreach (var each in OnEconomyDeleteInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyDeleteItemRequestEvent != null) { foreach (var each in OnEconomyDeleteItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyDeleteItemResultEvent != null) { foreach (var each in OnEconomyDeleteItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyDeleteItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyExecuteInventoryOperationsRequestEvent != null) { foreach (var each in OnEconomyExecuteInventoryOperationsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyExecuteInventoryOperationsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyExecuteInventoryOperationsResultEvent != null) { foreach (var each in OnEconomyExecuteInventoryOperationsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyExecuteInventoryOperationsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyExecuteTransferOperationsRequestEvent != null) { foreach (var each in OnEconomyExecuteTransferOperationsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyExecuteTransferOperationsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyExecuteTransferOperationsResultEvent != null) { foreach (var each in OnEconomyExecuteTransferOperationsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyExecuteTransferOperationsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetCatalogConfigRequestEvent != null) { foreach (var each in OnEconomyGetCatalogConfigRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetCatalogConfigRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetCatalogConfigResultEvent != null) { foreach (var each in OnEconomyGetCatalogConfigResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetCatalogConfigResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetDraftItemRequestEvent != null) { foreach (var each in OnEconomyGetDraftItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetDraftItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetDraftItemResultEvent != null) { foreach (var each in OnEconomyGetDraftItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetDraftItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetDraftItemsRequestEvent != null) { foreach (var each in OnEconomyGetDraftItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetDraftItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetDraftItemsResultEvent != null) { foreach (var each in OnEconomyGetDraftItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetDraftItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetEntityDraftItemsRequestEvent != null) { foreach (var each in OnEconomyGetEntityDraftItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetEntityDraftItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetEntityDraftItemsResultEvent != null) { foreach (var each in OnEconomyGetEntityDraftItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetEntityDraftItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetEntityItemReviewRequestEvent != null) { foreach (var each in OnEconomyGetEntityItemReviewRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetEntityItemReviewRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetEntityItemReviewResultEvent != null) { foreach (var each in OnEconomyGetEntityItemReviewResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetEntityItemReviewResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetInventoryCollectionIdsRequestEvent != null) { foreach (var each in OnEconomyGetInventoryCollectionIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetInventoryCollectionIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetInventoryCollectionIdsResultEvent != null) { foreach (var each in OnEconomyGetInventoryCollectionIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetInventoryCollectionIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyGetInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetInventoryItemsResultEvent != null) { foreach (var each in OnEconomyGetInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetInventoryOperationStatusRequestEvent != null) { foreach (var each in OnEconomyGetInventoryOperationStatusRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetInventoryOperationStatusRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetInventoryOperationStatusResultEvent != null) { foreach (var each in OnEconomyGetInventoryOperationStatusResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetInventoryOperationStatusResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetItemRequestEvent != null) { foreach (var each in OnEconomyGetItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetItemResultEvent != null) { foreach (var each in OnEconomyGetItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetItemContainersRequestEvent != null) { foreach (var each in OnEconomyGetItemContainersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemContainersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetItemContainersResultEvent != null) { foreach (var each in OnEconomyGetItemContainersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemContainersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetItemModerationStateRequestEvent != null) { foreach (var each in OnEconomyGetItemModerationStateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemModerationStateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetItemModerationStateResultEvent != null) { foreach (var each in OnEconomyGetItemModerationStateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemModerationStateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetItemPublishStatusRequestEvent != null) { foreach (var each in OnEconomyGetItemPublishStatusRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemPublishStatusRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetItemPublishStatusResultEvent != null) { foreach (var each in OnEconomyGetItemPublishStatusResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemPublishStatusResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetItemReviewsRequestEvent != null) { foreach (var each in OnEconomyGetItemReviewsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemReviewsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetItemReviewsResultEvent != null) { foreach (var each in OnEconomyGetItemReviewsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemReviewsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetItemReviewSummaryRequestEvent != null) { foreach (var each in OnEconomyGetItemReviewSummaryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemReviewSummaryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetItemReviewSummaryResultEvent != null) { foreach (var each in OnEconomyGetItemReviewSummaryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemReviewSummaryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetItemsRequestEvent != null) { foreach (var each in OnEconomyGetItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetItemsResultEvent != null) { foreach (var each in OnEconomyGetItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetMicrosoftStoreAccessTokensRequestEvent != null) { foreach (var each in OnEconomyGetMicrosoftStoreAccessTokensRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetMicrosoftStoreAccessTokensRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetMicrosoftStoreAccessTokensResultEvent != null) { foreach (var each in OnEconomyGetMicrosoftStoreAccessTokensResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetMicrosoftStoreAccessTokensResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyGetTransactionHistoryRequestEvent != null) { foreach (var each in OnEconomyGetTransactionHistoryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetTransactionHistoryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyGetTransactionHistoryResultEvent != null) { foreach (var each in OnEconomyGetTransactionHistoryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyGetTransactionHistoryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyPublishDraftItemRequestEvent != null) { foreach (var each in OnEconomyPublishDraftItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyPublishDraftItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyPublishDraftItemResultEvent != null) { foreach (var each in OnEconomyPublishDraftItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyPublishDraftItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyPurchaseInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyPurchaseInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyPurchaseInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyPurchaseInventoryItemsResultEvent != null) { foreach (var each in OnEconomyPurchaseInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyPurchaseInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyRedeemAppleAppStoreInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyRedeemAppleAppStoreInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemAppleAppStoreInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyRedeemAppleAppStoreInventoryItemsResultEvent != null) { foreach (var each in OnEconomyRedeemAppleAppStoreInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemAppleAppStoreInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyRedeemGooglePlayInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyRedeemGooglePlayInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemGooglePlayInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyRedeemGooglePlayInventoryItemsResultEvent != null) { foreach (var each in OnEconomyRedeemGooglePlayInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemGooglePlayInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyRedeemMicrosoftStoreInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyRedeemMicrosoftStoreInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemMicrosoftStoreInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyRedeemMicrosoftStoreInventoryItemsResultEvent != null) { foreach (var each in OnEconomyRedeemMicrosoftStoreInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemMicrosoftStoreInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyRedeemNintendoEShopInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyRedeemNintendoEShopInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemNintendoEShopInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyRedeemNintendoEShopInventoryItemsResultEvent != null) { foreach (var each in OnEconomyRedeemNintendoEShopInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemNintendoEShopInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyRedeemPlayStationStoreInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyRedeemPlayStationStoreInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemPlayStationStoreInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyRedeemPlayStationStoreInventoryItemsResultEvent != null) { foreach (var each in OnEconomyRedeemPlayStationStoreInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemPlayStationStoreInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyRedeemSteamInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyRedeemSteamInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemSteamInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyRedeemSteamInventoryItemsResultEvent != null) { foreach (var each in OnEconomyRedeemSteamInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyRedeemSteamInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyReportItemRequestEvent != null) { foreach (var each in OnEconomyReportItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyReportItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyReportItemResultEvent != null) { foreach (var each in OnEconomyReportItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyReportItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyReportItemReviewRequestEvent != null) { foreach (var each in OnEconomyReportItemReviewRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyReportItemReviewRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyReportItemReviewResultEvent != null) { foreach (var each in OnEconomyReportItemReviewResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyReportItemReviewResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyReviewItemRequestEvent != null) { foreach (var each in OnEconomyReviewItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyReviewItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyReviewItemResultEvent != null) { foreach (var each in OnEconomyReviewItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyReviewItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomySearchItemsRequestEvent != null) { foreach (var each in OnEconomySearchItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySearchItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomySearchItemsResultEvent != null) { foreach (var each in OnEconomySearchItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySearchItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomySetItemModerationStateRequestEvent != null) { foreach (var each in OnEconomySetItemModerationStateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySetItemModerationStateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomySetItemModerationStateResultEvent != null) { foreach (var each in OnEconomySetItemModerationStateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySetItemModerationStateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomySubmitItemReviewVoteRequestEvent != null) { foreach (var each in OnEconomySubmitItemReviewVoteRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySubmitItemReviewVoteRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomySubmitItemReviewVoteResultEvent != null) { foreach (var each in OnEconomySubmitItemReviewVoteResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySubmitItemReviewVoteResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomySubtractInventoryItemsRequestEvent != null) { foreach (var each in OnEconomySubtractInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySubtractInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomySubtractInventoryItemsResultEvent != null) { foreach (var each in OnEconomySubtractInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomySubtractInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyTakedownItemReviewsRequestEvent != null) { foreach (var each in OnEconomyTakedownItemReviewsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyTakedownItemReviewsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyTakedownItemReviewsResultEvent != null) { foreach (var each in OnEconomyTakedownItemReviewsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyTakedownItemReviewsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyTransferInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyTransferInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyTransferInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyTransferInventoryItemsResultEvent != null) { foreach (var each in OnEconomyTransferInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyTransferInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyUpdateCatalogConfigRequestEvent != null) { foreach (var each in OnEconomyUpdateCatalogConfigRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyUpdateCatalogConfigRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyUpdateCatalogConfigResultEvent != null) { foreach (var each in OnEconomyUpdateCatalogConfigResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyUpdateCatalogConfigResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyUpdateDraftItemRequestEvent != null) { foreach (var each in OnEconomyUpdateDraftItemRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyUpdateDraftItemRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyUpdateDraftItemResultEvent != null) { foreach (var each in OnEconomyUpdateDraftItemResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyUpdateDraftItemResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEconomyUpdateInventoryItemsRequestEvent != null) { foreach (var each in OnEconomyUpdateInventoryItemsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyUpdateInventoryItemsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEconomyUpdateInventoryItemsResultEvent != null) { foreach (var each in OnEconomyUpdateInventoryItemsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEconomyUpdateInventoryItemsResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnEventsCreateTelemetryKeyRequestEvent != null) { foreach (var each in OnEventsCreateTelemetryKeyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsCreateTelemetryKeyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEventsCreateTelemetryKeyResultEvent != null) { foreach (var each in OnEventsCreateTelemetryKeyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsCreateTelemetryKeyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEventsDeleteTelemetryKeyRequestEvent != null) { foreach (var each in OnEventsDeleteTelemetryKeyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsDeleteTelemetryKeyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEventsDeleteTelemetryKeyResultEvent != null) { foreach (var each in OnEventsDeleteTelemetryKeyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsDeleteTelemetryKeyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEventsGetTelemetryKeyRequestEvent != null) { foreach (var each in OnEventsGetTelemetryKeyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsGetTelemetryKeyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEventsGetTelemetryKeyResultEvent != null) { foreach (var each in OnEventsGetTelemetryKeyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsGetTelemetryKeyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEventsListTelemetryKeysRequestEvent != null) { foreach (var each in OnEventsListTelemetryKeysRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsListTelemetryKeysRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEventsListTelemetryKeysResultEvent != null) { foreach (var each in OnEventsListTelemetryKeysResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsListTelemetryKeysResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEventsSetTelemetryKeyActiveRequestEvent != null) { foreach (var each in OnEventsSetTelemetryKeyActiveRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsSetTelemetryKeyActiveRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEventsSetTelemetryKeyActiveResultEvent != null) { foreach (var each in OnEventsSetTelemetryKeyActiveResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsSetTelemetryKeyActiveResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEventsWriteEventsRequestEvent != null) { foreach (var each in OnEventsWriteEventsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsWriteEventsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEventsWriteEventsResultEvent != null) { foreach (var each in OnEventsWriteEventsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsWriteEventsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnEventsWriteTelemetryEventsRequestEvent != null) { foreach (var each in OnEventsWriteTelemetryEventsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsWriteTelemetryEventsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnEventsWriteTelemetryEventsResultEvent != null) { foreach (var each in OnEventsWriteTelemetryEventsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnEventsWriteTelemetryEventsResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnExperimentationCreateExclusionGroupRequestEvent != null) { foreach (var each in OnExperimentationCreateExclusionGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationCreateExclusionGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationCreateExclusionGroupResultEvent != null) { foreach (var each in OnExperimentationCreateExclusionGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationCreateExclusionGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationCreateExperimentRequestEvent != null) { foreach (var each in OnExperimentationCreateExperimentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationCreateExperimentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationCreateExperimentResultEvent != null) { foreach (var each in OnExperimentationCreateExperimentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationCreateExperimentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationDeleteExclusionGroupRequestEvent != null) { foreach (var each in OnExperimentationDeleteExclusionGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationDeleteExclusionGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationDeleteExclusionGroupResultEvent != null) { foreach (var each in OnExperimentationDeleteExclusionGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationDeleteExclusionGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationDeleteExperimentRequestEvent != null) { foreach (var each in OnExperimentationDeleteExperimentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationDeleteExperimentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationDeleteExperimentResultEvent != null) { foreach (var each in OnExperimentationDeleteExperimentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationDeleteExperimentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationGetExclusionGroupsRequestEvent != null) { foreach (var each in OnExperimentationGetExclusionGroupsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetExclusionGroupsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationGetExclusionGroupsResultEvent != null) { foreach (var each in OnExperimentationGetExclusionGroupsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetExclusionGroupsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationGetExclusionGroupTrafficRequestEvent != null) { foreach (var each in OnExperimentationGetExclusionGroupTrafficRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetExclusionGroupTrafficRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationGetExclusionGroupTrafficResultEvent != null) { foreach (var each in OnExperimentationGetExclusionGroupTrafficResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetExclusionGroupTrafficResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationGetExperimentsRequestEvent != null) { foreach (var each in OnExperimentationGetExperimentsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetExperimentsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationGetExperimentsResultEvent != null) { foreach (var each in OnExperimentationGetExperimentsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetExperimentsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationGetLatestScorecardRequestEvent != null) { foreach (var each in OnExperimentationGetLatestScorecardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetLatestScorecardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationGetLatestScorecardResultEvent != null) { foreach (var each in OnExperimentationGetLatestScorecardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetLatestScorecardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationGetTreatmentAssignmentRequestEvent != null) { foreach (var each in OnExperimentationGetTreatmentAssignmentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetTreatmentAssignmentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationGetTreatmentAssignmentResultEvent != null) { foreach (var each in OnExperimentationGetTreatmentAssignmentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationGetTreatmentAssignmentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationStartExperimentRequestEvent != null) { foreach (var each in OnExperimentationStartExperimentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationStartExperimentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationStartExperimentResultEvent != null) { foreach (var each in OnExperimentationStartExperimentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationStartExperimentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationStopExperimentRequestEvent != null) { foreach (var each in OnExperimentationStopExperimentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationStopExperimentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationStopExperimentResultEvent != null) { foreach (var each in OnExperimentationStopExperimentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationStopExperimentResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationUpdateExclusionGroupRequestEvent != null) { foreach (var each in OnExperimentationUpdateExclusionGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationUpdateExclusionGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationUpdateExclusionGroupResultEvent != null) { foreach (var each in OnExperimentationUpdateExclusionGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationUpdateExclusionGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnExperimentationUpdateExperimentRequestEvent != null) { foreach (var each in OnExperimentationUpdateExperimentRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationUpdateExperimentRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnExperimentationUpdateExperimentResultEvent != null) { foreach (var each in OnExperimentationUpdateExperimentResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnExperimentationUpdateExperimentResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnInsightsGetDetailsRequestEvent != null) { foreach (var each in OnInsightsGetDetailsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetDetailsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnInsightsGetDetailsResultEvent != null) { foreach (var each in OnInsightsGetDetailsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetDetailsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnInsightsGetLimitsRequestEvent != null) { foreach (var each in OnInsightsGetLimitsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetLimitsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnInsightsGetLimitsResultEvent != null) { foreach (var each in OnInsightsGetLimitsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetLimitsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnInsightsGetOperationStatusRequestEvent != null) { foreach (var each in OnInsightsGetOperationStatusRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetOperationStatusRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnInsightsGetOperationStatusResultEvent != null) { foreach (var each in OnInsightsGetOperationStatusResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetOperationStatusResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnInsightsGetPendingOperationsRequestEvent != null) { foreach (var each in OnInsightsGetPendingOperationsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetPendingOperationsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnInsightsGetPendingOperationsResultEvent != null) { foreach (var each in OnInsightsGetPendingOperationsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsGetPendingOperationsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnInsightsSetPerformanceRequestEvent != null) { foreach (var each in OnInsightsSetPerformanceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsSetPerformanceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnInsightsSetPerformanceResultEvent != null) { foreach (var each in OnInsightsSetPerformanceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsSetPerformanceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnInsightsSetStorageRetentionRequestEvent != null) { foreach (var each in OnInsightsSetStorageRetentionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsSetStorageRetentionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnInsightsSetStorageRetentionResultEvent != null) { foreach (var each in OnInsightsSetStorageRetentionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnInsightsSetStorageRetentionResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnGroupsAcceptGroupApplicationRequestEvent != null) { foreach (var each in OnGroupsAcceptGroupApplicationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsAcceptGroupApplicationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsAcceptGroupApplicationResultEvent != null) { foreach (var each in OnGroupsAcceptGroupApplicationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsAcceptGroupApplicationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsAcceptGroupInvitationRequestEvent != null) { foreach (var each in OnGroupsAcceptGroupInvitationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsAcceptGroupInvitationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsAcceptGroupInvitationResultEvent != null) { foreach (var each in OnGroupsAcceptGroupInvitationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsAcceptGroupInvitationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsAddMembersRequestEvent != null) { foreach (var each in OnGroupsAddMembersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsAddMembersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsAddMembersResultEvent != null) { foreach (var each in OnGroupsAddMembersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsAddMembersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsApplyToGroupRequestEvent != null) { foreach (var each in OnGroupsApplyToGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsApplyToGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsApplyToGroupResultEvent != null) { foreach (var each in OnGroupsApplyToGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsApplyToGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsBlockEntityRequestEvent != null) { foreach (var each in OnGroupsBlockEntityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsBlockEntityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsBlockEntityResultEvent != null) { foreach (var each in OnGroupsBlockEntityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsBlockEntityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsChangeMemberRoleRequestEvent != null) { foreach (var each in OnGroupsChangeMemberRoleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsChangeMemberRoleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsChangeMemberRoleResultEvent != null) { foreach (var each in OnGroupsChangeMemberRoleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsChangeMemberRoleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsCreateGroupRequestEvent != null) { foreach (var each in OnGroupsCreateGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsCreateGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsCreateGroupResultEvent != null) { foreach (var each in OnGroupsCreateGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsCreateGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsCreateRoleRequestEvent != null) { foreach (var each in OnGroupsCreateRoleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsCreateRoleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsCreateRoleResultEvent != null) { foreach (var each in OnGroupsCreateRoleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsCreateRoleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsDeleteGroupRequestEvent != null) { foreach (var each in OnGroupsDeleteGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsDeleteGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsDeleteGroupResultEvent != null) { foreach (var each in OnGroupsDeleteGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsDeleteGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsDeleteRoleRequestEvent != null) { foreach (var each in OnGroupsDeleteRoleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsDeleteRoleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsDeleteRoleResultEvent != null) { foreach (var each in OnGroupsDeleteRoleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsDeleteRoleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsGetGroupRequestEvent != null) { foreach (var each in OnGroupsGetGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsGetGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsGetGroupResultEvent != null) { foreach (var each in OnGroupsGetGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsGetGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsInviteToGroupRequestEvent != null) { foreach (var each in OnGroupsInviteToGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsInviteToGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsInviteToGroupResultEvent != null) { foreach (var each in OnGroupsInviteToGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsInviteToGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsIsMemberRequestEvent != null) { foreach (var each in OnGroupsIsMemberRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsIsMemberRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsIsMemberResultEvent != null) { foreach (var each in OnGroupsIsMemberResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsIsMemberResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsListGroupApplicationsRequestEvent != null) { foreach (var each in OnGroupsListGroupApplicationsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupApplicationsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsListGroupApplicationsResultEvent != null) { foreach (var each in OnGroupsListGroupApplicationsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupApplicationsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsListGroupBlocksRequestEvent != null) { foreach (var each in OnGroupsListGroupBlocksRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupBlocksRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsListGroupBlocksResultEvent != null) { foreach (var each in OnGroupsListGroupBlocksResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupBlocksResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsListGroupInvitationsRequestEvent != null) { foreach (var each in OnGroupsListGroupInvitationsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupInvitationsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsListGroupInvitationsResultEvent != null) { foreach (var each in OnGroupsListGroupInvitationsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupInvitationsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsListGroupMembersRequestEvent != null) { foreach (var each in OnGroupsListGroupMembersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupMembersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsListGroupMembersResultEvent != null) { foreach (var each in OnGroupsListGroupMembersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListGroupMembersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsListMembershipRequestEvent != null) { foreach (var each in OnGroupsListMembershipRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListMembershipRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsListMembershipResultEvent != null) { foreach (var each in OnGroupsListMembershipResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListMembershipResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsListMembershipOpportunitiesRequestEvent != null) { foreach (var each in OnGroupsListMembershipOpportunitiesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListMembershipOpportunitiesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsListMembershipOpportunitiesResultEvent != null) { foreach (var each in OnGroupsListMembershipOpportunitiesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsListMembershipOpportunitiesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsRemoveGroupApplicationRequestEvent != null) { foreach (var each in OnGroupsRemoveGroupApplicationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsRemoveGroupApplicationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsRemoveGroupApplicationResultEvent != null) { foreach (var each in OnGroupsRemoveGroupApplicationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsRemoveGroupApplicationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsRemoveGroupInvitationRequestEvent != null) { foreach (var each in OnGroupsRemoveGroupInvitationRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsRemoveGroupInvitationRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsRemoveGroupInvitationResultEvent != null) { foreach (var each in OnGroupsRemoveGroupInvitationResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsRemoveGroupInvitationResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsRemoveMembersRequestEvent != null) { foreach (var each in OnGroupsRemoveMembersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsRemoveMembersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsRemoveMembersResultEvent != null) { foreach (var each in OnGroupsRemoveMembersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsRemoveMembersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsUnblockEntityRequestEvent != null) { foreach (var each in OnGroupsUnblockEntityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsUnblockEntityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsUnblockEntityResultEvent != null) { foreach (var each in OnGroupsUnblockEntityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsUnblockEntityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsUpdateGroupRequestEvent != null) { foreach (var each in OnGroupsUpdateGroupRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsUpdateGroupRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsUpdateGroupResultEvent != null) { foreach (var each in OnGroupsUpdateGroupResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsUpdateGroupResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnGroupsUpdateRoleRequestEvent != null) { foreach (var each in OnGroupsUpdateRoleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsUpdateRoleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnGroupsUpdateRoleResultEvent != null) { foreach (var each in OnGroupsUpdateRoleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnGroupsUpdateRoleResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnProgressionCreateLeaderboardDefinitionRequestEvent != null) { foreach (var each in OnProgressionCreateLeaderboardDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionCreateLeaderboardDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionCreateLeaderboardDefinitionResultEvent != null) { foreach (var each in OnProgressionCreateLeaderboardDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionCreateLeaderboardDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionCreateStatisticDefinitionRequestEvent != null) { foreach (var each in OnProgressionCreateStatisticDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionCreateStatisticDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionCreateStatisticDefinitionResultEvent != null) { foreach (var each in OnProgressionCreateStatisticDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionCreateStatisticDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionDeleteLeaderboardDefinitionRequestEvent != null) { foreach (var each in OnProgressionDeleteLeaderboardDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteLeaderboardDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionDeleteLeaderboardDefinitionResultEvent != null) { foreach (var each in OnProgressionDeleteLeaderboardDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteLeaderboardDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionDeleteLeaderboardEntriesRequestEvent != null) { foreach (var each in OnProgressionDeleteLeaderboardEntriesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteLeaderboardEntriesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionDeleteLeaderboardEntriesResultEvent != null) { foreach (var each in OnProgressionDeleteLeaderboardEntriesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteLeaderboardEntriesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionDeleteStatisticDefinitionRequestEvent != null) { foreach (var each in OnProgressionDeleteStatisticDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteStatisticDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionDeleteStatisticDefinitionResultEvent != null) { foreach (var each in OnProgressionDeleteStatisticDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteStatisticDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionDeleteStatisticsRequestEvent != null) { foreach (var each in OnProgressionDeleteStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionDeleteStatisticsResultEvent != null) { foreach (var each in OnProgressionDeleteStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionDeleteStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetFriendLeaderboardForEntityRequestEvent != null) { foreach (var each in OnProgressionGetFriendLeaderboardForEntityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetFriendLeaderboardForEntityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetFriendLeaderboardForEntityResultEvent != null) { foreach (var each in OnProgressionGetFriendLeaderboardForEntityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetFriendLeaderboardForEntityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetLeaderboardRequestEvent != null) { foreach (var each in OnProgressionGetLeaderboardRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetLeaderboardResultEvent != null) { foreach (var each in OnProgressionGetLeaderboardResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetLeaderboardAroundEntityRequestEvent != null) { foreach (var each in OnProgressionGetLeaderboardAroundEntityRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardAroundEntityRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetLeaderboardAroundEntityResultEvent != null) { foreach (var each in OnProgressionGetLeaderboardAroundEntityResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardAroundEntityResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetLeaderboardDefinitionRequestEvent != null) { foreach (var each in OnProgressionGetLeaderboardDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetLeaderboardDefinitionResultEvent != null) { foreach (var each in OnProgressionGetLeaderboardDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetLeaderboardForEntitiesRequestEvent != null) { foreach (var each in OnProgressionGetLeaderboardForEntitiesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardForEntitiesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetLeaderboardForEntitiesResultEvent != null) { foreach (var each in OnProgressionGetLeaderboardForEntitiesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetLeaderboardForEntitiesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetStatisticDefinitionRequestEvent != null) { foreach (var each in OnProgressionGetStatisticDefinitionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetStatisticDefinitionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetStatisticDefinitionResultEvent != null) { foreach (var each in OnProgressionGetStatisticDefinitionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetStatisticDefinitionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetStatisticsRequestEvent != null) { foreach (var each in OnProgressionGetStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetStatisticsResultEvent != null) { foreach (var each in OnProgressionGetStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionGetStatisticsForEntitiesRequestEvent != null) { foreach (var each in OnProgressionGetStatisticsForEntitiesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetStatisticsForEntitiesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionGetStatisticsForEntitiesResultEvent != null) { foreach (var each in OnProgressionGetStatisticsForEntitiesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionGetStatisticsForEntitiesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionIncrementLeaderboardVersionRequestEvent != null) { foreach (var each in OnProgressionIncrementLeaderboardVersionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionIncrementLeaderboardVersionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionIncrementLeaderboardVersionResultEvent != null) { foreach (var each in OnProgressionIncrementLeaderboardVersionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionIncrementLeaderboardVersionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionIncrementStatisticVersionRequestEvent != null) { foreach (var each in OnProgressionIncrementStatisticVersionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionIncrementStatisticVersionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionIncrementStatisticVersionResultEvent != null) { foreach (var each in OnProgressionIncrementStatisticVersionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionIncrementStatisticVersionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionListLeaderboardDefinitionsRequestEvent != null) { foreach (var each in OnProgressionListLeaderboardDefinitionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionListLeaderboardDefinitionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionListLeaderboardDefinitionsResultEvent != null) { foreach (var each in OnProgressionListLeaderboardDefinitionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionListLeaderboardDefinitionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionListStatisticDefinitionsRequestEvent != null) { foreach (var each in OnProgressionListStatisticDefinitionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionListStatisticDefinitionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionListStatisticDefinitionsResultEvent != null) { foreach (var each in OnProgressionListStatisticDefinitionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionListStatisticDefinitionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionUnlinkLeaderboardFromStatisticRequestEvent != null) { foreach (var each in OnProgressionUnlinkLeaderboardFromStatisticRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionUnlinkLeaderboardFromStatisticRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionUnlinkLeaderboardFromStatisticResultEvent != null) { foreach (var each in OnProgressionUnlinkLeaderboardFromStatisticResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionUnlinkLeaderboardFromStatisticResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionUpdateLeaderboardEntriesRequestEvent != null) { foreach (var each in OnProgressionUpdateLeaderboardEntriesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionUpdateLeaderboardEntriesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionUpdateLeaderboardEntriesResultEvent != null) { foreach (var each in OnProgressionUpdateLeaderboardEntriesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionUpdateLeaderboardEntriesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProgressionUpdateStatisticsRequestEvent != null) { foreach (var each in OnProgressionUpdateStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionUpdateStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProgressionUpdateStatisticsResultEvent != null) { foreach (var each in OnProgressionUpdateStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProgressionUpdateStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnLocalizationGetLanguageListRequestEvent != null) { foreach (var each in OnLocalizationGetLanguageListRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLocalizationGetLanguageListRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnLocalizationGetLanguageListResultEvent != null) { foreach (var each in OnLocalizationGetLanguageListResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnLocalizationGetLanguageListResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnMultiplayerCancelAllMatchmakingTicketsForPlayerRequestEvent != null) { foreach (var each in OnMultiplayerCancelAllMatchmakingTicketsForPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelAllMatchmakingTicketsForPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCancelAllMatchmakingTicketsForPlayerResultEvent != null) { foreach (var each in OnMultiplayerCancelAllMatchmakingTicketsForPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelAllMatchmakingTicketsForPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCancelAllServerBackfillTicketsForPlayerRequestEvent != null) { foreach (var each in OnMultiplayerCancelAllServerBackfillTicketsForPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelAllServerBackfillTicketsForPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCancelAllServerBackfillTicketsForPlayerResultEvent != null) { foreach (var each in OnMultiplayerCancelAllServerBackfillTicketsForPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelAllServerBackfillTicketsForPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCancelMatchmakingTicketRequestEvent != null) { foreach (var each in OnMultiplayerCancelMatchmakingTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelMatchmakingTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCancelMatchmakingTicketResultEvent != null) { foreach (var each in OnMultiplayerCancelMatchmakingTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelMatchmakingTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCancelServerBackfillTicketRequestEvent != null) { foreach (var each in OnMultiplayerCancelServerBackfillTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelServerBackfillTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCancelServerBackfillTicketResultEvent != null) { foreach (var each in OnMultiplayerCancelServerBackfillTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCancelServerBackfillTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateBuildAliasRequestEvent != null) { foreach (var each in OnMultiplayerCreateBuildAliasRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildAliasRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateBuildAliasResultEvent != null) { foreach (var each in OnMultiplayerCreateBuildAliasResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildAliasResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateBuildWithCustomContainerRequestEvent != null) { foreach (var each in OnMultiplayerCreateBuildWithCustomContainerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildWithCustomContainerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateBuildWithCustomContainerResultEvent != null) { foreach (var each in OnMultiplayerCreateBuildWithCustomContainerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildWithCustomContainerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateBuildWithManagedContainerRequestEvent != null) { foreach (var each in OnMultiplayerCreateBuildWithManagedContainerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildWithManagedContainerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateBuildWithManagedContainerResultEvent != null) { foreach (var each in OnMultiplayerCreateBuildWithManagedContainerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildWithManagedContainerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateBuildWithProcessBasedServerRequestEvent != null) { foreach (var each in OnMultiplayerCreateBuildWithProcessBasedServerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildWithProcessBasedServerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateBuildWithProcessBasedServerResultEvent != null) { foreach (var each in OnMultiplayerCreateBuildWithProcessBasedServerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateBuildWithProcessBasedServerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateLobbyRequestEvent != null) { foreach (var each in OnMultiplayerCreateLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateLobbyResultEvent != null) { foreach (var each in OnMultiplayerCreateLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateMatchmakingTicketRequestEvent != null) { foreach (var each in OnMultiplayerCreateMatchmakingTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateMatchmakingTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateMatchmakingTicketResultEvent != null) { foreach (var each in OnMultiplayerCreateMatchmakingTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateMatchmakingTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateRemoteUserRequestEvent != null) { foreach (var each in OnMultiplayerCreateRemoteUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateRemoteUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateRemoteUserResultEvent != null) { foreach (var each in OnMultiplayerCreateRemoteUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateRemoteUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateServerBackfillTicketRequestEvent != null) { foreach (var each in OnMultiplayerCreateServerBackfillTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateServerBackfillTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateServerBackfillTicketResultEvent != null) { foreach (var each in OnMultiplayerCreateServerBackfillTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateServerBackfillTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateServerMatchmakingTicketRequestEvent != null) { foreach (var each in OnMultiplayerCreateServerMatchmakingTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateServerMatchmakingTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateServerMatchmakingTicketResultEvent != null) { foreach (var each in OnMultiplayerCreateServerMatchmakingTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateServerMatchmakingTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerCreateTitleMultiplayerServersQuotaChangeRequestEvent != null) { foreach (var each in OnMultiplayerCreateTitleMultiplayerServersQuotaChangeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateTitleMultiplayerServersQuotaChangeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerCreateTitleMultiplayerServersQuotaChangeResultEvent != null) { foreach (var each in OnMultiplayerCreateTitleMultiplayerServersQuotaChangeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerCreateTitleMultiplayerServersQuotaChangeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteAssetRequestEvent != null) { foreach (var each in OnMultiplayerDeleteAssetRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteAssetRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteAssetResultEvent != null) { foreach (var each in OnMultiplayerDeleteAssetResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteAssetResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteBuildRequestEvent != null) { foreach (var each in OnMultiplayerDeleteBuildRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteBuildRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteBuildResultEvent != null) { foreach (var each in OnMultiplayerDeleteBuildResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteBuildResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteBuildAliasRequestEvent != null) { foreach (var each in OnMultiplayerDeleteBuildAliasRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteBuildAliasRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteBuildAliasResultEvent != null) { foreach (var each in OnMultiplayerDeleteBuildAliasResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteBuildAliasResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteBuildRegionRequestEvent != null) { foreach (var each in OnMultiplayerDeleteBuildRegionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteBuildRegionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteBuildRegionResultEvent != null) { foreach (var each in OnMultiplayerDeleteBuildRegionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteBuildRegionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteCertificateRequestEvent != null) { foreach (var each in OnMultiplayerDeleteCertificateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteCertificateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteCertificateResultEvent != null) { foreach (var each in OnMultiplayerDeleteCertificateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteCertificateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteContainerImageRepositoryRequestEvent != null) { foreach (var each in OnMultiplayerDeleteContainerImageRepositoryRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteContainerImageRepositoryRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteContainerImageRepositoryResultEvent != null) { foreach (var each in OnMultiplayerDeleteContainerImageRepositoryResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteContainerImageRepositoryResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteLobbyRequestEvent != null) { foreach (var each in OnMultiplayerDeleteLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteLobbyResultEvent != null) { foreach (var each in OnMultiplayerDeleteLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteRemoteUserRequestEvent != null) { foreach (var each in OnMultiplayerDeleteRemoteUserRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteRemoteUserRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteRemoteUserResultEvent != null) { foreach (var each in OnMultiplayerDeleteRemoteUserResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteRemoteUserResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerDeleteSecretRequestEvent != null) { foreach (var each in OnMultiplayerDeleteSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerDeleteSecretResultEvent != null) { foreach (var each in OnMultiplayerDeleteSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerDeleteSecretResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerEnableMultiplayerServersForTitleRequestEvent != null) { foreach (var each in OnMultiplayerEnableMultiplayerServersForTitleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerEnableMultiplayerServersForTitleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerEnableMultiplayerServersForTitleResultEvent != null) { foreach (var each in OnMultiplayerEnableMultiplayerServersForTitleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerEnableMultiplayerServersForTitleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerFindFriendLobbiesRequestEvent != null) { foreach (var each in OnMultiplayerFindFriendLobbiesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerFindFriendLobbiesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerFindFriendLobbiesResultEvent != null) { foreach (var each in OnMultiplayerFindFriendLobbiesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerFindFriendLobbiesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerFindLobbiesRequestEvent != null) { foreach (var each in OnMultiplayerFindLobbiesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerFindLobbiesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerFindLobbiesResultEvent != null) { foreach (var each in OnMultiplayerFindLobbiesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerFindLobbiesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetAssetDownloadUrlRequestEvent != null) { foreach (var each in OnMultiplayerGetAssetDownloadUrlRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetAssetDownloadUrlRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetAssetDownloadUrlResultEvent != null) { foreach (var each in OnMultiplayerGetAssetDownloadUrlResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetAssetDownloadUrlResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetAssetUploadUrlRequestEvent != null) { foreach (var each in OnMultiplayerGetAssetUploadUrlRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetAssetUploadUrlRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetAssetUploadUrlResultEvent != null) { foreach (var each in OnMultiplayerGetAssetUploadUrlResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetAssetUploadUrlResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetBuildRequestEvent != null) { foreach (var each in OnMultiplayerGetBuildRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetBuildRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetBuildResultEvent != null) { foreach (var each in OnMultiplayerGetBuildResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetBuildResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetBuildAliasRequestEvent != null) { foreach (var each in OnMultiplayerGetBuildAliasRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetBuildAliasRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetBuildAliasResultEvent != null) { foreach (var each in OnMultiplayerGetBuildAliasResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetBuildAliasResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetContainerRegistryCredentialsRequestEvent != null) { foreach (var each in OnMultiplayerGetContainerRegistryCredentialsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetContainerRegistryCredentialsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetContainerRegistryCredentialsResultEvent != null) { foreach (var each in OnMultiplayerGetContainerRegistryCredentialsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetContainerRegistryCredentialsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetLobbyRequestEvent != null) { foreach (var each in OnMultiplayerGetLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetLobbyResultEvent != null) { foreach (var each in OnMultiplayerGetLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetMatchRequestEvent != null) { foreach (var each in OnMultiplayerGetMatchRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMatchRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetMatchResultEvent != null) { foreach (var each in OnMultiplayerGetMatchResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMatchResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetMatchmakingQueueRequestEvent != null) { foreach (var each in OnMultiplayerGetMatchmakingQueueRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMatchmakingQueueRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetMatchmakingQueueResultEvent != null) { foreach (var each in OnMultiplayerGetMatchmakingQueueResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMatchmakingQueueResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetMatchmakingTicketRequestEvent != null) { foreach (var each in OnMultiplayerGetMatchmakingTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMatchmakingTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetMatchmakingTicketResultEvent != null) { foreach (var each in OnMultiplayerGetMatchmakingTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMatchmakingTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetMultiplayerServerDetailsRequestEvent != null) { foreach (var each in OnMultiplayerGetMultiplayerServerDetailsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMultiplayerServerDetailsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetMultiplayerServerDetailsResultEvent != null) { foreach (var each in OnMultiplayerGetMultiplayerServerDetailsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMultiplayerServerDetailsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetMultiplayerServerLogsRequestEvent != null) { foreach (var each in OnMultiplayerGetMultiplayerServerLogsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMultiplayerServerLogsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetMultiplayerServerLogsResultEvent != null) { foreach (var each in OnMultiplayerGetMultiplayerServerLogsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMultiplayerServerLogsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetMultiplayerSessionLogsBySessionIdRequestEvent != null) { foreach (var each in OnMultiplayerGetMultiplayerSessionLogsBySessionIdRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMultiplayerSessionLogsBySessionIdRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetMultiplayerSessionLogsBySessionIdResultEvent != null) { foreach (var each in OnMultiplayerGetMultiplayerSessionLogsBySessionIdResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetMultiplayerSessionLogsBySessionIdResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetQueueStatisticsRequestEvent != null) { foreach (var each in OnMultiplayerGetQueueStatisticsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetQueueStatisticsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetQueueStatisticsResultEvent != null) { foreach (var each in OnMultiplayerGetQueueStatisticsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetQueueStatisticsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetRemoteLoginEndpointRequestEvent != null) { foreach (var each in OnMultiplayerGetRemoteLoginEndpointRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetRemoteLoginEndpointRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetRemoteLoginEndpointResultEvent != null) { foreach (var each in OnMultiplayerGetRemoteLoginEndpointResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetRemoteLoginEndpointResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetServerBackfillTicketRequestEvent != null) { foreach (var each in OnMultiplayerGetServerBackfillTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetServerBackfillTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetServerBackfillTicketResultEvent != null) { foreach (var each in OnMultiplayerGetServerBackfillTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetServerBackfillTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetTitleEnabledForMultiplayerServersStatusRequestEvent != null) { foreach (var each in OnMultiplayerGetTitleEnabledForMultiplayerServersStatusRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetTitleEnabledForMultiplayerServersStatusRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetTitleEnabledForMultiplayerServersStatusResultEvent != null) { foreach (var each in OnMultiplayerGetTitleEnabledForMultiplayerServersStatusResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetTitleEnabledForMultiplayerServersStatusResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetTitleMultiplayerServersQuotaChangeRequestEvent != null) { foreach (var each in OnMultiplayerGetTitleMultiplayerServersQuotaChangeRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetTitleMultiplayerServersQuotaChangeRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetTitleMultiplayerServersQuotaChangeResultEvent != null) { foreach (var each in OnMultiplayerGetTitleMultiplayerServersQuotaChangeResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetTitleMultiplayerServersQuotaChangeResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerGetTitleMultiplayerServersQuotasRequestEvent != null) { foreach (var each in OnMultiplayerGetTitleMultiplayerServersQuotasRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetTitleMultiplayerServersQuotasRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerGetTitleMultiplayerServersQuotasResultEvent != null) { foreach (var each in OnMultiplayerGetTitleMultiplayerServersQuotasResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerGetTitleMultiplayerServersQuotasResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerInviteToLobbyRequestEvent != null) { foreach (var each in OnMultiplayerInviteToLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerInviteToLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerInviteToLobbyResultEvent != null) { foreach (var each in OnMultiplayerInviteToLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerInviteToLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerJoinArrangedLobbyRequestEvent != null) { foreach (var each in OnMultiplayerJoinArrangedLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinArrangedLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerJoinArrangedLobbyResultEvent != null) { foreach (var each in OnMultiplayerJoinArrangedLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinArrangedLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerJoinLobbyRequestEvent != null) { foreach (var each in OnMultiplayerJoinLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerJoinLobbyResultEvent != null) { foreach (var each in OnMultiplayerJoinLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerJoinLobbyAsServerRequestEvent != null) { foreach (var each in OnMultiplayerJoinLobbyAsServerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinLobbyAsServerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerJoinLobbyAsServerResultEvent != null) { foreach (var each in OnMultiplayerJoinLobbyAsServerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinLobbyAsServerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerJoinMatchmakingTicketRequestEvent != null) { foreach (var each in OnMultiplayerJoinMatchmakingTicketRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinMatchmakingTicketRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerJoinMatchmakingTicketResultEvent != null) { foreach (var each in OnMultiplayerJoinMatchmakingTicketResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerJoinMatchmakingTicketResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerLeaveLobbyRequestEvent != null) { foreach (var each in OnMultiplayerLeaveLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerLeaveLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerLeaveLobbyResultEvent != null) { foreach (var each in OnMultiplayerLeaveLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerLeaveLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerLeaveLobbyAsServerRequestEvent != null) { foreach (var each in OnMultiplayerLeaveLobbyAsServerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerLeaveLobbyAsServerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerLeaveLobbyAsServerResultEvent != null) { foreach (var each in OnMultiplayerLeaveLobbyAsServerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerLeaveLobbyAsServerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListArchivedMultiplayerServersRequestEvent != null) { foreach (var each in OnMultiplayerListArchivedMultiplayerServersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListArchivedMultiplayerServersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListArchivedMultiplayerServersResultEvent != null) { foreach (var each in OnMultiplayerListArchivedMultiplayerServersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListArchivedMultiplayerServersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListAssetSummariesRequestEvent != null) { foreach (var each in OnMultiplayerListAssetSummariesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListAssetSummariesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListAssetSummariesResultEvent != null) { foreach (var each in OnMultiplayerListAssetSummariesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListAssetSummariesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListBuildAliasesRequestEvent != null) { foreach (var each in OnMultiplayerListBuildAliasesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListBuildAliasesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListBuildAliasesResultEvent != null) { foreach (var each in OnMultiplayerListBuildAliasesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListBuildAliasesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListBuildSummariesV2RequestEvent != null) { foreach (var each in OnMultiplayerListBuildSummariesV2RequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListBuildSummariesV2RequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListBuildSummariesV2ResultEvent != null) { foreach (var each in OnMultiplayerListBuildSummariesV2ResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListBuildSummariesV2ResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListCertificateSummariesRequestEvent != null) { foreach (var each in OnMultiplayerListCertificateSummariesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListCertificateSummariesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListCertificateSummariesResultEvent != null) { foreach (var each in OnMultiplayerListCertificateSummariesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListCertificateSummariesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListContainerImagesRequestEvent != null) { foreach (var each in OnMultiplayerListContainerImagesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListContainerImagesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListContainerImagesResultEvent != null) { foreach (var each in OnMultiplayerListContainerImagesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListContainerImagesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListContainerImageTagsRequestEvent != null) { foreach (var each in OnMultiplayerListContainerImageTagsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListContainerImageTagsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListContainerImageTagsResultEvent != null) { foreach (var each in OnMultiplayerListContainerImageTagsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListContainerImageTagsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListMatchmakingQueuesRequestEvent != null) { foreach (var each in OnMultiplayerListMatchmakingQueuesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListMatchmakingQueuesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListMatchmakingQueuesResultEvent != null) { foreach (var each in OnMultiplayerListMatchmakingQueuesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListMatchmakingQueuesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListMatchmakingTicketsForPlayerRequestEvent != null) { foreach (var each in OnMultiplayerListMatchmakingTicketsForPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListMatchmakingTicketsForPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListMatchmakingTicketsForPlayerResultEvent != null) { foreach (var each in OnMultiplayerListMatchmakingTicketsForPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListMatchmakingTicketsForPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListMultiplayerServersRequestEvent != null) { foreach (var each in OnMultiplayerListMultiplayerServersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListMultiplayerServersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListMultiplayerServersResultEvent != null) { foreach (var each in OnMultiplayerListMultiplayerServersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListMultiplayerServersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListPartyQosServersRequestEvent != null) { foreach (var each in OnMultiplayerListPartyQosServersRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListPartyQosServersRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListPartyQosServersResultEvent != null) { foreach (var each in OnMultiplayerListPartyQosServersResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListPartyQosServersResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListQosServersForTitleRequestEvent != null) { foreach (var each in OnMultiplayerListQosServersForTitleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListQosServersForTitleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListQosServersForTitleResultEvent != null) { foreach (var each in OnMultiplayerListQosServersForTitleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListQosServersForTitleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListSecretSummariesRequestEvent != null) { foreach (var each in OnMultiplayerListSecretSummariesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListSecretSummariesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListSecretSummariesResultEvent != null) { foreach (var each in OnMultiplayerListSecretSummariesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListSecretSummariesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListServerBackfillTicketsForPlayerRequestEvent != null) { foreach (var each in OnMultiplayerListServerBackfillTicketsForPlayerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListServerBackfillTicketsForPlayerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListServerBackfillTicketsForPlayerResultEvent != null) { foreach (var each in OnMultiplayerListServerBackfillTicketsForPlayerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListServerBackfillTicketsForPlayerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListTitleMultiplayerServersQuotaChangesRequestEvent != null) { foreach (var each in OnMultiplayerListTitleMultiplayerServersQuotaChangesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListTitleMultiplayerServersQuotaChangesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListTitleMultiplayerServersQuotaChangesResultEvent != null) { foreach (var each in OnMultiplayerListTitleMultiplayerServersQuotaChangesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListTitleMultiplayerServersQuotaChangesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerListVirtualMachineSummariesRequestEvent != null) { foreach (var each in OnMultiplayerListVirtualMachineSummariesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListVirtualMachineSummariesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerListVirtualMachineSummariesResultEvent != null) { foreach (var each in OnMultiplayerListVirtualMachineSummariesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerListVirtualMachineSummariesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerRemoveMatchmakingQueueRequestEvent != null) { foreach (var each in OnMultiplayerRemoveMatchmakingQueueRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRemoveMatchmakingQueueRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerRemoveMatchmakingQueueResultEvent != null) { foreach (var each in OnMultiplayerRemoveMatchmakingQueueResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRemoveMatchmakingQueueResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerRemoveMemberRequestEvent != null) { foreach (var each in OnMultiplayerRemoveMemberRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRemoveMemberRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerRemoveMemberResultEvent != null) { foreach (var each in OnMultiplayerRemoveMemberResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRemoveMemberResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerRequestMultiplayerServerRequestEvent != null) { foreach (var each in OnMultiplayerRequestMultiplayerServerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRequestMultiplayerServerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerRequestMultiplayerServerResultEvent != null) { foreach (var each in OnMultiplayerRequestMultiplayerServerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRequestMultiplayerServerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerRequestPartyServiceRequestEvent != null) { foreach (var each in OnMultiplayerRequestPartyServiceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRequestPartyServiceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerRequestPartyServiceResultEvent != null) { foreach (var each in OnMultiplayerRequestPartyServiceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRequestPartyServiceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerRolloverContainerRegistryCredentialsRequestEvent != null) { foreach (var each in OnMultiplayerRolloverContainerRegistryCredentialsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRolloverContainerRegistryCredentialsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerRolloverContainerRegistryCredentialsResultEvent != null) { foreach (var each in OnMultiplayerRolloverContainerRegistryCredentialsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerRolloverContainerRegistryCredentialsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerSetMatchmakingQueueRequestEvent != null) { foreach (var each in OnMultiplayerSetMatchmakingQueueRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerSetMatchmakingQueueRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerSetMatchmakingQueueResultEvent != null) { foreach (var each in OnMultiplayerSetMatchmakingQueueResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerSetMatchmakingQueueResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerShutdownMultiplayerServerRequestEvent != null) { foreach (var each in OnMultiplayerShutdownMultiplayerServerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerShutdownMultiplayerServerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerShutdownMultiplayerServerResultEvent != null) { foreach (var each in OnMultiplayerShutdownMultiplayerServerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerShutdownMultiplayerServerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerSubscribeToLobbyResourceRequestEvent != null) { foreach (var each in OnMultiplayerSubscribeToLobbyResourceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerSubscribeToLobbyResourceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerSubscribeToLobbyResourceResultEvent != null) { foreach (var each in OnMultiplayerSubscribeToLobbyResourceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerSubscribeToLobbyResourceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerSubscribeToMatchmakingResourceRequestEvent != null) { foreach (var each in OnMultiplayerSubscribeToMatchmakingResourceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerSubscribeToMatchmakingResourceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerSubscribeToMatchmakingResourceResultEvent != null) { foreach (var each in OnMultiplayerSubscribeToMatchmakingResourceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerSubscribeToMatchmakingResourceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUnsubscribeFromLobbyResourceRequestEvent != null) { foreach (var each in OnMultiplayerUnsubscribeFromLobbyResourceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUnsubscribeFromLobbyResourceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUnsubscribeFromLobbyResourceResultEvent != null) { foreach (var each in OnMultiplayerUnsubscribeFromLobbyResourceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUnsubscribeFromLobbyResourceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUnsubscribeFromMatchmakingResourceRequestEvent != null) { foreach (var each in OnMultiplayerUnsubscribeFromMatchmakingResourceRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUnsubscribeFromMatchmakingResourceRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUnsubscribeFromMatchmakingResourceResultEvent != null) { foreach (var each in OnMultiplayerUnsubscribeFromMatchmakingResourceResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUnsubscribeFromMatchmakingResourceResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUntagContainerImageRequestEvent != null) { foreach (var each in OnMultiplayerUntagContainerImageRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUntagContainerImageRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUntagContainerImageResultEvent != null) { foreach (var each in OnMultiplayerUntagContainerImageResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUntagContainerImageResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUpdateBuildAliasRequestEvent != null) { foreach (var each in OnMultiplayerUpdateBuildAliasRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildAliasRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUpdateBuildAliasResultEvent != null) { foreach (var each in OnMultiplayerUpdateBuildAliasResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildAliasResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUpdateBuildNameRequestEvent != null) { foreach (var each in OnMultiplayerUpdateBuildNameRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildNameRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUpdateBuildNameResultEvent != null) { foreach (var each in OnMultiplayerUpdateBuildNameResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildNameResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUpdateBuildRegionRequestEvent != null) { foreach (var each in OnMultiplayerUpdateBuildRegionRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildRegionRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUpdateBuildRegionResultEvent != null) { foreach (var each in OnMultiplayerUpdateBuildRegionResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildRegionResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUpdateBuildRegionsRequestEvent != null) { foreach (var each in OnMultiplayerUpdateBuildRegionsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildRegionsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUpdateBuildRegionsResultEvent != null) { foreach (var each in OnMultiplayerUpdateBuildRegionsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateBuildRegionsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUpdateLobbyRequestEvent != null) { foreach (var each in OnMultiplayerUpdateLobbyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateLobbyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUpdateLobbyResultEvent != null) { foreach (var each in OnMultiplayerUpdateLobbyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateLobbyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUpdateLobbyAsServerRequestEvent != null) { foreach (var each in OnMultiplayerUpdateLobbyAsServerRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateLobbyAsServerRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUpdateLobbyAsServerResultEvent != null) { foreach (var each in OnMultiplayerUpdateLobbyAsServerResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUpdateLobbyAsServerResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUploadCertificateRequestEvent != null) { foreach (var each in OnMultiplayerUploadCertificateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUploadCertificateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUploadCertificateResultEvent != null) { foreach (var each in OnMultiplayerUploadCertificateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUploadCertificateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnMultiplayerUploadSecretRequestEvent != null) { foreach (var each in OnMultiplayerUploadSecretRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUploadSecretRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnMultiplayerUploadSecretResultEvent != null) { foreach (var each in OnMultiplayerUploadSecretResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnMultiplayerUploadSecretResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnProfilesGetGlobalPolicyRequestEvent != null) { foreach (var each in OnProfilesGetGlobalPolicyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetGlobalPolicyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesGetGlobalPolicyResultEvent != null) { foreach (var each in OnProfilesGetGlobalPolicyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetGlobalPolicyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesGetProfileRequestEvent != null) { foreach (var each in OnProfilesGetProfileRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetProfileRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesGetProfileResultEvent != null) { foreach (var each in OnProfilesGetProfileResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetProfileResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesGetProfilesRequestEvent != null) { foreach (var each in OnProfilesGetProfilesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetProfilesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesGetProfilesResultEvent != null) { foreach (var each in OnProfilesGetProfilesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetProfilesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsRequestEvent != null) { foreach (var each in OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsResultEvent != null) { foreach (var each in OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesGetTitlePlayersFromXboxLiveIDsRequestEvent != null) { foreach (var each in OnProfilesGetTitlePlayersFromXboxLiveIDsRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetTitlePlayersFromXboxLiveIDsRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesGetTitlePlayersFromXboxLiveIDsResultEvent != null) { foreach (var each in OnProfilesGetTitlePlayersFromXboxLiveIDsResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesGetTitlePlayersFromXboxLiveIDsResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesSetDisplayNameRequestEvent != null) { foreach (var each in OnProfilesSetDisplayNameRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetDisplayNameRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesSetDisplayNameResultEvent != null) { foreach (var each in OnProfilesSetDisplayNameResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetDisplayNameResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesSetGlobalPolicyRequestEvent != null) { foreach (var each in OnProfilesSetGlobalPolicyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetGlobalPolicyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesSetGlobalPolicyResultEvent != null) { foreach (var each in OnProfilesSetGlobalPolicyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetGlobalPolicyResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesSetProfileLanguageRequestEvent != null) { foreach (var each in OnProfilesSetProfileLanguageRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetProfileLanguageRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesSetProfileLanguageResultEvent != null) { foreach (var each in OnProfilesSetProfileLanguageResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetProfileLanguageResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnProfilesSetProfilePolicyRequestEvent != null) { foreach (var each in OnProfilesSetProfilePolicyRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetProfilePolicyRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnProfilesSetProfilePolicyResultEvent != null) { foreach (var each in OnProfilesSetProfilePolicyResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnProfilesSetProfilePolicyResultEvent -= (PlayFabResultEvent)each; } } } + +#endif +#if ENABLE_PLAYFABSERVER_API +#endif +#if !DISABLE_PLAYFABENTITY_API + if (OnAddonCreateOrUpdateAppleRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateAppleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateAppleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateAppleResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateAppleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateAppleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdateFacebookRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateFacebookRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateFacebookRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateFacebookResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateFacebookResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateFacebookResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdateFacebookInstantGamesRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateFacebookInstantGamesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateFacebookInstantGamesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateFacebookInstantGamesResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateFacebookInstantGamesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateFacebookInstantGamesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdateGoogleRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateGoogleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateGoogleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateGoogleResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateGoogleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateGoogleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdateKongregateRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateKongregateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateKongregateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateKongregateResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateKongregateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateKongregateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdateNintendoRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateNintendoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateNintendoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateNintendoResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateNintendoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateNintendoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdatePSNRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdatePSNRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdatePSNRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdatePSNResultEvent != null) { foreach (var each in OnAddonCreateOrUpdatePSNResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdatePSNResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdateSteamRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateSteamRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateSteamRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateSteamResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateSteamResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateSteamResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonCreateOrUpdateTwitchRequestEvent != null) { foreach (var each in OnAddonCreateOrUpdateTwitchRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateTwitchRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonCreateOrUpdateTwitchResultEvent != null) { foreach (var each in OnAddonCreateOrUpdateTwitchResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonCreateOrUpdateTwitchResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteAppleRequestEvent != null) { foreach (var each in OnAddonDeleteAppleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteAppleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteAppleResultEvent != null) { foreach (var each in OnAddonDeleteAppleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteAppleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteFacebookRequestEvent != null) { foreach (var each in OnAddonDeleteFacebookRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteFacebookRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteFacebookResultEvent != null) { foreach (var each in OnAddonDeleteFacebookResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteFacebookResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteFacebookInstantGamesRequestEvent != null) { foreach (var each in OnAddonDeleteFacebookInstantGamesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteFacebookInstantGamesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteFacebookInstantGamesResultEvent != null) { foreach (var each in OnAddonDeleteFacebookInstantGamesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteFacebookInstantGamesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteGoogleRequestEvent != null) { foreach (var each in OnAddonDeleteGoogleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteGoogleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteGoogleResultEvent != null) { foreach (var each in OnAddonDeleteGoogleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteGoogleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteKongregateRequestEvent != null) { foreach (var each in OnAddonDeleteKongregateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteKongregateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteKongregateResultEvent != null) { foreach (var each in OnAddonDeleteKongregateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteKongregateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteNintendoRequestEvent != null) { foreach (var each in OnAddonDeleteNintendoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteNintendoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteNintendoResultEvent != null) { foreach (var each in OnAddonDeleteNintendoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteNintendoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeletePSNRequestEvent != null) { foreach (var each in OnAddonDeletePSNRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeletePSNRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeletePSNResultEvent != null) { foreach (var each in OnAddonDeletePSNResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeletePSNResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteSteamRequestEvent != null) { foreach (var each in OnAddonDeleteSteamRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteSteamRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteSteamResultEvent != null) { foreach (var each in OnAddonDeleteSteamResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteSteamResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonDeleteTwitchRequestEvent != null) { foreach (var each in OnAddonDeleteTwitchRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteTwitchRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonDeleteTwitchResultEvent != null) { foreach (var each in OnAddonDeleteTwitchResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonDeleteTwitchResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetAppleRequestEvent != null) { foreach (var each in OnAddonGetAppleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetAppleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetAppleResultEvent != null) { foreach (var each in OnAddonGetAppleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetAppleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetFacebookRequestEvent != null) { foreach (var each in OnAddonGetFacebookRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetFacebookRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetFacebookResultEvent != null) { foreach (var each in OnAddonGetFacebookResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetFacebookResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetFacebookInstantGamesRequestEvent != null) { foreach (var each in OnAddonGetFacebookInstantGamesRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetFacebookInstantGamesRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetFacebookInstantGamesResultEvent != null) { foreach (var each in OnAddonGetFacebookInstantGamesResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetFacebookInstantGamesResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetGoogleRequestEvent != null) { foreach (var each in OnAddonGetGoogleRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetGoogleRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetGoogleResultEvent != null) { foreach (var each in OnAddonGetGoogleResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetGoogleResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetKongregateRequestEvent != null) { foreach (var each in OnAddonGetKongregateRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetKongregateRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetKongregateResultEvent != null) { foreach (var each in OnAddonGetKongregateResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetKongregateResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetNintendoRequestEvent != null) { foreach (var each in OnAddonGetNintendoRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetNintendoRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetNintendoResultEvent != null) { foreach (var each in OnAddonGetNintendoResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetNintendoResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetPSNRequestEvent != null) { foreach (var each in OnAddonGetPSNRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetPSNRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetPSNResultEvent != null) { foreach (var each in OnAddonGetPSNResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetPSNResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetSteamRequestEvent != null) { foreach (var each in OnAddonGetSteamRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetSteamRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetSteamResultEvent != null) { foreach (var each in OnAddonGetSteamResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetSteamResultEvent -= (PlayFabResultEvent)each; } } } + + if (OnAddonGetTwitchRequestEvent != null) { foreach (var each in OnAddonGetTwitchRequestEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetTwitchRequestEvent -= (PlayFabRequestEvent)each; } } } + if (OnAddonGetTwitchResultEvent != null) { foreach (var each in OnAddonGetTwitchResultEvent.GetInvocationList()) { if (ReferenceEquals(each.Target, instance)) { OnAddonGetTwitchResultEvent -= (PlayFabResultEvent)each; } } } + +#endif + + } + + private void OnProcessingErrorEvent(PlayFabRequestCommon request, PlayFabError error) + { + //This just forwards the event. + if (_instance.OnGlobalErrorEvent != null) + { + _instance.OnGlobalErrorEvent(request, error); + } + } + + private void OnProcessingEvent(ApiProcessingEventArgs e) + { + + if (e.EventType == ApiProcessingEventType.Pre) + { + var type = e.Request.GetType(); +#if ENABLE_PLAYFABADMIN_API + if (type == typeof(AdminModels.AbortTaskInstanceRequest)) { if (_instance.OnAdminAbortTaskInstanceRequestEvent != null) { _instance.OnAdminAbortTaskInstanceRequestEvent((AdminModels.AbortTaskInstanceRequest)e.Request); return; } } + if (type == typeof(AdminModels.AddLocalizedNewsRequest)) { if (_instance.OnAdminAddLocalizedNewsRequestEvent != null) { _instance.OnAdminAddLocalizedNewsRequestEvent((AdminModels.AddLocalizedNewsRequest)e.Request); return; } } + if (type == typeof(AdminModels.AddNewsRequest)) { if (_instance.OnAdminAddNewsRequestEvent != null) { _instance.OnAdminAddNewsRequestEvent((AdminModels.AddNewsRequest)e.Request); return; } } + if (type == typeof(AdminModels.AddPlayerTagRequest)) { if (_instance.OnAdminAddPlayerTagRequestEvent != null) { _instance.OnAdminAddPlayerTagRequestEvent((AdminModels.AddPlayerTagRequest)e.Request); return; } } + if (type == typeof(AdminModels.AddUserVirtualCurrencyRequest)) { if (_instance.OnAdminAddUserVirtualCurrencyRequestEvent != null) { _instance.OnAdminAddUserVirtualCurrencyRequestEvent((AdminModels.AddUserVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(AdminModels.AddVirtualCurrencyTypesRequest)) { if (_instance.OnAdminAddVirtualCurrencyTypesRequestEvent != null) { _instance.OnAdminAddVirtualCurrencyTypesRequestEvent((AdminModels.AddVirtualCurrencyTypesRequest)e.Request); return; } } + if (type == typeof(AdminModels.BanUsersRequest)) { if (_instance.OnAdminBanUsersRequestEvent != null) { _instance.OnAdminBanUsersRequestEvent((AdminModels.BanUsersRequest)e.Request); return; } } + if (type == typeof(AdminModels.CheckLimitedEditionItemAvailabilityRequest)) { if (_instance.OnAdminCheckLimitedEditionItemAvailabilityRequestEvent != null) { _instance.OnAdminCheckLimitedEditionItemAvailabilityRequestEvent((AdminModels.CheckLimitedEditionItemAvailabilityRequest)e.Request); return; } } + if (type == typeof(AdminModels.CreateActionsOnPlayerSegmentTaskRequest)) { if (_instance.OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent != null) { _instance.OnAdminCreateActionsOnPlayersInSegmentTaskRequestEvent((AdminModels.CreateActionsOnPlayerSegmentTaskRequest)e.Request); return; } } + if (type == typeof(AdminModels.CreateCloudScriptTaskRequest)) { if (_instance.OnAdminCreateCloudScriptTaskRequestEvent != null) { _instance.OnAdminCreateCloudScriptTaskRequestEvent((AdminModels.CreateCloudScriptTaskRequest)e.Request); return; } } + if (type == typeof(AdminModels.CreateInsightsScheduledScalingTaskRequest)) { if (_instance.OnAdminCreateInsightsScheduledScalingTaskRequestEvent != null) { _instance.OnAdminCreateInsightsScheduledScalingTaskRequestEvent((AdminModels.CreateInsightsScheduledScalingTaskRequest)e.Request); return; } } + if (type == typeof(AdminModels.CreateOpenIdConnectionRequest)) { if (_instance.OnAdminCreateOpenIdConnectionRequestEvent != null) { _instance.OnAdminCreateOpenIdConnectionRequestEvent((AdminModels.CreateOpenIdConnectionRequest)e.Request); return; } } + if (type == typeof(AdminModels.CreatePlayerSharedSecretRequest)) { if (_instance.OnAdminCreatePlayerSharedSecretRequestEvent != null) { _instance.OnAdminCreatePlayerSharedSecretRequestEvent((AdminModels.CreatePlayerSharedSecretRequest)e.Request); return; } } + if (type == typeof(AdminModels.CreatePlayerStatisticDefinitionRequest)) { if (_instance.OnAdminCreatePlayerStatisticDefinitionRequestEvent != null) { _instance.OnAdminCreatePlayerStatisticDefinitionRequestEvent((AdminModels.CreatePlayerStatisticDefinitionRequest)e.Request); return; } } + if (type == typeof(AdminModels.CreateSegmentRequest)) { if (_instance.OnAdminCreateSegmentRequestEvent != null) { _instance.OnAdminCreateSegmentRequestEvent((AdminModels.CreateSegmentRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteContentRequest)) { if (_instance.OnAdminDeleteContentRequestEvent != null) { _instance.OnAdminDeleteContentRequestEvent((AdminModels.DeleteContentRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteMasterPlayerAccountRequest)) { if (_instance.OnAdminDeleteMasterPlayerAccountRequestEvent != null) { _instance.OnAdminDeleteMasterPlayerAccountRequestEvent((AdminModels.DeleteMasterPlayerAccountRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteMasterPlayerEventDataRequest)) { if (_instance.OnAdminDeleteMasterPlayerEventDataRequestEvent != null) { _instance.OnAdminDeleteMasterPlayerEventDataRequestEvent((AdminModels.DeleteMasterPlayerEventDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteMembershipSubscriptionRequest)) { if (_instance.OnAdminDeleteMembershipSubscriptionRequestEvent != null) { _instance.OnAdminDeleteMembershipSubscriptionRequestEvent((AdminModels.DeleteMembershipSubscriptionRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteOpenIdConnectionRequest)) { if (_instance.OnAdminDeleteOpenIdConnectionRequestEvent != null) { _instance.OnAdminDeleteOpenIdConnectionRequestEvent((AdminModels.DeleteOpenIdConnectionRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeletePlayerRequest)) { if (_instance.OnAdminDeletePlayerRequestEvent != null) { _instance.OnAdminDeletePlayerRequestEvent((AdminModels.DeletePlayerRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeletePlayerSharedSecretRequest)) { if (_instance.OnAdminDeletePlayerSharedSecretRequestEvent != null) { _instance.OnAdminDeletePlayerSharedSecretRequestEvent((AdminModels.DeletePlayerSharedSecretRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteSegmentRequest)) { if (_instance.OnAdminDeleteSegmentRequestEvent != null) { _instance.OnAdminDeleteSegmentRequestEvent((AdminModels.DeleteSegmentRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteStoreRequest)) { if (_instance.OnAdminDeleteStoreRequestEvent != null) { _instance.OnAdminDeleteStoreRequestEvent((AdminModels.DeleteStoreRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteTaskRequest)) { if (_instance.OnAdminDeleteTaskRequestEvent != null) { _instance.OnAdminDeleteTaskRequestEvent((AdminModels.DeleteTaskRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteTitleRequest)) { if (_instance.OnAdminDeleteTitleRequestEvent != null) { _instance.OnAdminDeleteTitleRequestEvent((AdminModels.DeleteTitleRequest)e.Request); return; } } + if (type == typeof(AdminModels.DeleteTitleDataOverrideRequest)) { if (_instance.OnAdminDeleteTitleDataOverrideRequestEvent != null) { _instance.OnAdminDeleteTitleDataOverrideRequestEvent((AdminModels.DeleteTitleDataOverrideRequest)e.Request); return; } } + if (type == typeof(AdminModels.ExportMasterPlayerDataRequest)) { if (_instance.OnAdminExportMasterPlayerDataRequestEvent != null) { _instance.OnAdminExportMasterPlayerDataRequestEvent((AdminModels.ExportMasterPlayerDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.ExportPlayersInSegmentRequest)) { if (_instance.OnAdminExportPlayersInSegmentRequestEvent != null) { _instance.OnAdminExportPlayersInSegmentRequestEvent((AdminModels.ExportPlayersInSegmentRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetTaskInstanceRequest)) { if (_instance.OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent != null) { _instance.OnAdminGetActionsOnPlayersInSegmentTaskInstanceRequestEvent((AdminModels.GetTaskInstanceRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetAllSegmentsRequest)) { if (_instance.OnAdminGetAllSegmentsRequestEvent != null) { _instance.OnAdminGetAllSegmentsRequestEvent((AdminModels.GetAllSegmentsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetCatalogItemsRequest)) { if (_instance.OnAdminGetCatalogItemsRequestEvent != null) { _instance.OnAdminGetCatalogItemsRequestEvent((AdminModels.GetCatalogItemsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetCloudScriptRevisionRequest)) { if (_instance.OnAdminGetCloudScriptRevisionRequestEvent != null) { _instance.OnAdminGetCloudScriptRevisionRequestEvent((AdminModels.GetCloudScriptRevisionRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetTaskInstanceRequest)) { if (_instance.OnAdminGetCloudScriptTaskInstanceRequestEvent != null) { _instance.OnAdminGetCloudScriptTaskInstanceRequestEvent((AdminModels.GetTaskInstanceRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetCloudScriptVersionsRequest)) { if (_instance.OnAdminGetCloudScriptVersionsRequestEvent != null) { _instance.OnAdminGetCloudScriptVersionsRequestEvent((AdminModels.GetCloudScriptVersionsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetContentListRequest)) { if (_instance.OnAdminGetContentListRequestEvent != null) { _instance.OnAdminGetContentListRequestEvent((AdminModels.GetContentListRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetContentUploadUrlRequest)) { if (_instance.OnAdminGetContentUploadUrlRequestEvent != null) { _instance.OnAdminGetContentUploadUrlRequestEvent((AdminModels.GetContentUploadUrlRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetDataReportRequest)) { if (_instance.OnAdminGetDataReportRequestEvent != null) { _instance.OnAdminGetDataReportRequestEvent((AdminModels.GetDataReportRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayedTitleListRequest)) { if (_instance.OnAdminGetPlayedTitleListRequestEvent != null) { _instance.OnAdminGetPlayedTitleListRequestEvent((AdminModels.GetPlayedTitleListRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayerIdFromAuthTokenRequest)) { if (_instance.OnAdminGetPlayerIdFromAuthTokenRequestEvent != null) { _instance.OnAdminGetPlayerIdFromAuthTokenRequestEvent((AdminModels.GetPlayerIdFromAuthTokenRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayerProfileRequest)) { if (_instance.OnAdminGetPlayerProfileRequestEvent != null) { _instance.OnAdminGetPlayerProfileRequestEvent((AdminModels.GetPlayerProfileRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayersSegmentsRequest)) { if (_instance.OnAdminGetPlayerSegmentsRequestEvent != null) { _instance.OnAdminGetPlayerSegmentsRequestEvent((AdminModels.GetPlayersSegmentsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayerSharedSecretsRequest)) { if (_instance.OnAdminGetPlayerSharedSecretsRequestEvent != null) { _instance.OnAdminGetPlayerSharedSecretsRequestEvent((AdminModels.GetPlayerSharedSecretsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayersInSegmentRequest)) { if (_instance.OnAdminGetPlayersInSegmentRequestEvent != null) { _instance.OnAdminGetPlayersInSegmentRequestEvent((AdminModels.GetPlayersInSegmentRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayerStatisticDefinitionsRequest)) { if (_instance.OnAdminGetPlayerStatisticDefinitionsRequestEvent != null) { _instance.OnAdminGetPlayerStatisticDefinitionsRequestEvent((AdminModels.GetPlayerStatisticDefinitionsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayerStatisticVersionsRequest)) { if (_instance.OnAdminGetPlayerStatisticVersionsRequestEvent != null) { _instance.OnAdminGetPlayerStatisticVersionsRequestEvent((AdminModels.GetPlayerStatisticVersionsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayerTagsRequest)) { if (_instance.OnAdminGetPlayerTagsRequestEvent != null) { _instance.OnAdminGetPlayerTagsRequestEvent((AdminModels.GetPlayerTagsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPolicyRequest)) { if (_instance.OnAdminGetPolicyRequestEvent != null) { _instance.OnAdminGetPolicyRequestEvent((AdminModels.GetPolicyRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPublisherDataRequest)) { if (_instance.OnAdminGetPublisherDataRequestEvent != null) { _instance.OnAdminGetPublisherDataRequestEvent((AdminModels.GetPublisherDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetRandomResultTablesRequest)) { if (_instance.OnAdminGetRandomResultTablesRequestEvent != null) { _instance.OnAdminGetRandomResultTablesRequestEvent((AdminModels.GetRandomResultTablesRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetPlayersInSegmentExportRequest)) { if (_instance.OnAdminGetSegmentExportRequestEvent != null) { _instance.OnAdminGetSegmentExportRequestEvent((AdminModels.GetPlayersInSegmentExportRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetSegmentsRequest)) { if (_instance.OnAdminGetSegmentsRequestEvent != null) { _instance.OnAdminGetSegmentsRequestEvent((AdminModels.GetSegmentsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetStoreItemsRequest)) { if (_instance.OnAdminGetStoreItemsRequestEvent != null) { _instance.OnAdminGetStoreItemsRequestEvent((AdminModels.GetStoreItemsRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetTaskInstancesRequest)) { if (_instance.OnAdminGetTaskInstancesRequestEvent != null) { _instance.OnAdminGetTaskInstancesRequestEvent((AdminModels.GetTaskInstancesRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetTasksRequest)) { if (_instance.OnAdminGetTasksRequestEvent != null) { _instance.OnAdminGetTasksRequestEvent((AdminModels.GetTasksRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetTitleDataRequest)) { if (_instance.OnAdminGetTitleDataRequestEvent != null) { _instance.OnAdminGetTitleDataRequestEvent((AdminModels.GetTitleDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetTitleDataRequest)) { if (_instance.OnAdminGetTitleInternalDataRequestEvent != null) { _instance.OnAdminGetTitleInternalDataRequestEvent((AdminModels.GetTitleDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.LookupUserAccountInfoRequest)) { if (_instance.OnAdminGetUserAccountInfoRequestEvent != null) { _instance.OnAdminGetUserAccountInfoRequestEvent((AdminModels.LookupUserAccountInfoRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserBansRequest)) { if (_instance.OnAdminGetUserBansRequestEvent != null) { _instance.OnAdminGetUserBansRequestEvent((AdminModels.GetUserBansRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserDataRequest)) { if (_instance.OnAdminGetUserDataRequestEvent != null) { _instance.OnAdminGetUserDataRequestEvent((AdminModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserDataRequest)) { if (_instance.OnAdminGetUserInternalDataRequestEvent != null) { _instance.OnAdminGetUserInternalDataRequestEvent((AdminModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserInventoryRequest)) { if (_instance.OnAdminGetUserInventoryRequestEvent != null) { _instance.OnAdminGetUserInventoryRequestEvent((AdminModels.GetUserInventoryRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserDataRequest)) { if (_instance.OnAdminGetUserPublisherDataRequestEvent != null) { _instance.OnAdminGetUserPublisherDataRequestEvent((AdminModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserDataRequest)) { if (_instance.OnAdminGetUserPublisherInternalDataRequestEvent != null) { _instance.OnAdminGetUserPublisherInternalDataRequestEvent((AdminModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserDataRequest)) { if (_instance.OnAdminGetUserPublisherReadOnlyDataRequestEvent != null) { _instance.OnAdminGetUserPublisherReadOnlyDataRequestEvent((AdminModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GetUserDataRequest)) { if (_instance.OnAdminGetUserReadOnlyDataRequestEvent != null) { _instance.OnAdminGetUserReadOnlyDataRequestEvent((AdminModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.GrantItemsToUsersRequest)) { if (_instance.OnAdminGrantItemsToUsersRequestEvent != null) { _instance.OnAdminGrantItemsToUsersRequestEvent((AdminModels.GrantItemsToUsersRequest)e.Request); return; } } + if (type == typeof(AdminModels.IncrementLimitedEditionItemAvailabilityRequest)) { if (_instance.OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent != null) { _instance.OnAdminIncrementLimitedEditionItemAvailabilityRequestEvent((AdminModels.IncrementLimitedEditionItemAvailabilityRequest)e.Request); return; } } + if (type == typeof(AdminModels.IncrementPlayerStatisticVersionRequest)) { if (_instance.OnAdminIncrementPlayerStatisticVersionRequestEvent != null) { _instance.OnAdminIncrementPlayerStatisticVersionRequestEvent((AdminModels.IncrementPlayerStatisticVersionRequest)e.Request); return; } } + if (type == typeof(AdminModels.ListOpenIdConnectionRequest)) { if (_instance.OnAdminListOpenIdConnectionRequestEvent != null) { _instance.OnAdminListOpenIdConnectionRequestEvent((AdminModels.ListOpenIdConnectionRequest)e.Request); return; } } + if (type == typeof(AdminModels.ListVirtualCurrencyTypesRequest)) { if (_instance.OnAdminListVirtualCurrencyTypesRequestEvent != null) { _instance.OnAdminListVirtualCurrencyTypesRequestEvent((AdminModels.ListVirtualCurrencyTypesRequest)e.Request); return; } } + if (type == typeof(AdminModels.RefundPurchaseRequest)) { if (_instance.OnAdminRefundPurchaseRequestEvent != null) { _instance.OnAdminRefundPurchaseRequestEvent((AdminModels.RefundPurchaseRequest)e.Request); return; } } + if (type == typeof(AdminModels.RemovePlayerTagRequest)) { if (_instance.OnAdminRemovePlayerTagRequestEvent != null) { _instance.OnAdminRemovePlayerTagRequestEvent((AdminModels.RemovePlayerTagRequest)e.Request); return; } } + if (type == typeof(AdminModels.RemoveVirtualCurrencyTypesRequest)) { if (_instance.OnAdminRemoveVirtualCurrencyTypesRequestEvent != null) { _instance.OnAdminRemoveVirtualCurrencyTypesRequestEvent((AdminModels.RemoveVirtualCurrencyTypesRequest)e.Request); return; } } + if (type == typeof(AdminModels.ResetCharacterStatisticsRequest)) { if (_instance.OnAdminResetCharacterStatisticsRequestEvent != null) { _instance.OnAdminResetCharacterStatisticsRequestEvent((AdminModels.ResetCharacterStatisticsRequest)e.Request); return; } } + if (type == typeof(AdminModels.ResetPasswordRequest)) { if (_instance.OnAdminResetPasswordRequestEvent != null) { _instance.OnAdminResetPasswordRequestEvent((AdminModels.ResetPasswordRequest)e.Request); return; } } + if (type == typeof(AdminModels.ResetUserStatisticsRequest)) { if (_instance.OnAdminResetUserStatisticsRequestEvent != null) { _instance.OnAdminResetUserStatisticsRequestEvent((AdminModels.ResetUserStatisticsRequest)e.Request); return; } } + if (type == typeof(AdminModels.ResolvePurchaseDisputeRequest)) { if (_instance.OnAdminResolvePurchaseDisputeRequestEvent != null) { _instance.OnAdminResolvePurchaseDisputeRequestEvent((AdminModels.ResolvePurchaseDisputeRequest)e.Request); return; } } + if (type == typeof(AdminModels.RevokeAllBansForUserRequest)) { if (_instance.OnAdminRevokeAllBansForUserRequestEvent != null) { _instance.OnAdminRevokeAllBansForUserRequestEvent((AdminModels.RevokeAllBansForUserRequest)e.Request); return; } } + if (type == typeof(AdminModels.RevokeBansRequest)) { if (_instance.OnAdminRevokeBansRequestEvent != null) { _instance.OnAdminRevokeBansRequestEvent((AdminModels.RevokeBansRequest)e.Request); return; } } + if (type == typeof(AdminModels.RevokeInventoryItemRequest)) { if (_instance.OnAdminRevokeInventoryItemRequestEvent != null) { _instance.OnAdminRevokeInventoryItemRequestEvent((AdminModels.RevokeInventoryItemRequest)e.Request); return; } } + if (type == typeof(AdminModels.RevokeInventoryItemsRequest)) { if (_instance.OnAdminRevokeInventoryItemsRequestEvent != null) { _instance.OnAdminRevokeInventoryItemsRequestEvent((AdminModels.RevokeInventoryItemsRequest)e.Request); return; } } + if (type == typeof(AdminModels.RunTaskRequest)) { if (_instance.OnAdminRunTaskRequestEvent != null) { _instance.OnAdminRunTaskRequestEvent((AdminModels.RunTaskRequest)e.Request); return; } } + if (type == typeof(AdminModels.SendAccountRecoveryEmailRequest)) { if (_instance.OnAdminSendAccountRecoveryEmailRequestEvent != null) { _instance.OnAdminSendAccountRecoveryEmailRequestEvent((AdminModels.SendAccountRecoveryEmailRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateCatalogItemsRequest)) { if (_instance.OnAdminSetCatalogItemsRequestEvent != null) { _instance.OnAdminSetCatalogItemsRequestEvent((AdminModels.UpdateCatalogItemsRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetMembershipOverrideRequest)) { if (_instance.OnAdminSetMembershipOverrideRequestEvent != null) { _instance.OnAdminSetMembershipOverrideRequestEvent((AdminModels.SetMembershipOverrideRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetPlayerSecretRequest)) { if (_instance.OnAdminSetPlayerSecretRequestEvent != null) { _instance.OnAdminSetPlayerSecretRequestEvent((AdminModels.SetPlayerSecretRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetPublishedRevisionRequest)) { if (_instance.OnAdminSetPublishedRevisionRequestEvent != null) { _instance.OnAdminSetPublishedRevisionRequestEvent((AdminModels.SetPublishedRevisionRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetPublisherDataRequest)) { if (_instance.OnAdminSetPublisherDataRequestEvent != null) { _instance.OnAdminSetPublisherDataRequestEvent((AdminModels.SetPublisherDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateStoreItemsRequest)) { if (_instance.OnAdminSetStoreItemsRequestEvent != null) { _instance.OnAdminSetStoreItemsRequestEvent((AdminModels.UpdateStoreItemsRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetTitleDataRequest)) { if (_instance.OnAdminSetTitleDataRequestEvent != null) { _instance.OnAdminSetTitleDataRequestEvent((AdminModels.SetTitleDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetTitleDataAndOverridesRequest)) { if (_instance.OnAdminSetTitleDataAndOverridesRequestEvent != null) { _instance.OnAdminSetTitleDataAndOverridesRequestEvent((AdminModels.SetTitleDataAndOverridesRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetTitleDataRequest)) { if (_instance.OnAdminSetTitleInternalDataRequestEvent != null) { _instance.OnAdminSetTitleInternalDataRequestEvent((AdminModels.SetTitleDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.SetupPushNotificationRequest)) { if (_instance.OnAdminSetupPushNotificationRequestEvent != null) { _instance.OnAdminSetupPushNotificationRequestEvent((AdminModels.SetupPushNotificationRequest)e.Request); return; } } + if (type == typeof(AdminModels.SubtractUserVirtualCurrencyRequest)) { if (_instance.OnAdminSubtractUserVirtualCurrencyRequestEvent != null) { _instance.OnAdminSubtractUserVirtualCurrencyRequestEvent((AdminModels.SubtractUserVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateBansRequest)) { if (_instance.OnAdminUpdateBansRequestEvent != null) { _instance.OnAdminUpdateBansRequestEvent((AdminModels.UpdateBansRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateCatalogItemsRequest)) { if (_instance.OnAdminUpdateCatalogItemsRequestEvent != null) { _instance.OnAdminUpdateCatalogItemsRequestEvent((AdminModels.UpdateCatalogItemsRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateCloudScriptRequest)) { if (_instance.OnAdminUpdateCloudScriptRequestEvent != null) { _instance.OnAdminUpdateCloudScriptRequestEvent((AdminModels.UpdateCloudScriptRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateOpenIdConnectionRequest)) { if (_instance.OnAdminUpdateOpenIdConnectionRequestEvent != null) { _instance.OnAdminUpdateOpenIdConnectionRequestEvent((AdminModels.UpdateOpenIdConnectionRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdatePlayerSharedSecretRequest)) { if (_instance.OnAdminUpdatePlayerSharedSecretRequestEvent != null) { _instance.OnAdminUpdatePlayerSharedSecretRequestEvent((AdminModels.UpdatePlayerSharedSecretRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdatePlayerStatisticDefinitionRequest)) { if (_instance.OnAdminUpdatePlayerStatisticDefinitionRequestEvent != null) { _instance.OnAdminUpdatePlayerStatisticDefinitionRequestEvent((AdminModels.UpdatePlayerStatisticDefinitionRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdatePolicyRequest)) { if (_instance.OnAdminUpdatePolicyRequestEvent != null) { _instance.OnAdminUpdatePolicyRequestEvent((AdminModels.UpdatePolicyRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateRandomResultTablesRequest)) { if (_instance.OnAdminUpdateRandomResultTablesRequestEvent != null) { _instance.OnAdminUpdateRandomResultTablesRequestEvent((AdminModels.UpdateRandomResultTablesRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateSegmentRequest)) { if (_instance.OnAdminUpdateSegmentRequestEvent != null) { _instance.OnAdminUpdateSegmentRequestEvent((AdminModels.UpdateSegmentRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateStoreItemsRequest)) { if (_instance.OnAdminUpdateStoreItemsRequestEvent != null) { _instance.OnAdminUpdateStoreItemsRequestEvent((AdminModels.UpdateStoreItemsRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateTaskRequest)) { if (_instance.OnAdminUpdateTaskRequestEvent != null) { _instance.OnAdminUpdateTaskRequestEvent((AdminModels.UpdateTaskRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateUserDataRequest)) { if (_instance.OnAdminUpdateUserDataRequestEvent != null) { _instance.OnAdminUpdateUserDataRequestEvent((AdminModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateUserInternalDataRequest)) { if (_instance.OnAdminUpdateUserInternalDataRequestEvent != null) { _instance.OnAdminUpdateUserInternalDataRequestEvent((AdminModels.UpdateUserInternalDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateUserDataRequest)) { if (_instance.OnAdminUpdateUserPublisherDataRequestEvent != null) { _instance.OnAdminUpdateUserPublisherDataRequestEvent((AdminModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateUserInternalDataRequest)) { if (_instance.OnAdminUpdateUserPublisherInternalDataRequestEvent != null) { _instance.OnAdminUpdateUserPublisherInternalDataRequestEvent((AdminModels.UpdateUserInternalDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateUserDataRequest)) { if (_instance.OnAdminUpdateUserPublisherReadOnlyDataRequestEvent != null) { _instance.OnAdminUpdateUserPublisherReadOnlyDataRequestEvent((AdminModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateUserDataRequest)) { if (_instance.OnAdminUpdateUserReadOnlyDataRequestEvent != null) { _instance.OnAdminUpdateUserReadOnlyDataRequestEvent((AdminModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(AdminModels.UpdateUserTitleDisplayNameRequest)) { if (_instance.OnAdminUpdateUserTitleDisplayNameRequestEvent != null) { _instance.OnAdminUpdateUserTitleDisplayNameRequestEvent((AdminModels.UpdateUserTitleDisplayNameRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABCLIENT_API + if (type == typeof(ClientModels.AcceptTradeRequest)) { if (_instance.OnAcceptTradeRequestEvent != null) { _instance.OnAcceptTradeRequestEvent((ClientModels.AcceptTradeRequest)e.Request); return; } } + if (type == typeof(ClientModels.AddFriendRequest)) { if (_instance.OnAddFriendRequestEvent != null) { _instance.OnAddFriendRequestEvent((ClientModels.AddFriendRequest)e.Request); return; } } + if (type == typeof(ClientModels.AddGenericIDRequest)) { if (_instance.OnAddGenericIDRequestEvent != null) { _instance.OnAddGenericIDRequestEvent((ClientModels.AddGenericIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.AddOrUpdateContactEmailRequest)) { if (_instance.OnAddOrUpdateContactEmailRequestEvent != null) { _instance.OnAddOrUpdateContactEmailRequestEvent((ClientModels.AddOrUpdateContactEmailRequest)e.Request); return; } } + if (type == typeof(ClientModels.AddSharedGroupMembersRequest)) { if (_instance.OnAddSharedGroupMembersRequestEvent != null) { _instance.OnAddSharedGroupMembersRequestEvent((ClientModels.AddSharedGroupMembersRequest)e.Request); return; } } + if (type == typeof(ClientModels.AddUsernamePasswordRequest)) { if (_instance.OnAddUsernamePasswordRequestEvent != null) { _instance.OnAddUsernamePasswordRequestEvent((ClientModels.AddUsernamePasswordRequest)e.Request); return; } } + if (type == typeof(ClientModels.AddUserVirtualCurrencyRequest)) { if (_instance.OnAddUserVirtualCurrencyRequestEvent != null) { _instance.OnAddUserVirtualCurrencyRequestEvent((ClientModels.AddUserVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(ClientModels.AndroidDevicePushNotificationRegistrationRequest)) { if (_instance.OnAndroidDevicePushNotificationRegistrationRequestEvent != null) { _instance.OnAndroidDevicePushNotificationRegistrationRequestEvent((ClientModels.AndroidDevicePushNotificationRegistrationRequest)e.Request); return; } } + if (type == typeof(ClientModels.AttributeInstallRequest)) { if (_instance.OnAttributeInstallRequestEvent != null) { _instance.OnAttributeInstallRequestEvent((ClientModels.AttributeInstallRequest)e.Request); return; } } + if (type == typeof(ClientModels.CancelTradeRequest)) { if (_instance.OnCancelTradeRequestEvent != null) { _instance.OnCancelTradeRequestEvent((ClientModels.CancelTradeRequest)e.Request); return; } } + if (type == typeof(ClientModels.ConfirmPurchaseRequest)) { if (_instance.OnConfirmPurchaseRequestEvent != null) { _instance.OnConfirmPurchaseRequestEvent((ClientModels.ConfirmPurchaseRequest)e.Request); return; } } + if (type == typeof(ClientModels.ConsumeItemRequest)) { if (_instance.OnConsumeItemRequestEvent != null) { _instance.OnConsumeItemRequestEvent((ClientModels.ConsumeItemRequest)e.Request); return; } } + if (type == typeof(ClientModels.ConsumeMicrosoftStoreEntitlementsRequest)) { if (_instance.OnConsumeMicrosoftStoreEntitlementsRequestEvent != null) { _instance.OnConsumeMicrosoftStoreEntitlementsRequestEvent((ClientModels.ConsumeMicrosoftStoreEntitlementsRequest)e.Request); return; } } + if (type == typeof(ClientModels.ConsumePS5EntitlementsRequest)) { if (_instance.OnConsumePS5EntitlementsRequestEvent != null) { _instance.OnConsumePS5EntitlementsRequestEvent((ClientModels.ConsumePS5EntitlementsRequest)e.Request); return; } } + if (type == typeof(ClientModels.ConsumePSNEntitlementsRequest)) { if (_instance.OnConsumePSNEntitlementsRequestEvent != null) { _instance.OnConsumePSNEntitlementsRequestEvent((ClientModels.ConsumePSNEntitlementsRequest)e.Request); return; } } + if (type == typeof(ClientModels.ConsumeXboxEntitlementsRequest)) { if (_instance.OnConsumeXboxEntitlementsRequestEvent != null) { _instance.OnConsumeXboxEntitlementsRequestEvent((ClientModels.ConsumeXboxEntitlementsRequest)e.Request); return; } } + if (type == typeof(ClientModels.CreateSharedGroupRequest)) { if (_instance.OnCreateSharedGroupRequestEvent != null) { _instance.OnCreateSharedGroupRequestEvent((ClientModels.CreateSharedGroupRequest)e.Request); return; } } + if (type == typeof(ClientModels.ExecuteCloudScriptRequest)) { if (_instance.OnExecuteCloudScriptRequestEvent != null) { _instance.OnExecuteCloudScriptRequestEvent((ClientModels.ExecuteCloudScriptRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetAccountInfoRequest)) { if (_instance.OnGetAccountInfoRequestEvent != null) { _instance.OnGetAccountInfoRequestEvent((ClientModels.GetAccountInfoRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetAdPlacementsRequest)) { if (_instance.OnGetAdPlacementsRequestEvent != null) { _instance.OnGetAdPlacementsRequestEvent((ClientModels.GetAdPlacementsRequest)e.Request); return; } } + if (type == typeof(ClientModels.ListUsersCharactersRequest)) { if (_instance.OnGetAllUsersCharactersRequestEvent != null) { _instance.OnGetAllUsersCharactersRequestEvent((ClientModels.ListUsersCharactersRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetCatalogItemsRequest)) { if (_instance.OnGetCatalogItemsRequestEvent != null) { _instance.OnGetCatalogItemsRequestEvent((ClientModels.GetCatalogItemsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetCharacterDataRequest)) { if (_instance.OnGetCharacterDataRequestEvent != null) { _instance.OnGetCharacterDataRequestEvent((ClientModels.GetCharacterDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetCharacterInventoryRequest)) { if (_instance.OnGetCharacterInventoryRequestEvent != null) { _instance.OnGetCharacterInventoryRequestEvent((ClientModels.GetCharacterInventoryRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetCharacterLeaderboardRequest)) { if (_instance.OnGetCharacterLeaderboardRequestEvent != null) { _instance.OnGetCharacterLeaderboardRequestEvent((ClientModels.GetCharacterLeaderboardRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetCharacterDataRequest)) { if (_instance.OnGetCharacterReadOnlyDataRequestEvent != null) { _instance.OnGetCharacterReadOnlyDataRequestEvent((ClientModels.GetCharacterDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetCharacterStatisticsRequest)) { if (_instance.OnGetCharacterStatisticsRequestEvent != null) { _instance.OnGetCharacterStatisticsRequestEvent((ClientModels.GetCharacterStatisticsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetContentDownloadUrlRequest)) { if (_instance.OnGetContentDownloadUrlRequestEvent != null) { _instance.OnGetContentDownloadUrlRequestEvent((ClientModels.GetContentDownloadUrlRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetFriendLeaderboardRequest)) { if (_instance.OnGetFriendLeaderboardRequestEvent != null) { _instance.OnGetFriendLeaderboardRequestEvent((ClientModels.GetFriendLeaderboardRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetFriendLeaderboardAroundPlayerRequest)) { if (_instance.OnGetFriendLeaderboardAroundPlayerRequestEvent != null) { _instance.OnGetFriendLeaderboardAroundPlayerRequestEvent((ClientModels.GetFriendLeaderboardAroundPlayerRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetFriendsListRequest)) { if (_instance.OnGetFriendsListRequestEvent != null) { _instance.OnGetFriendsListRequestEvent((ClientModels.GetFriendsListRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetLeaderboardRequest)) { if (_instance.OnGetLeaderboardRequestEvent != null) { _instance.OnGetLeaderboardRequestEvent((ClientModels.GetLeaderboardRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetLeaderboardAroundCharacterRequest)) { if (_instance.OnGetLeaderboardAroundCharacterRequestEvent != null) { _instance.OnGetLeaderboardAroundCharacterRequestEvent((ClientModels.GetLeaderboardAroundCharacterRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetLeaderboardAroundPlayerRequest)) { if (_instance.OnGetLeaderboardAroundPlayerRequestEvent != null) { _instance.OnGetLeaderboardAroundPlayerRequestEvent((ClientModels.GetLeaderboardAroundPlayerRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetLeaderboardForUsersCharactersRequest)) { if (_instance.OnGetLeaderboardForUserCharactersRequestEvent != null) { _instance.OnGetLeaderboardForUserCharactersRequestEvent((ClientModels.GetLeaderboardForUsersCharactersRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPaymentTokenRequest)) { if (_instance.OnGetPaymentTokenRequestEvent != null) { _instance.OnGetPaymentTokenRequestEvent((ClientModels.GetPaymentTokenRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPhotonAuthenticationTokenRequest)) { if (_instance.OnGetPhotonAuthenticationTokenRequestEvent != null) { _instance.OnGetPhotonAuthenticationTokenRequestEvent((ClientModels.GetPhotonAuthenticationTokenRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayerCombinedInfoRequest)) { if (_instance.OnGetPlayerCombinedInfoRequestEvent != null) { _instance.OnGetPlayerCombinedInfoRequestEvent((ClientModels.GetPlayerCombinedInfoRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayerProfileRequest)) { if (_instance.OnGetPlayerProfileRequestEvent != null) { _instance.OnGetPlayerProfileRequestEvent((ClientModels.GetPlayerProfileRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayerSegmentsRequest)) { if (_instance.OnGetPlayerSegmentsRequestEvent != null) { _instance.OnGetPlayerSegmentsRequestEvent((ClientModels.GetPlayerSegmentsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayerStatisticsRequest)) { if (_instance.OnGetPlayerStatisticsRequestEvent != null) { _instance.OnGetPlayerStatisticsRequestEvent((ClientModels.GetPlayerStatisticsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayerStatisticVersionsRequest)) { if (_instance.OnGetPlayerStatisticVersionsRequestEvent != null) { _instance.OnGetPlayerStatisticVersionsRequestEvent((ClientModels.GetPlayerStatisticVersionsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayerTagsRequest)) { if (_instance.OnGetPlayerTagsRequestEvent != null) { _instance.OnGetPlayerTagsRequestEvent((ClientModels.GetPlayerTagsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayerTradesRequest)) { if (_instance.OnGetPlayerTradesRequestEvent != null) { _instance.OnGetPlayerTradesRequestEvent((ClientModels.GetPlayerTradesRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromFacebookIDsRequest)) { if (_instance.OnGetPlayFabIDsFromFacebookIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromFacebookIDsRequestEvent((ClientModels.GetPlayFabIDsFromFacebookIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromFacebookInstantGamesIdsRequest)) { if (_instance.OnGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent != null) { _instance.OnGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent((ClientModels.GetPlayFabIDsFromFacebookInstantGamesIdsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGameCenterIDsRequest)) { if (_instance.OnGetPlayFabIDsFromGameCenterIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromGameCenterIDsRequestEvent((ClientModels.GetPlayFabIDsFromGameCenterIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGenericIDsRequest)) { if (_instance.OnGetPlayFabIDsFromGenericIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromGenericIDsRequestEvent((ClientModels.GetPlayFabIDsFromGenericIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGoogleIDsRequest)) { if (_instance.OnGetPlayFabIDsFromGoogleIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromGoogleIDsRequestEvent((ClientModels.GetPlayFabIDsFromGoogleIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest)) { if (_instance.OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsRequestEvent((ClientModels.GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromKongregateIDsRequest)) { if (_instance.OnGetPlayFabIDsFromKongregateIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromKongregateIDsRequestEvent((ClientModels.GetPlayFabIDsFromKongregateIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromNintendoServiceAccountIdsRequest)) { if (_instance.OnGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent != null) { _instance.OnGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent((ClientModels.GetPlayFabIDsFromNintendoServiceAccountIdsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest)) { if (_instance.OnGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent != null) { _instance.OnGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent((ClientModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromPSNAccountIDsRequest)) { if (_instance.OnGetPlayFabIDsFromPSNAccountIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromPSNAccountIDsRequestEvent((ClientModels.GetPlayFabIDsFromPSNAccountIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromPSNOnlineIDsRequest)) { if (_instance.OnGetPlayFabIDsFromPSNOnlineIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromPSNOnlineIDsRequestEvent((ClientModels.GetPlayFabIDsFromPSNOnlineIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromSteamIDsRequest)) { if (_instance.OnGetPlayFabIDsFromSteamIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromSteamIDsRequestEvent((ClientModels.GetPlayFabIDsFromSteamIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromTwitchIDsRequest)) { if (_instance.OnGetPlayFabIDsFromTwitchIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromTwitchIDsRequestEvent((ClientModels.GetPlayFabIDsFromTwitchIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromXboxLiveIDsRequest)) { if (_instance.OnGetPlayFabIDsFromXboxLiveIDsRequestEvent != null) { _instance.OnGetPlayFabIDsFromXboxLiveIDsRequestEvent((ClientModels.GetPlayFabIDsFromXboxLiveIDsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPublisherDataRequest)) { if (_instance.OnGetPublisherDataRequestEvent != null) { _instance.OnGetPublisherDataRequestEvent((ClientModels.GetPublisherDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetPurchaseRequest)) { if (_instance.OnGetPurchaseRequestEvent != null) { _instance.OnGetPurchaseRequestEvent((ClientModels.GetPurchaseRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetSharedGroupDataRequest)) { if (_instance.OnGetSharedGroupDataRequestEvent != null) { _instance.OnGetSharedGroupDataRequestEvent((ClientModels.GetSharedGroupDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetStoreItemsRequest)) { if (_instance.OnGetStoreItemsRequestEvent != null) { _instance.OnGetStoreItemsRequestEvent((ClientModels.GetStoreItemsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetTimeRequest)) { if (_instance.OnGetTimeRequestEvent != null) { _instance.OnGetTimeRequestEvent((ClientModels.GetTimeRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetTitleDataRequest)) { if (_instance.OnGetTitleDataRequestEvent != null) { _instance.OnGetTitleDataRequestEvent((ClientModels.GetTitleDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetTitleNewsRequest)) { if (_instance.OnGetTitleNewsRequestEvent != null) { _instance.OnGetTitleNewsRequestEvent((ClientModels.GetTitleNewsRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetTitlePublicKeyRequest)) { if (_instance.OnGetTitlePublicKeyRequestEvent != null) { _instance.OnGetTitlePublicKeyRequestEvent((ClientModels.GetTitlePublicKeyRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetTradeStatusRequest)) { if (_instance.OnGetTradeStatusRequestEvent != null) { _instance.OnGetTradeStatusRequestEvent((ClientModels.GetTradeStatusRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetUserDataRequest)) { if (_instance.OnGetUserDataRequestEvent != null) { _instance.OnGetUserDataRequestEvent((ClientModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetUserInventoryRequest)) { if (_instance.OnGetUserInventoryRequestEvent != null) { _instance.OnGetUserInventoryRequestEvent((ClientModels.GetUserInventoryRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetUserDataRequest)) { if (_instance.OnGetUserPublisherDataRequestEvent != null) { _instance.OnGetUserPublisherDataRequestEvent((ClientModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetUserDataRequest)) { if (_instance.OnGetUserPublisherReadOnlyDataRequestEvent != null) { _instance.OnGetUserPublisherReadOnlyDataRequestEvent((ClientModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GetUserDataRequest)) { if (_instance.OnGetUserReadOnlyDataRequestEvent != null) { _instance.OnGetUserReadOnlyDataRequestEvent((ClientModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.GrantCharacterToUserRequest)) { if (_instance.OnGrantCharacterToUserRequestEvent != null) { _instance.OnGrantCharacterToUserRequestEvent((ClientModels.GrantCharacterToUserRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkAndroidDeviceIDRequest)) { if (_instance.OnLinkAndroidDeviceIDRequestEvent != null) { _instance.OnLinkAndroidDeviceIDRequestEvent((ClientModels.LinkAndroidDeviceIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkAppleRequest)) { if (_instance.OnLinkAppleRequestEvent != null) { _instance.OnLinkAppleRequestEvent((ClientModels.LinkAppleRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkCustomIDRequest)) { if (_instance.OnLinkCustomIDRequestEvent != null) { _instance.OnLinkCustomIDRequestEvent((ClientModels.LinkCustomIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkFacebookAccountRequest)) { if (_instance.OnLinkFacebookAccountRequestEvent != null) { _instance.OnLinkFacebookAccountRequestEvent((ClientModels.LinkFacebookAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkFacebookInstantGamesIdRequest)) { if (_instance.OnLinkFacebookInstantGamesIdRequestEvent != null) { _instance.OnLinkFacebookInstantGamesIdRequestEvent((ClientModels.LinkFacebookInstantGamesIdRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkGameCenterAccountRequest)) { if (_instance.OnLinkGameCenterAccountRequestEvent != null) { _instance.OnLinkGameCenterAccountRequestEvent((ClientModels.LinkGameCenterAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkGoogleAccountRequest)) { if (_instance.OnLinkGoogleAccountRequestEvent != null) { _instance.OnLinkGoogleAccountRequestEvent((ClientModels.LinkGoogleAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkGooglePlayGamesServicesAccountRequest)) { if (_instance.OnLinkGooglePlayGamesServicesAccountRequestEvent != null) { _instance.OnLinkGooglePlayGamesServicesAccountRequestEvent((ClientModels.LinkGooglePlayGamesServicesAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkIOSDeviceIDRequest)) { if (_instance.OnLinkIOSDeviceIDRequestEvent != null) { _instance.OnLinkIOSDeviceIDRequestEvent((ClientModels.LinkIOSDeviceIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkKongregateAccountRequest)) { if (_instance.OnLinkKongregateRequestEvent != null) { _instance.OnLinkKongregateRequestEvent((ClientModels.LinkKongregateAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkNintendoServiceAccountRequest)) { if (_instance.OnLinkNintendoServiceAccountRequestEvent != null) { _instance.OnLinkNintendoServiceAccountRequestEvent((ClientModels.LinkNintendoServiceAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkNintendoSwitchDeviceIdRequest)) { if (_instance.OnLinkNintendoSwitchDeviceIdRequestEvent != null) { _instance.OnLinkNintendoSwitchDeviceIdRequestEvent((ClientModels.LinkNintendoSwitchDeviceIdRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkOpenIdConnectRequest)) { if (_instance.OnLinkOpenIdConnectRequestEvent != null) { _instance.OnLinkOpenIdConnectRequestEvent((ClientModels.LinkOpenIdConnectRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkPSNAccountRequest)) { if (_instance.OnLinkPSNAccountRequestEvent != null) { _instance.OnLinkPSNAccountRequestEvent((ClientModels.LinkPSNAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkSteamAccountRequest)) { if (_instance.OnLinkSteamAccountRequestEvent != null) { _instance.OnLinkSteamAccountRequestEvent((ClientModels.LinkSteamAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkTwitchAccountRequest)) { if (_instance.OnLinkTwitchRequestEvent != null) { _instance.OnLinkTwitchRequestEvent((ClientModels.LinkTwitchAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LinkXboxAccountRequest)) { if (_instance.OnLinkXboxAccountRequestEvent != null) { _instance.OnLinkXboxAccountRequestEvent((ClientModels.LinkXboxAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithAndroidDeviceIDRequest)) { if (_instance.OnLoginWithAndroidDeviceIDRequestEvent != null) { _instance.OnLoginWithAndroidDeviceIDRequestEvent((ClientModels.LoginWithAndroidDeviceIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithAppleRequest)) { if (_instance.OnLoginWithAppleRequestEvent != null) { _instance.OnLoginWithAppleRequestEvent((ClientModels.LoginWithAppleRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithCustomIDRequest)) { if (_instance.OnLoginWithCustomIDRequestEvent != null) { _instance.OnLoginWithCustomIDRequestEvent((ClientModels.LoginWithCustomIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithEmailAddressRequest)) { if (_instance.OnLoginWithEmailAddressRequestEvent != null) { _instance.OnLoginWithEmailAddressRequestEvent((ClientModels.LoginWithEmailAddressRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithFacebookRequest)) { if (_instance.OnLoginWithFacebookRequestEvent != null) { _instance.OnLoginWithFacebookRequestEvent((ClientModels.LoginWithFacebookRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithFacebookInstantGamesIdRequest)) { if (_instance.OnLoginWithFacebookInstantGamesIdRequestEvent != null) { _instance.OnLoginWithFacebookInstantGamesIdRequestEvent((ClientModels.LoginWithFacebookInstantGamesIdRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithGameCenterRequest)) { if (_instance.OnLoginWithGameCenterRequestEvent != null) { _instance.OnLoginWithGameCenterRequestEvent((ClientModels.LoginWithGameCenterRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithGoogleAccountRequest)) { if (_instance.OnLoginWithGoogleAccountRequestEvent != null) { _instance.OnLoginWithGoogleAccountRequestEvent((ClientModels.LoginWithGoogleAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithGooglePlayGamesServicesRequest)) { if (_instance.OnLoginWithGooglePlayGamesServicesRequestEvent != null) { _instance.OnLoginWithGooglePlayGamesServicesRequestEvent((ClientModels.LoginWithGooglePlayGamesServicesRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithIOSDeviceIDRequest)) { if (_instance.OnLoginWithIOSDeviceIDRequestEvent != null) { _instance.OnLoginWithIOSDeviceIDRequestEvent((ClientModels.LoginWithIOSDeviceIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithKongregateRequest)) { if (_instance.OnLoginWithKongregateRequestEvent != null) { _instance.OnLoginWithKongregateRequestEvent((ClientModels.LoginWithKongregateRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithNintendoServiceAccountRequest)) { if (_instance.OnLoginWithNintendoServiceAccountRequestEvent != null) { _instance.OnLoginWithNintendoServiceAccountRequestEvent((ClientModels.LoginWithNintendoServiceAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithNintendoSwitchDeviceIdRequest)) { if (_instance.OnLoginWithNintendoSwitchDeviceIdRequestEvent != null) { _instance.OnLoginWithNintendoSwitchDeviceIdRequestEvent((ClientModels.LoginWithNintendoSwitchDeviceIdRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithOpenIdConnectRequest)) { if (_instance.OnLoginWithOpenIdConnectRequestEvent != null) { _instance.OnLoginWithOpenIdConnectRequestEvent((ClientModels.LoginWithOpenIdConnectRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithPlayFabRequest)) { if (_instance.OnLoginWithPlayFabRequestEvent != null) { _instance.OnLoginWithPlayFabRequestEvent((ClientModels.LoginWithPlayFabRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithPSNRequest)) { if (_instance.OnLoginWithPSNRequestEvent != null) { _instance.OnLoginWithPSNRequestEvent((ClientModels.LoginWithPSNRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithSteamRequest)) { if (_instance.OnLoginWithSteamRequestEvent != null) { _instance.OnLoginWithSteamRequestEvent((ClientModels.LoginWithSteamRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithTwitchRequest)) { if (_instance.OnLoginWithTwitchRequestEvent != null) { _instance.OnLoginWithTwitchRequestEvent((ClientModels.LoginWithTwitchRequest)e.Request); return; } } + if (type == typeof(ClientModels.LoginWithXboxRequest)) { if (_instance.OnLoginWithXboxRequestEvent != null) { _instance.OnLoginWithXboxRequestEvent((ClientModels.LoginWithXboxRequest)e.Request); return; } } + if (type == typeof(ClientModels.OpenTradeRequest)) { if (_instance.OnOpenTradeRequestEvent != null) { _instance.OnOpenTradeRequestEvent((ClientModels.OpenTradeRequest)e.Request); return; } } + if (type == typeof(ClientModels.PayForPurchaseRequest)) { if (_instance.OnPayForPurchaseRequestEvent != null) { _instance.OnPayForPurchaseRequestEvent((ClientModels.PayForPurchaseRequest)e.Request); return; } } + if (type == typeof(ClientModels.PurchaseItemRequest)) { if (_instance.OnPurchaseItemRequestEvent != null) { _instance.OnPurchaseItemRequestEvent((ClientModels.PurchaseItemRequest)e.Request); return; } } + if (type == typeof(ClientModels.RedeemCouponRequest)) { if (_instance.OnRedeemCouponRequestEvent != null) { _instance.OnRedeemCouponRequestEvent((ClientModels.RedeemCouponRequest)e.Request); return; } } + if (type == typeof(ClientModels.RefreshPSNAuthTokenRequest)) { if (_instance.OnRefreshPSNAuthTokenRequestEvent != null) { _instance.OnRefreshPSNAuthTokenRequestEvent((ClientModels.RefreshPSNAuthTokenRequest)e.Request); return; } } + if (type == typeof(ClientModels.RegisterForIOSPushNotificationRequest)) { if (_instance.OnRegisterForIOSPushNotificationRequestEvent != null) { _instance.OnRegisterForIOSPushNotificationRequestEvent((ClientModels.RegisterForIOSPushNotificationRequest)e.Request); return; } } + if (type == typeof(ClientModels.RegisterPlayFabUserRequest)) { if (_instance.OnRegisterPlayFabUserRequestEvent != null) { _instance.OnRegisterPlayFabUserRequestEvent((ClientModels.RegisterPlayFabUserRequest)e.Request); return; } } + if (type == typeof(ClientModels.RemoveContactEmailRequest)) { if (_instance.OnRemoveContactEmailRequestEvent != null) { _instance.OnRemoveContactEmailRequestEvent((ClientModels.RemoveContactEmailRequest)e.Request); return; } } + if (type == typeof(ClientModels.RemoveFriendRequest)) { if (_instance.OnRemoveFriendRequestEvent != null) { _instance.OnRemoveFriendRequestEvent((ClientModels.RemoveFriendRequest)e.Request); return; } } + if (type == typeof(ClientModels.RemoveGenericIDRequest)) { if (_instance.OnRemoveGenericIDRequestEvent != null) { _instance.OnRemoveGenericIDRequestEvent((ClientModels.RemoveGenericIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.RemoveSharedGroupMembersRequest)) { if (_instance.OnRemoveSharedGroupMembersRequestEvent != null) { _instance.OnRemoveSharedGroupMembersRequestEvent((ClientModels.RemoveSharedGroupMembersRequest)e.Request); return; } } + if (type == typeof(ClientModels.ReportAdActivityRequest)) { if (_instance.OnReportAdActivityRequestEvent != null) { _instance.OnReportAdActivityRequestEvent((ClientModels.ReportAdActivityRequest)e.Request); return; } } + if (type == typeof(ClientModels.DeviceInfoRequest)) { if (_instance.OnReportDeviceInfoRequestEvent != null) { _instance.OnReportDeviceInfoRequestEvent((ClientModels.DeviceInfoRequest)e.Request); return; } } + if (type == typeof(ClientModels.ReportPlayerClientRequest)) { if (_instance.OnReportPlayerRequestEvent != null) { _instance.OnReportPlayerRequestEvent((ClientModels.ReportPlayerClientRequest)e.Request); return; } } + if (type == typeof(ClientModels.RestoreIOSPurchasesRequest)) { if (_instance.OnRestoreIOSPurchasesRequestEvent != null) { _instance.OnRestoreIOSPurchasesRequestEvent((ClientModels.RestoreIOSPurchasesRequest)e.Request); return; } } + if (type == typeof(ClientModels.RewardAdActivityRequest)) { if (_instance.OnRewardAdActivityRequestEvent != null) { _instance.OnRewardAdActivityRequestEvent((ClientModels.RewardAdActivityRequest)e.Request); return; } } + if (type == typeof(ClientModels.SendAccountRecoveryEmailRequest)) { if (_instance.OnSendAccountRecoveryEmailRequestEvent != null) { _instance.OnSendAccountRecoveryEmailRequestEvent((ClientModels.SendAccountRecoveryEmailRequest)e.Request); return; } } + if (type == typeof(ClientModels.SetFriendTagsRequest)) { if (_instance.OnSetFriendTagsRequestEvent != null) { _instance.OnSetFriendTagsRequestEvent((ClientModels.SetFriendTagsRequest)e.Request); return; } } + if (type == typeof(ClientModels.SetPlayerSecretRequest)) { if (_instance.OnSetPlayerSecretRequestEvent != null) { _instance.OnSetPlayerSecretRequestEvent((ClientModels.SetPlayerSecretRequest)e.Request); return; } } + if (type == typeof(ClientModels.StartPurchaseRequest)) { if (_instance.OnStartPurchaseRequestEvent != null) { _instance.OnStartPurchaseRequestEvent((ClientModels.StartPurchaseRequest)e.Request); return; } } + if (type == typeof(ClientModels.SubtractUserVirtualCurrencyRequest)) { if (_instance.OnSubtractUserVirtualCurrencyRequestEvent != null) { _instance.OnSubtractUserVirtualCurrencyRequestEvent((ClientModels.SubtractUserVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkAndroidDeviceIDRequest)) { if (_instance.OnUnlinkAndroidDeviceIDRequestEvent != null) { _instance.OnUnlinkAndroidDeviceIDRequestEvent((ClientModels.UnlinkAndroidDeviceIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkAppleRequest)) { if (_instance.OnUnlinkAppleRequestEvent != null) { _instance.OnUnlinkAppleRequestEvent((ClientModels.UnlinkAppleRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkCustomIDRequest)) { if (_instance.OnUnlinkCustomIDRequestEvent != null) { _instance.OnUnlinkCustomIDRequestEvent((ClientModels.UnlinkCustomIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkFacebookAccountRequest)) { if (_instance.OnUnlinkFacebookAccountRequestEvent != null) { _instance.OnUnlinkFacebookAccountRequestEvent((ClientModels.UnlinkFacebookAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkFacebookInstantGamesIdRequest)) { if (_instance.OnUnlinkFacebookInstantGamesIdRequestEvent != null) { _instance.OnUnlinkFacebookInstantGamesIdRequestEvent((ClientModels.UnlinkFacebookInstantGamesIdRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkGameCenterAccountRequest)) { if (_instance.OnUnlinkGameCenterAccountRequestEvent != null) { _instance.OnUnlinkGameCenterAccountRequestEvent((ClientModels.UnlinkGameCenterAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkGoogleAccountRequest)) { if (_instance.OnUnlinkGoogleAccountRequestEvent != null) { _instance.OnUnlinkGoogleAccountRequestEvent((ClientModels.UnlinkGoogleAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkGooglePlayGamesServicesAccountRequest)) { if (_instance.OnUnlinkGooglePlayGamesServicesAccountRequestEvent != null) { _instance.OnUnlinkGooglePlayGamesServicesAccountRequestEvent((ClientModels.UnlinkGooglePlayGamesServicesAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkIOSDeviceIDRequest)) { if (_instance.OnUnlinkIOSDeviceIDRequestEvent != null) { _instance.OnUnlinkIOSDeviceIDRequestEvent((ClientModels.UnlinkIOSDeviceIDRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkKongregateAccountRequest)) { if (_instance.OnUnlinkKongregateRequestEvent != null) { _instance.OnUnlinkKongregateRequestEvent((ClientModels.UnlinkKongregateAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkNintendoServiceAccountRequest)) { if (_instance.OnUnlinkNintendoServiceAccountRequestEvent != null) { _instance.OnUnlinkNintendoServiceAccountRequestEvent((ClientModels.UnlinkNintendoServiceAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkNintendoSwitchDeviceIdRequest)) { if (_instance.OnUnlinkNintendoSwitchDeviceIdRequestEvent != null) { _instance.OnUnlinkNintendoSwitchDeviceIdRequestEvent((ClientModels.UnlinkNintendoSwitchDeviceIdRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkOpenIdConnectRequest)) { if (_instance.OnUnlinkOpenIdConnectRequestEvent != null) { _instance.OnUnlinkOpenIdConnectRequestEvent((ClientModels.UnlinkOpenIdConnectRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkPSNAccountRequest)) { if (_instance.OnUnlinkPSNAccountRequestEvent != null) { _instance.OnUnlinkPSNAccountRequestEvent((ClientModels.UnlinkPSNAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkSteamAccountRequest)) { if (_instance.OnUnlinkSteamAccountRequestEvent != null) { _instance.OnUnlinkSteamAccountRequestEvent((ClientModels.UnlinkSteamAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkTwitchAccountRequest)) { if (_instance.OnUnlinkTwitchRequestEvent != null) { _instance.OnUnlinkTwitchRequestEvent((ClientModels.UnlinkTwitchAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlinkXboxAccountRequest)) { if (_instance.OnUnlinkXboxAccountRequestEvent != null) { _instance.OnUnlinkXboxAccountRequestEvent((ClientModels.UnlinkXboxAccountRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlockContainerInstanceRequest)) { if (_instance.OnUnlockContainerInstanceRequestEvent != null) { _instance.OnUnlockContainerInstanceRequestEvent((ClientModels.UnlockContainerInstanceRequest)e.Request); return; } } + if (type == typeof(ClientModels.UnlockContainerItemRequest)) { if (_instance.OnUnlockContainerItemRequestEvent != null) { _instance.OnUnlockContainerItemRequestEvent((ClientModels.UnlockContainerItemRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdateAvatarUrlRequest)) { if (_instance.OnUpdateAvatarUrlRequestEvent != null) { _instance.OnUpdateAvatarUrlRequestEvent((ClientModels.UpdateAvatarUrlRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdateCharacterDataRequest)) { if (_instance.OnUpdateCharacterDataRequestEvent != null) { _instance.OnUpdateCharacterDataRequestEvent((ClientModels.UpdateCharacterDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdateCharacterStatisticsRequest)) { if (_instance.OnUpdateCharacterStatisticsRequestEvent != null) { _instance.OnUpdateCharacterStatisticsRequestEvent((ClientModels.UpdateCharacterStatisticsRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdatePlayerStatisticsRequest)) { if (_instance.OnUpdatePlayerStatisticsRequestEvent != null) { _instance.OnUpdatePlayerStatisticsRequestEvent((ClientModels.UpdatePlayerStatisticsRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdateSharedGroupDataRequest)) { if (_instance.OnUpdateSharedGroupDataRequestEvent != null) { _instance.OnUpdateSharedGroupDataRequestEvent((ClientModels.UpdateSharedGroupDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdateUserDataRequest)) { if (_instance.OnUpdateUserDataRequestEvent != null) { _instance.OnUpdateUserDataRequestEvent((ClientModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdateUserDataRequest)) { if (_instance.OnUpdateUserPublisherDataRequestEvent != null) { _instance.OnUpdateUserPublisherDataRequestEvent((ClientModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(ClientModels.UpdateUserTitleDisplayNameRequest)) { if (_instance.OnUpdateUserTitleDisplayNameRequestEvent != null) { _instance.OnUpdateUserTitleDisplayNameRequestEvent((ClientModels.UpdateUserTitleDisplayNameRequest)e.Request); return; } } + if (type == typeof(ClientModels.ValidateAmazonReceiptRequest)) { if (_instance.OnValidateAmazonIAPReceiptRequestEvent != null) { _instance.OnValidateAmazonIAPReceiptRequestEvent((ClientModels.ValidateAmazonReceiptRequest)e.Request); return; } } + if (type == typeof(ClientModels.ValidateGooglePlayPurchaseRequest)) { if (_instance.OnValidateGooglePlayPurchaseRequestEvent != null) { _instance.OnValidateGooglePlayPurchaseRequestEvent((ClientModels.ValidateGooglePlayPurchaseRequest)e.Request); return; } } + if (type == typeof(ClientModels.ValidateIOSReceiptRequest)) { if (_instance.OnValidateIOSReceiptRequestEvent != null) { _instance.OnValidateIOSReceiptRequestEvent((ClientModels.ValidateIOSReceiptRequest)e.Request); return; } } + if (type == typeof(ClientModels.ValidateWindowsReceiptRequest)) { if (_instance.OnValidateWindowsStoreReceiptRequestEvent != null) { _instance.OnValidateWindowsStoreReceiptRequestEvent((ClientModels.ValidateWindowsReceiptRequest)e.Request); return; } } + if (type == typeof(ClientModels.WriteClientCharacterEventRequest)) { if (_instance.OnWriteCharacterEventRequestEvent != null) { _instance.OnWriteCharacterEventRequestEvent((ClientModels.WriteClientCharacterEventRequest)e.Request); return; } } + if (type == typeof(ClientModels.WriteClientPlayerEventRequest)) { if (_instance.OnWritePlayerEventRequestEvent != null) { _instance.OnWritePlayerEventRequestEvent((ClientModels.WriteClientPlayerEventRequest)e.Request); return; } } + if (type == typeof(ClientModels.WriteTitleEventRequest)) { if (_instance.OnWriteTitleEventRequestEvent != null) { _instance.OnWriteTitleEventRequestEvent((ClientModels.WriteTitleEventRequest)e.Request); return; } } +#endif +#if ENABLE_PLAYFABSERVER_API + if (type == typeof(ServerModels.AddCharacterVirtualCurrencyRequest)) { if (_instance.OnServerAddCharacterVirtualCurrencyRequestEvent != null) { _instance.OnServerAddCharacterVirtualCurrencyRequestEvent((ServerModels.AddCharacterVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(ServerModels.AddFriendRequest)) { if (_instance.OnServerAddFriendRequestEvent != null) { _instance.OnServerAddFriendRequestEvent((ServerModels.AddFriendRequest)e.Request); return; } } + if (type == typeof(ServerModels.AddGenericIDRequest)) { if (_instance.OnServerAddGenericIDRequestEvent != null) { _instance.OnServerAddGenericIDRequestEvent((ServerModels.AddGenericIDRequest)e.Request); return; } } + if (type == typeof(ServerModels.AddPlayerTagRequest)) { if (_instance.OnServerAddPlayerTagRequestEvent != null) { _instance.OnServerAddPlayerTagRequestEvent((ServerModels.AddPlayerTagRequest)e.Request); return; } } + if (type == typeof(ServerModels.AddSharedGroupMembersRequest)) { if (_instance.OnServerAddSharedGroupMembersRequestEvent != null) { _instance.OnServerAddSharedGroupMembersRequestEvent((ServerModels.AddSharedGroupMembersRequest)e.Request); return; } } + if (type == typeof(ServerModels.AddUserVirtualCurrencyRequest)) { if (_instance.OnServerAddUserVirtualCurrencyRequestEvent != null) { _instance.OnServerAddUserVirtualCurrencyRequestEvent((ServerModels.AddUserVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(ServerModels.AuthenticateSessionTicketRequest)) { if (_instance.OnServerAuthenticateSessionTicketRequestEvent != null) { _instance.OnServerAuthenticateSessionTicketRequestEvent((ServerModels.AuthenticateSessionTicketRequest)e.Request); return; } } + if (type == typeof(ServerModels.AwardSteamAchievementRequest)) { if (_instance.OnServerAwardSteamAchievementRequestEvent != null) { _instance.OnServerAwardSteamAchievementRequestEvent((ServerModels.AwardSteamAchievementRequest)e.Request); return; } } + if (type == typeof(ServerModels.BanUsersRequest)) { if (_instance.OnServerBanUsersRequestEvent != null) { _instance.OnServerBanUsersRequestEvent((ServerModels.BanUsersRequest)e.Request); return; } } + if (type == typeof(ServerModels.ConsumeItemRequest)) { if (_instance.OnServerConsumeItemRequestEvent != null) { _instance.OnServerConsumeItemRequestEvent((ServerModels.ConsumeItemRequest)e.Request); return; } } + if (type == typeof(ServerModels.CreateSharedGroupRequest)) { if (_instance.OnServerCreateSharedGroupRequestEvent != null) { _instance.OnServerCreateSharedGroupRequestEvent((ServerModels.CreateSharedGroupRequest)e.Request); return; } } + if (type == typeof(ServerModels.DeleteCharacterFromUserRequest)) { if (_instance.OnServerDeleteCharacterFromUserRequestEvent != null) { _instance.OnServerDeleteCharacterFromUserRequestEvent((ServerModels.DeleteCharacterFromUserRequest)e.Request); return; } } + if (type == typeof(ServerModels.DeletePlayerRequest)) { if (_instance.OnServerDeletePlayerRequestEvent != null) { _instance.OnServerDeletePlayerRequestEvent((ServerModels.DeletePlayerRequest)e.Request); return; } } + if (type == typeof(ServerModels.DeletePushNotificationTemplateRequest)) { if (_instance.OnServerDeletePushNotificationTemplateRequestEvent != null) { _instance.OnServerDeletePushNotificationTemplateRequestEvent((ServerModels.DeletePushNotificationTemplateRequest)e.Request); return; } } + if (type == typeof(ServerModels.DeleteSharedGroupRequest)) { if (_instance.OnServerDeleteSharedGroupRequestEvent != null) { _instance.OnServerDeleteSharedGroupRequestEvent((ServerModels.DeleteSharedGroupRequest)e.Request); return; } } + if (type == typeof(ServerModels.EvaluateRandomResultTableRequest)) { if (_instance.OnServerEvaluateRandomResultTableRequestEvent != null) { _instance.OnServerEvaluateRandomResultTableRequestEvent((ServerModels.EvaluateRandomResultTableRequest)e.Request); return; } } + if (type == typeof(ServerModels.ExecuteCloudScriptServerRequest)) { if (_instance.OnServerExecuteCloudScriptRequestEvent != null) { _instance.OnServerExecuteCloudScriptRequestEvent((ServerModels.ExecuteCloudScriptServerRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetAllSegmentsRequest)) { if (_instance.OnServerGetAllSegmentsRequestEvent != null) { _instance.OnServerGetAllSegmentsRequestEvent((ServerModels.GetAllSegmentsRequest)e.Request); return; } } + if (type == typeof(ServerModels.ListUsersCharactersRequest)) { if (_instance.OnServerGetAllUsersCharactersRequestEvent != null) { _instance.OnServerGetAllUsersCharactersRequestEvent((ServerModels.ListUsersCharactersRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetCatalogItemsRequest)) { if (_instance.OnServerGetCatalogItemsRequestEvent != null) { _instance.OnServerGetCatalogItemsRequestEvent((ServerModels.GetCatalogItemsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetCharacterDataRequest)) { if (_instance.OnServerGetCharacterDataRequestEvent != null) { _instance.OnServerGetCharacterDataRequestEvent((ServerModels.GetCharacterDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetCharacterDataRequest)) { if (_instance.OnServerGetCharacterInternalDataRequestEvent != null) { _instance.OnServerGetCharacterInternalDataRequestEvent((ServerModels.GetCharacterDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetCharacterInventoryRequest)) { if (_instance.OnServerGetCharacterInventoryRequestEvent != null) { _instance.OnServerGetCharacterInventoryRequestEvent((ServerModels.GetCharacterInventoryRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetCharacterLeaderboardRequest)) { if (_instance.OnServerGetCharacterLeaderboardRequestEvent != null) { _instance.OnServerGetCharacterLeaderboardRequestEvent((ServerModels.GetCharacterLeaderboardRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetCharacterDataRequest)) { if (_instance.OnServerGetCharacterReadOnlyDataRequestEvent != null) { _instance.OnServerGetCharacterReadOnlyDataRequestEvent((ServerModels.GetCharacterDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetCharacterStatisticsRequest)) { if (_instance.OnServerGetCharacterStatisticsRequestEvent != null) { _instance.OnServerGetCharacterStatisticsRequestEvent((ServerModels.GetCharacterStatisticsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetContentDownloadUrlRequest)) { if (_instance.OnServerGetContentDownloadUrlRequestEvent != null) { _instance.OnServerGetContentDownloadUrlRequestEvent((ServerModels.GetContentDownloadUrlRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetFriendLeaderboardRequest)) { if (_instance.OnServerGetFriendLeaderboardRequestEvent != null) { _instance.OnServerGetFriendLeaderboardRequestEvent((ServerModels.GetFriendLeaderboardRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetFriendsListRequest)) { if (_instance.OnServerGetFriendsListRequestEvent != null) { _instance.OnServerGetFriendsListRequestEvent((ServerModels.GetFriendsListRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetLeaderboardRequest)) { if (_instance.OnServerGetLeaderboardRequestEvent != null) { _instance.OnServerGetLeaderboardRequestEvent((ServerModels.GetLeaderboardRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetLeaderboardAroundCharacterRequest)) { if (_instance.OnServerGetLeaderboardAroundCharacterRequestEvent != null) { _instance.OnServerGetLeaderboardAroundCharacterRequestEvent((ServerModels.GetLeaderboardAroundCharacterRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetLeaderboardAroundUserRequest)) { if (_instance.OnServerGetLeaderboardAroundUserRequestEvent != null) { _instance.OnServerGetLeaderboardAroundUserRequestEvent((ServerModels.GetLeaderboardAroundUserRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetLeaderboardForUsersCharactersRequest)) { if (_instance.OnServerGetLeaderboardForUserCharactersRequestEvent != null) { _instance.OnServerGetLeaderboardForUserCharactersRequestEvent((ServerModels.GetLeaderboardForUsersCharactersRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayerCombinedInfoRequest)) { if (_instance.OnServerGetPlayerCombinedInfoRequestEvent != null) { _instance.OnServerGetPlayerCombinedInfoRequestEvent((ServerModels.GetPlayerCombinedInfoRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayerProfileRequest)) { if (_instance.OnServerGetPlayerProfileRequestEvent != null) { _instance.OnServerGetPlayerProfileRequestEvent((ServerModels.GetPlayerProfileRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayersSegmentsRequest)) { if (_instance.OnServerGetPlayerSegmentsRequestEvent != null) { _instance.OnServerGetPlayerSegmentsRequestEvent((ServerModels.GetPlayersSegmentsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayersInSegmentRequest)) { if (_instance.OnServerGetPlayersInSegmentRequestEvent != null) { _instance.OnServerGetPlayersInSegmentRequestEvent((ServerModels.GetPlayersInSegmentRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayerStatisticsRequest)) { if (_instance.OnServerGetPlayerStatisticsRequestEvent != null) { _instance.OnServerGetPlayerStatisticsRequestEvent((ServerModels.GetPlayerStatisticsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayerStatisticVersionsRequest)) { if (_instance.OnServerGetPlayerStatisticVersionsRequestEvent != null) { _instance.OnServerGetPlayerStatisticVersionsRequestEvent((ServerModels.GetPlayerStatisticVersionsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayerTagsRequest)) { if (_instance.OnServerGetPlayerTagsRequestEvent != null) { _instance.OnServerGetPlayerTagsRequestEvent((ServerModels.GetPlayerTagsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromFacebookIDsRequest)) { if (_instance.OnServerGetPlayFabIDsFromFacebookIDsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromFacebookIDsRequestEvent((ServerModels.GetPlayFabIDsFromFacebookIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromFacebookInstantGamesIdsRequest)) { if (_instance.OnServerGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromFacebookInstantGamesIdsRequestEvent((ServerModels.GetPlayFabIDsFromFacebookInstantGamesIdsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromGenericIDsRequest)) { if (_instance.OnServerGetPlayFabIDsFromGenericIDsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromGenericIDsRequestEvent((ServerModels.GetPlayFabIDsFromGenericIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromNintendoServiceAccountIdsRequest)) { if (_instance.OnServerGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromNintendoServiceAccountIdsRequestEvent((ServerModels.GetPlayFabIDsFromNintendoServiceAccountIdsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest)) { if (_instance.OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsRequestEvent((ServerModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromPSNAccountIDsRequest)) { if (_instance.OnServerGetPlayFabIDsFromPSNAccountIDsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromPSNAccountIDsRequestEvent((ServerModels.GetPlayFabIDsFromPSNAccountIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromPSNOnlineIDsRequest)) { if (_instance.OnServerGetPlayFabIDsFromPSNOnlineIDsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromPSNOnlineIDsRequestEvent((ServerModels.GetPlayFabIDsFromPSNOnlineIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromSteamIDsRequest)) { if (_instance.OnServerGetPlayFabIDsFromSteamIDsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromSteamIDsRequestEvent((ServerModels.GetPlayFabIDsFromSteamIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromTwitchIDsRequest)) { if (_instance.OnServerGetPlayFabIDsFromTwitchIDsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromTwitchIDsRequestEvent((ServerModels.GetPlayFabIDsFromTwitchIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromXboxLiveIDsRequest)) { if (_instance.OnServerGetPlayFabIDsFromXboxLiveIDsRequestEvent != null) { _instance.OnServerGetPlayFabIDsFromXboxLiveIDsRequestEvent((ServerModels.GetPlayFabIDsFromXboxLiveIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetPublisherDataRequest)) { if (_instance.OnServerGetPublisherDataRequestEvent != null) { _instance.OnServerGetPublisherDataRequestEvent((ServerModels.GetPublisherDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetRandomResultTablesRequest)) { if (_instance.OnServerGetRandomResultTablesRequestEvent != null) { _instance.OnServerGetRandomResultTablesRequestEvent((ServerModels.GetRandomResultTablesRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetServerCustomIDsFromPlayFabIDsRequest)) { if (_instance.OnServerGetServerCustomIDsFromPlayFabIDsRequestEvent != null) { _instance.OnServerGetServerCustomIDsFromPlayFabIDsRequestEvent((ServerModels.GetServerCustomIDsFromPlayFabIDsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetSharedGroupDataRequest)) { if (_instance.OnServerGetSharedGroupDataRequestEvent != null) { _instance.OnServerGetSharedGroupDataRequestEvent((ServerModels.GetSharedGroupDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetStoreItemsServerRequest)) { if (_instance.OnServerGetStoreItemsRequestEvent != null) { _instance.OnServerGetStoreItemsRequestEvent((ServerModels.GetStoreItemsServerRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetTimeRequest)) { if (_instance.OnServerGetTimeRequestEvent != null) { _instance.OnServerGetTimeRequestEvent((ServerModels.GetTimeRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetTitleDataRequest)) { if (_instance.OnServerGetTitleDataRequestEvent != null) { _instance.OnServerGetTitleDataRequestEvent((ServerModels.GetTitleDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetTitleDataRequest)) { if (_instance.OnServerGetTitleInternalDataRequestEvent != null) { _instance.OnServerGetTitleInternalDataRequestEvent((ServerModels.GetTitleDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetTitleNewsRequest)) { if (_instance.OnServerGetTitleNewsRequestEvent != null) { _instance.OnServerGetTitleNewsRequestEvent((ServerModels.GetTitleNewsRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserAccountInfoRequest)) { if (_instance.OnServerGetUserAccountInfoRequestEvent != null) { _instance.OnServerGetUserAccountInfoRequestEvent((ServerModels.GetUserAccountInfoRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserBansRequest)) { if (_instance.OnServerGetUserBansRequestEvent != null) { _instance.OnServerGetUserBansRequestEvent((ServerModels.GetUserBansRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserDataRequest)) { if (_instance.OnServerGetUserDataRequestEvent != null) { _instance.OnServerGetUserDataRequestEvent((ServerModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserDataRequest)) { if (_instance.OnServerGetUserInternalDataRequestEvent != null) { _instance.OnServerGetUserInternalDataRequestEvent((ServerModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserInventoryRequest)) { if (_instance.OnServerGetUserInventoryRequestEvent != null) { _instance.OnServerGetUserInventoryRequestEvent((ServerModels.GetUserInventoryRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserDataRequest)) { if (_instance.OnServerGetUserPublisherDataRequestEvent != null) { _instance.OnServerGetUserPublisherDataRequestEvent((ServerModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserDataRequest)) { if (_instance.OnServerGetUserPublisherInternalDataRequestEvent != null) { _instance.OnServerGetUserPublisherInternalDataRequestEvent((ServerModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserDataRequest)) { if (_instance.OnServerGetUserPublisherReadOnlyDataRequestEvent != null) { _instance.OnServerGetUserPublisherReadOnlyDataRequestEvent((ServerModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GetUserDataRequest)) { if (_instance.OnServerGetUserReadOnlyDataRequestEvent != null) { _instance.OnServerGetUserReadOnlyDataRequestEvent((ServerModels.GetUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.GrantCharacterToUserRequest)) { if (_instance.OnServerGrantCharacterToUserRequestEvent != null) { _instance.OnServerGrantCharacterToUserRequestEvent((ServerModels.GrantCharacterToUserRequest)e.Request); return; } } + if (type == typeof(ServerModels.GrantItemsToCharacterRequest)) { if (_instance.OnServerGrantItemsToCharacterRequestEvent != null) { _instance.OnServerGrantItemsToCharacterRequestEvent((ServerModels.GrantItemsToCharacterRequest)e.Request); return; } } + if (type == typeof(ServerModels.GrantItemsToUserRequest)) { if (_instance.OnServerGrantItemsToUserRequestEvent != null) { _instance.OnServerGrantItemsToUserRequestEvent((ServerModels.GrantItemsToUserRequest)e.Request); return; } } + if (type == typeof(ServerModels.GrantItemsToUsersRequest)) { if (_instance.OnServerGrantItemsToUsersRequestEvent != null) { _instance.OnServerGrantItemsToUsersRequestEvent((ServerModels.GrantItemsToUsersRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkNintendoServiceAccountRequest)) { if (_instance.OnServerLinkNintendoServiceAccountRequestEvent != null) { _instance.OnServerLinkNintendoServiceAccountRequestEvent((ServerModels.LinkNintendoServiceAccountRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkNintendoServiceAccountSubjectRequest)) { if (_instance.OnServerLinkNintendoServiceAccountSubjectRequestEvent != null) { _instance.OnServerLinkNintendoServiceAccountSubjectRequestEvent((ServerModels.LinkNintendoServiceAccountSubjectRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkNintendoSwitchDeviceIdRequest)) { if (_instance.OnServerLinkNintendoSwitchDeviceIdRequestEvent != null) { _instance.OnServerLinkNintendoSwitchDeviceIdRequestEvent((ServerModels.LinkNintendoSwitchDeviceIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkPSNAccountRequest)) { if (_instance.OnServerLinkPSNAccountRequestEvent != null) { _instance.OnServerLinkPSNAccountRequestEvent((ServerModels.LinkPSNAccountRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkPSNIdRequest)) { if (_instance.OnServerLinkPSNIdRequestEvent != null) { _instance.OnServerLinkPSNIdRequestEvent((ServerModels.LinkPSNIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkServerCustomIdRequest)) { if (_instance.OnServerLinkServerCustomIdRequestEvent != null) { _instance.OnServerLinkServerCustomIdRequestEvent((ServerModels.LinkServerCustomIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkSteamIdRequest)) { if (_instance.OnServerLinkSteamIdRequestEvent != null) { _instance.OnServerLinkSteamIdRequestEvent((ServerModels.LinkSteamIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.LinkXboxAccountRequest)) { if (_instance.OnServerLinkXboxAccountRequestEvent != null) { _instance.OnServerLinkXboxAccountRequestEvent((ServerModels.LinkXboxAccountRequest)e.Request); return; } } + if (type == typeof(ServerModels.LoginWithPSNRequest)) { if (_instance.OnServerLoginWithPSNRequestEvent != null) { _instance.OnServerLoginWithPSNRequestEvent((ServerModels.LoginWithPSNRequest)e.Request); return; } } + if (type == typeof(ServerModels.LoginWithServerCustomIdRequest)) { if (_instance.OnServerLoginWithServerCustomIdRequestEvent != null) { _instance.OnServerLoginWithServerCustomIdRequestEvent((ServerModels.LoginWithServerCustomIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.LoginWithSteamIdRequest)) { if (_instance.OnServerLoginWithSteamIdRequestEvent != null) { _instance.OnServerLoginWithSteamIdRequestEvent((ServerModels.LoginWithSteamIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.LoginWithXboxRequest)) { if (_instance.OnServerLoginWithXboxRequestEvent != null) { _instance.OnServerLoginWithXboxRequestEvent((ServerModels.LoginWithXboxRequest)e.Request); return; } } + if (type == typeof(ServerModels.LoginWithXboxIdRequest)) { if (_instance.OnServerLoginWithXboxIdRequestEvent != null) { _instance.OnServerLoginWithXboxIdRequestEvent((ServerModels.LoginWithXboxIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.ModifyItemUsesRequest)) { if (_instance.OnServerModifyItemUsesRequestEvent != null) { _instance.OnServerModifyItemUsesRequestEvent((ServerModels.ModifyItemUsesRequest)e.Request); return; } } + if (type == typeof(ServerModels.MoveItemToCharacterFromCharacterRequest)) { if (_instance.OnServerMoveItemToCharacterFromCharacterRequestEvent != null) { _instance.OnServerMoveItemToCharacterFromCharacterRequestEvent((ServerModels.MoveItemToCharacterFromCharacterRequest)e.Request); return; } } + if (type == typeof(ServerModels.MoveItemToCharacterFromUserRequest)) { if (_instance.OnServerMoveItemToCharacterFromUserRequestEvent != null) { _instance.OnServerMoveItemToCharacterFromUserRequestEvent((ServerModels.MoveItemToCharacterFromUserRequest)e.Request); return; } } + if (type == typeof(ServerModels.MoveItemToUserFromCharacterRequest)) { if (_instance.OnServerMoveItemToUserFromCharacterRequestEvent != null) { _instance.OnServerMoveItemToUserFromCharacterRequestEvent((ServerModels.MoveItemToUserFromCharacterRequest)e.Request); return; } } + if (type == typeof(ServerModels.RedeemCouponRequest)) { if (_instance.OnServerRedeemCouponRequestEvent != null) { _instance.OnServerRedeemCouponRequestEvent((ServerModels.RedeemCouponRequest)e.Request); return; } } + if (type == typeof(ServerModels.RemoveFriendRequest)) { if (_instance.OnServerRemoveFriendRequestEvent != null) { _instance.OnServerRemoveFriendRequestEvent((ServerModels.RemoveFriendRequest)e.Request); return; } } + if (type == typeof(ServerModels.RemoveGenericIDRequest)) { if (_instance.OnServerRemoveGenericIDRequestEvent != null) { _instance.OnServerRemoveGenericIDRequestEvent((ServerModels.RemoveGenericIDRequest)e.Request); return; } } + if (type == typeof(ServerModels.RemovePlayerTagRequest)) { if (_instance.OnServerRemovePlayerTagRequestEvent != null) { _instance.OnServerRemovePlayerTagRequestEvent((ServerModels.RemovePlayerTagRequest)e.Request); return; } } + if (type == typeof(ServerModels.RemoveSharedGroupMembersRequest)) { if (_instance.OnServerRemoveSharedGroupMembersRequestEvent != null) { _instance.OnServerRemoveSharedGroupMembersRequestEvent((ServerModels.RemoveSharedGroupMembersRequest)e.Request); return; } } + if (type == typeof(ServerModels.ReportPlayerServerRequest)) { if (_instance.OnServerReportPlayerRequestEvent != null) { _instance.OnServerReportPlayerRequestEvent((ServerModels.ReportPlayerServerRequest)e.Request); return; } } + if (type == typeof(ServerModels.RevokeAllBansForUserRequest)) { if (_instance.OnServerRevokeAllBansForUserRequestEvent != null) { _instance.OnServerRevokeAllBansForUserRequestEvent((ServerModels.RevokeAllBansForUserRequest)e.Request); return; } } + if (type == typeof(ServerModels.RevokeBansRequest)) { if (_instance.OnServerRevokeBansRequestEvent != null) { _instance.OnServerRevokeBansRequestEvent((ServerModels.RevokeBansRequest)e.Request); return; } } + if (type == typeof(ServerModels.RevokeInventoryItemRequest)) { if (_instance.OnServerRevokeInventoryItemRequestEvent != null) { _instance.OnServerRevokeInventoryItemRequestEvent((ServerModels.RevokeInventoryItemRequest)e.Request); return; } } + if (type == typeof(ServerModels.RevokeInventoryItemsRequest)) { if (_instance.OnServerRevokeInventoryItemsRequestEvent != null) { _instance.OnServerRevokeInventoryItemsRequestEvent((ServerModels.RevokeInventoryItemsRequest)e.Request); return; } } + if (type == typeof(ServerModels.SavePushNotificationTemplateRequest)) { if (_instance.OnServerSavePushNotificationTemplateRequestEvent != null) { _instance.OnServerSavePushNotificationTemplateRequestEvent((ServerModels.SavePushNotificationTemplateRequest)e.Request); return; } } + if (type == typeof(ServerModels.SendCustomAccountRecoveryEmailRequest)) { if (_instance.OnServerSendCustomAccountRecoveryEmailRequestEvent != null) { _instance.OnServerSendCustomAccountRecoveryEmailRequestEvent((ServerModels.SendCustomAccountRecoveryEmailRequest)e.Request); return; } } + if (type == typeof(ServerModels.SendEmailFromTemplateRequest)) { if (_instance.OnServerSendEmailFromTemplateRequestEvent != null) { _instance.OnServerSendEmailFromTemplateRequestEvent((ServerModels.SendEmailFromTemplateRequest)e.Request); return; } } + if (type == typeof(ServerModels.SendPushNotificationRequest)) { if (_instance.OnServerSendPushNotificationRequestEvent != null) { _instance.OnServerSendPushNotificationRequestEvent((ServerModels.SendPushNotificationRequest)e.Request); return; } } + if (type == typeof(ServerModels.SendPushNotificationFromTemplateRequest)) { if (_instance.OnServerSendPushNotificationFromTemplateRequestEvent != null) { _instance.OnServerSendPushNotificationFromTemplateRequestEvent((ServerModels.SendPushNotificationFromTemplateRequest)e.Request); return; } } + if (type == typeof(ServerModels.SetFriendTagsRequest)) { if (_instance.OnServerSetFriendTagsRequestEvent != null) { _instance.OnServerSetFriendTagsRequestEvent((ServerModels.SetFriendTagsRequest)e.Request); return; } } + if (type == typeof(ServerModels.SetPlayerSecretRequest)) { if (_instance.OnServerSetPlayerSecretRequestEvent != null) { _instance.OnServerSetPlayerSecretRequestEvent((ServerModels.SetPlayerSecretRequest)e.Request); return; } } + if (type == typeof(ServerModels.SetPublisherDataRequest)) { if (_instance.OnServerSetPublisherDataRequestEvent != null) { _instance.OnServerSetPublisherDataRequestEvent((ServerModels.SetPublisherDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.SetTitleDataRequest)) { if (_instance.OnServerSetTitleDataRequestEvent != null) { _instance.OnServerSetTitleDataRequestEvent((ServerModels.SetTitleDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.SetTitleDataRequest)) { if (_instance.OnServerSetTitleInternalDataRequestEvent != null) { _instance.OnServerSetTitleInternalDataRequestEvent((ServerModels.SetTitleDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.SubtractCharacterVirtualCurrencyRequest)) { if (_instance.OnServerSubtractCharacterVirtualCurrencyRequestEvent != null) { _instance.OnServerSubtractCharacterVirtualCurrencyRequestEvent((ServerModels.SubtractCharacterVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(ServerModels.SubtractUserVirtualCurrencyRequest)) { if (_instance.OnServerSubtractUserVirtualCurrencyRequestEvent != null) { _instance.OnServerSubtractUserVirtualCurrencyRequestEvent((ServerModels.SubtractUserVirtualCurrencyRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlinkNintendoServiceAccountRequest)) { if (_instance.OnServerUnlinkNintendoServiceAccountRequestEvent != null) { _instance.OnServerUnlinkNintendoServiceAccountRequestEvent((ServerModels.UnlinkNintendoServiceAccountRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlinkNintendoSwitchDeviceIdRequest)) { if (_instance.OnServerUnlinkNintendoSwitchDeviceIdRequestEvent != null) { _instance.OnServerUnlinkNintendoSwitchDeviceIdRequestEvent((ServerModels.UnlinkNintendoSwitchDeviceIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlinkPSNAccountRequest)) { if (_instance.OnServerUnlinkPSNAccountRequestEvent != null) { _instance.OnServerUnlinkPSNAccountRequestEvent((ServerModels.UnlinkPSNAccountRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlinkServerCustomIdRequest)) { if (_instance.OnServerUnlinkServerCustomIdRequestEvent != null) { _instance.OnServerUnlinkServerCustomIdRequestEvent((ServerModels.UnlinkServerCustomIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlinkSteamIdRequest)) { if (_instance.OnServerUnlinkSteamIdRequestEvent != null) { _instance.OnServerUnlinkSteamIdRequestEvent((ServerModels.UnlinkSteamIdRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlinkXboxAccountRequest)) { if (_instance.OnServerUnlinkXboxAccountRequestEvent != null) { _instance.OnServerUnlinkXboxAccountRequestEvent((ServerModels.UnlinkXboxAccountRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlockContainerInstanceRequest)) { if (_instance.OnServerUnlockContainerInstanceRequestEvent != null) { _instance.OnServerUnlockContainerInstanceRequestEvent((ServerModels.UnlockContainerInstanceRequest)e.Request); return; } } + if (type == typeof(ServerModels.UnlockContainerItemRequest)) { if (_instance.OnServerUnlockContainerItemRequestEvent != null) { _instance.OnServerUnlockContainerItemRequestEvent((ServerModels.UnlockContainerItemRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateAvatarUrlRequest)) { if (_instance.OnServerUpdateAvatarUrlRequestEvent != null) { _instance.OnServerUpdateAvatarUrlRequestEvent((ServerModels.UpdateAvatarUrlRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateBansRequest)) { if (_instance.OnServerUpdateBansRequestEvent != null) { _instance.OnServerUpdateBansRequestEvent((ServerModels.UpdateBansRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateCharacterDataRequest)) { if (_instance.OnServerUpdateCharacterDataRequestEvent != null) { _instance.OnServerUpdateCharacterDataRequestEvent((ServerModels.UpdateCharacterDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateCharacterDataRequest)) { if (_instance.OnServerUpdateCharacterInternalDataRequestEvent != null) { _instance.OnServerUpdateCharacterInternalDataRequestEvent((ServerModels.UpdateCharacterDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateCharacterDataRequest)) { if (_instance.OnServerUpdateCharacterReadOnlyDataRequestEvent != null) { _instance.OnServerUpdateCharacterReadOnlyDataRequestEvent((ServerModels.UpdateCharacterDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateCharacterStatisticsRequest)) { if (_instance.OnServerUpdateCharacterStatisticsRequestEvent != null) { _instance.OnServerUpdateCharacterStatisticsRequestEvent((ServerModels.UpdateCharacterStatisticsRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdatePlayerStatisticsRequest)) { if (_instance.OnServerUpdatePlayerStatisticsRequestEvent != null) { _instance.OnServerUpdatePlayerStatisticsRequestEvent((ServerModels.UpdatePlayerStatisticsRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateSharedGroupDataRequest)) { if (_instance.OnServerUpdateSharedGroupDataRequestEvent != null) { _instance.OnServerUpdateSharedGroupDataRequestEvent((ServerModels.UpdateSharedGroupDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateUserDataRequest)) { if (_instance.OnServerUpdateUserDataRequestEvent != null) { _instance.OnServerUpdateUserDataRequestEvent((ServerModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateUserInternalDataRequest)) { if (_instance.OnServerUpdateUserInternalDataRequestEvent != null) { _instance.OnServerUpdateUserInternalDataRequestEvent((ServerModels.UpdateUserInternalDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateUserInventoryItemDataRequest)) { if (_instance.OnServerUpdateUserInventoryItemCustomDataRequestEvent != null) { _instance.OnServerUpdateUserInventoryItemCustomDataRequestEvent((ServerModels.UpdateUserInventoryItemDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateUserDataRequest)) { if (_instance.OnServerUpdateUserPublisherDataRequestEvent != null) { _instance.OnServerUpdateUserPublisherDataRequestEvent((ServerModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateUserInternalDataRequest)) { if (_instance.OnServerUpdateUserPublisherInternalDataRequestEvent != null) { _instance.OnServerUpdateUserPublisherInternalDataRequestEvent((ServerModels.UpdateUserInternalDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateUserDataRequest)) { if (_instance.OnServerUpdateUserPublisherReadOnlyDataRequestEvent != null) { _instance.OnServerUpdateUserPublisherReadOnlyDataRequestEvent((ServerModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.UpdateUserDataRequest)) { if (_instance.OnServerUpdateUserReadOnlyDataRequestEvent != null) { _instance.OnServerUpdateUserReadOnlyDataRequestEvent((ServerModels.UpdateUserDataRequest)e.Request); return; } } + if (type == typeof(ServerModels.WriteServerCharacterEventRequest)) { if (_instance.OnServerWriteCharacterEventRequestEvent != null) { _instance.OnServerWriteCharacterEventRequestEvent((ServerModels.WriteServerCharacterEventRequest)e.Request); return; } } + if (type == typeof(ServerModels.WriteServerPlayerEventRequest)) { if (_instance.OnServerWritePlayerEventRequestEvent != null) { _instance.OnServerWritePlayerEventRequestEvent((ServerModels.WriteServerPlayerEventRequest)e.Request); return; } } + if (type == typeof(ServerModels.WriteTitleEventRequest)) { if (_instance.OnServerWriteTitleEventRequestEvent != null) { _instance.OnServerWriteTitleEventRequestEvent((ServerModels.WriteTitleEventRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(AuthenticationModels.AuthenticateCustomIdRequest)) { if (_instance.OnAuthenticationAuthenticateGameServerWithCustomIdRequestEvent != null) { _instance.OnAuthenticationAuthenticateGameServerWithCustomIdRequestEvent((AuthenticationModels.AuthenticateCustomIdRequest)e.Request); return; } } + if (type == typeof(AuthenticationModels.DeleteRequest)) { if (_instance.OnAuthenticationDeleteRequestEvent != null) { _instance.OnAuthenticationDeleteRequestEvent((AuthenticationModels.DeleteRequest)e.Request); return; } } + if (type == typeof(AuthenticationModels.GetEntityTokenRequest)) { if (_instance.OnAuthenticationGetEntityTokenRequestEvent != null) { _instance.OnAuthenticationGetEntityTokenRequestEvent((AuthenticationModels.GetEntityTokenRequest)e.Request); return; } } + if (type == typeof(AuthenticationModels.ValidateEntityTokenRequest)) { if (_instance.OnAuthenticationValidateEntityTokenRequestEvent != null) { _instance.OnAuthenticationValidateEntityTokenRequestEvent((AuthenticationModels.ValidateEntityTokenRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(CloudScriptModels.ExecuteEntityCloudScriptRequest)) { if (_instance.OnCloudScriptExecuteEntityCloudScriptRequestEvent != null) { _instance.OnCloudScriptExecuteEntityCloudScriptRequestEvent((CloudScriptModels.ExecuteEntityCloudScriptRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.ExecuteFunctionRequest)) { if (_instance.OnCloudScriptExecuteFunctionRequestEvent != null) { _instance.OnCloudScriptExecuteFunctionRequestEvent((CloudScriptModels.ExecuteFunctionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.GetFunctionRequest)) { if (_instance.OnCloudScriptGetFunctionRequestEvent != null) { _instance.OnCloudScriptGetFunctionRequestEvent((CloudScriptModels.GetFunctionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.ListFunctionsRequest)) { if (_instance.OnCloudScriptListEventHubFunctionsRequestEvent != null) { _instance.OnCloudScriptListEventHubFunctionsRequestEvent((CloudScriptModels.ListFunctionsRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.ListFunctionsRequest)) { if (_instance.OnCloudScriptListFunctionsRequestEvent != null) { _instance.OnCloudScriptListFunctionsRequestEvent((CloudScriptModels.ListFunctionsRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.ListFunctionsRequest)) { if (_instance.OnCloudScriptListHttpFunctionsRequestEvent != null) { _instance.OnCloudScriptListHttpFunctionsRequestEvent((CloudScriptModels.ListFunctionsRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.ListFunctionsRequest)) { if (_instance.OnCloudScriptListQueuedFunctionsRequestEvent != null) { _instance.OnCloudScriptListQueuedFunctionsRequestEvent((CloudScriptModels.ListFunctionsRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.PostFunctionResultForEntityTriggeredActionRequest)) { if (_instance.OnCloudScriptPostFunctionResultForEntityTriggeredActionRequestEvent != null) { _instance.OnCloudScriptPostFunctionResultForEntityTriggeredActionRequestEvent((CloudScriptModels.PostFunctionResultForEntityTriggeredActionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.PostFunctionResultForFunctionExecutionRequest)) { if (_instance.OnCloudScriptPostFunctionResultForFunctionExecutionRequestEvent != null) { _instance.OnCloudScriptPostFunctionResultForFunctionExecutionRequestEvent((CloudScriptModels.PostFunctionResultForFunctionExecutionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.PostFunctionResultForPlayerTriggeredActionRequest)) { if (_instance.OnCloudScriptPostFunctionResultForPlayerTriggeredActionRequestEvent != null) { _instance.OnCloudScriptPostFunctionResultForPlayerTriggeredActionRequestEvent((CloudScriptModels.PostFunctionResultForPlayerTriggeredActionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.PostFunctionResultForScheduledTaskRequest)) { if (_instance.OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent != null) { _instance.OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent((CloudScriptModels.PostFunctionResultForScheduledTaskRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.RegisterEventHubFunctionRequest)) { if (_instance.OnCloudScriptRegisterEventHubFunctionRequestEvent != null) { _instance.OnCloudScriptRegisterEventHubFunctionRequestEvent((CloudScriptModels.RegisterEventHubFunctionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.RegisterHttpFunctionRequest)) { if (_instance.OnCloudScriptRegisterHttpFunctionRequestEvent != null) { _instance.OnCloudScriptRegisterHttpFunctionRequestEvent((CloudScriptModels.RegisterHttpFunctionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.RegisterQueuedFunctionRequest)) { if (_instance.OnCloudScriptRegisterQueuedFunctionRequestEvent != null) { _instance.OnCloudScriptRegisterQueuedFunctionRequestEvent((CloudScriptModels.RegisterQueuedFunctionRequest)e.Request); return; } } + if (type == typeof(CloudScriptModels.UnregisterFunctionRequest)) { if (_instance.OnCloudScriptUnregisterFunctionRequestEvent != null) { _instance.OnCloudScriptUnregisterFunctionRequestEvent((CloudScriptModels.UnregisterFunctionRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(DataModels.AbortFileUploadsRequest)) { if (_instance.OnDataAbortFileUploadsRequestEvent != null) { _instance.OnDataAbortFileUploadsRequestEvent((DataModels.AbortFileUploadsRequest)e.Request); return; } } + if (type == typeof(DataModels.DeleteFilesRequest)) { if (_instance.OnDataDeleteFilesRequestEvent != null) { _instance.OnDataDeleteFilesRequestEvent((DataModels.DeleteFilesRequest)e.Request); return; } } + if (type == typeof(DataModels.FinalizeFileUploadsRequest)) { if (_instance.OnDataFinalizeFileUploadsRequestEvent != null) { _instance.OnDataFinalizeFileUploadsRequestEvent((DataModels.FinalizeFileUploadsRequest)e.Request); return; } } + if (type == typeof(DataModels.GetFilesRequest)) { if (_instance.OnDataGetFilesRequestEvent != null) { _instance.OnDataGetFilesRequestEvent((DataModels.GetFilesRequest)e.Request); return; } } + if (type == typeof(DataModels.GetObjectsRequest)) { if (_instance.OnDataGetObjectsRequestEvent != null) { _instance.OnDataGetObjectsRequestEvent((DataModels.GetObjectsRequest)e.Request); return; } } + if (type == typeof(DataModels.InitiateFileUploadsRequest)) { if (_instance.OnDataInitiateFileUploadsRequestEvent != null) { _instance.OnDataInitiateFileUploadsRequestEvent((DataModels.InitiateFileUploadsRequest)e.Request); return; } } + if (type == typeof(DataModels.SetObjectsRequest)) { if (_instance.OnDataSetObjectsRequestEvent != null) { _instance.OnDataSetObjectsRequestEvent((DataModels.SetObjectsRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(EconomyModels.AddInventoryItemsRequest)) { if (_instance.OnEconomyAddInventoryItemsRequestEvent != null) { _instance.OnEconomyAddInventoryItemsRequestEvent((EconomyModels.AddInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.CreateDraftItemRequest)) { if (_instance.OnEconomyCreateDraftItemRequestEvent != null) { _instance.OnEconomyCreateDraftItemRequestEvent((EconomyModels.CreateDraftItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.CreateUploadUrlsRequest)) { if (_instance.OnEconomyCreateUploadUrlsRequestEvent != null) { _instance.OnEconomyCreateUploadUrlsRequestEvent((EconomyModels.CreateUploadUrlsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.DeleteEntityItemReviewsRequest)) { if (_instance.OnEconomyDeleteEntityItemReviewsRequestEvent != null) { _instance.OnEconomyDeleteEntityItemReviewsRequestEvent((EconomyModels.DeleteEntityItemReviewsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.DeleteInventoryCollectionRequest)) { if (_instance.OnEconomyDeleteInventoryCollectionRequestEvent != null) { _instance.OnEconomyDeleteInventoryCollectionRequestEvent((EconomyModels.DeleteInventoryCollectionRequest)e.Request); return; } } + if (type == typeof(EconomyModels.DeleteInventoryItemsRequest)) { if (_instance.OnEconomyDeleteInventoryItemsRequestEvent != null) { _instance.OnEconomyDeleteInventoryItemsRequestEvent((EconomyModels.DeleteInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.DeleteItemRequest)) { if (_instance.OnEconomyDeleteItemRequestEvent != null) { _instance.OnEconomyDeleteItemRequestEvent((EconomyModels.DeleteItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.ExecuteInventoryOperationsRequest)) { if (_instance.OnEconomyExecuteInventoryOperationsRequestEvent != null) { _instance.OnEconomyExecuteInventoryOperationsRequestEvent((EconomyModels.ExecuteInventoryOperationsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.ExecuteTransferOperationsRequest)) { if (_instance.OnEconomyExecuteTransferOperationsRequestEvent != null) { _instance.OnEconomyExecuteTransferOperationsRequestEvent((EconomyModels.ExecuteTransferOperationsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetCatalogConfigRequest)) { if (_instance.OnEconomyGetCatalogConfigRequestEvent != null) { _instance.OnEconomyGetCatalogConfigRequestEvent((EconomyModels.GetCatalogConfigRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetDraftItemRequest)) { if (_instance.OnEconomyGetDraftItemRequestEvent != null) { _instance.OnEconomyGetDraftItemRequestEvent((EconomyModels.GetDraftItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetDraftItemsRequest)) { if (_instance.OnEconomyGetDraftItemsRequestEvent != null) { _instance.OnEconomyGetDraftItemsRequestEvent((EconomyModels.GetDraftItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetEntityDraftItemsRequest)) { if (_instance.OnEconomyGetEntityDraftItemsRequestEvent != null) { _instance.OnEconomyGetEntityDraftItemsRequestEvent((EconomyModels.GetEntityDraftItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetEntityItemReviewRequest)) { if (_instance.OnEconomyGetEntityItemReviewRequestEvent != null) { _instance.OnEconomyGetEntityItemReviewRequestEvent((EconomyModels.GetEntityItemReviewRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetInventoryCollectionIdsRequest)) { if (_instance.OnEconomyGetInventoryCollectionIdsRequestEvent != null) { _instance.OnEconomyGetInventoryCollectionIdsRequestEvent((EconomyModels.GetInventoryCollectionIdsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetInventoryItemsRequest)) { if (_instance.OnEconomyGetInventoryItemsRequestEvent != null) { _instance.OnEconomyGetInventoryItemsRequestEvent((EconomyModels.GetInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetInventoryOperationStatusRequest)) { if (_instance.OnEconomyGetInventoryOperationStatusRequestEvent != null) { _instance.OnEconomyGetInventoryOperationStatusRequestEvent((EconomyModels.GetInventoryOperationStatusRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetItemRequest)) { if (_instance.OnEconomyGetItemRequestEvent != null) { _instance.OnEconomyGetItemRequestEvent((EconomyModels.GetItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetItemContainersRequest)) { if (_instance.OnEconomyGetItemContainersRequestEvent != null) { _instance.OnEconomyGetItemContainersRequestEvent((EconomyModels.GetItemContainersRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetItemModerationStateRequest)) { if (_instance.OnEconomyGetItemModerationStateRequestEvent != null) { _instance.OnEconomyGetItemModerationStateRequestEvent((EconomyModels.GetItemModerationStateRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetItemPublishStatusRequest)) { if (_instance.OnEconomyGetItemPublishStatusRequestEvent != null) { _instance.OnEconomyGetItemPublishStatusRequestEvent((EconomyModels.GetItemPublishStatusRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetItemReviewsRequest)) { if (_instance.OnEconomyGetItemReviewsRequestEvent != null) { _instance.OnEconomyGetItemReviewsRequestEvent((EconomyModels.GetItemReviewsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetItemReviewSummaryRequest)) { if (_instance.OnEconomyGetItemReviewSummaryRequestEvent != null) { _instance.OnEconomyGetItemReviewSummaryRequestEvent((EconomyModels.GetItemReviewSummaryRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetItemsRequest)) { if (_instance.OnEconomyGetItemsRequestEvent != null) { _instance.OnEconomyGetItemsRequestEvent((EconomyModels.GetItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetMicrosoftStoreAccessTokensRequest)) { if (_instance.OnEconomyGetMicrosoftStoreAccessTokensRequestEvent != null) { _instance.OnEconomyGetMicrosoftStoreAccessTokensRequestEvent((EconomyModels.GetMicrosoftStoreAccessTokensRequest)e.Request); return; } } + if (type == typeof(EconomyModels.GetTransactionHistoryRequest)) { if (_instance.OnEconomyGetTransactionHistoryRequestEvent != null) { _instance.OnEconomyGetTransactionHistoryRequestEvent((EconomyModels.GetTransactionHistoryRequest)e.Request); return; } } + if (type == typeof(EconomyModels.PublishDraftItemRequest)) { if (_instance.OnEconomyPublishDraftItemRequestEvent != null) { _instance.OnEconomyPublishDraftItemRequestEvent((EconomyModels.PublishDraftItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.PurchaseInventoryItemsRequest)) { if (_instance.OnEconomyPurchaseInventoryItemsRequestEvent != null) { _instance.OnEconomyPurchaseInventoryItemsRequestEvent((EconomyModels.PurchaseInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.RedeemAppleAppStoreInventoryItemsRequest)) { if (_instance.OnEconomyRedeemAppleAppStoreInventoryItemsRequestEvent != null) { _instance.OnEconomyRedeemAppleAppStoreInventoryItemsRequestEvent((EconomyModels.RedeemAppleAppStoreInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.RedeemGooglePlayInventoryItemsRequest)) { if (_instance.OnEconomyRedeemGooglePlayInventoryItemsRequestEvent != null) { _instance.OnEconomyRedeemGooglePlayInventoryItemsRequestEvent((EconomyModels.RedeemGooglePlayInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.RedeemMicrosoftStoreInventoryItemsRequest)) { if (_instance.OnEconomyRedeemMicrosoftStoreInventoryItemsRequestEvent != null) { _instance.OnEconomyRedeemMicrosoftStoreInventoryItemsRequestEvent((EconomyModels.RedeemMicrosoftStoreInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.RedeemNintendoEShopInventoryItemsRequest)) { if (_instance.OnEconomyRedeemNintendoEShopInventoryItemsRequestEvent != null) { _instance.OnEconomyRedeemNintendoEShopInventoryItemsRequestEvent((EconomyModels.RedeemNintendoEShopInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.RedeemPlayStationStoreInventoryItemsRequest)) { if (_instance.OnEconomyRedeemPlayStationStoreInventoryItemsRequestEvent != null) { _instance.OnEconomyRedeemPlayStationStoreInventoryItemsRequestEvent((EconomyModels.RedeemPlayStationStoreInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.RedeemSteamInventoryItemsRequest)) { if (_instance.OnEconomyRedeemSteamInventoryItemsRequestEvent != null) { _instance.OnEconomyRedeemSteamInventoryItemsRequestEvent((EconomyModels.RedeemSteamInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.ReportItemRequest)) { if (_instance.OnEconomyReportItemRequestEvent != null) { _instance.OnEconomyReportItemRequestEvent((EconomyModels.ReportItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.ReportItemReviewRequest)) { if (_instance.OnEconomyReportItemReviewRequestEvent != null) { _instance.OnEconomyReportItemReviewRequestEvent((EconomyModels.ReportItemReviewRequest)e.Request); return; } } + if (type == typeof(EconomyModels.ReviewItemRequest)) { if (_instance.OnEconomyReviewItemRequestEvent != null) { _instance.OnEconomyReviewItemRequestEvent((EconomyModels.ReviewItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.SearchItemsRequest)) { if (_instance.OnEconomySearchItemsRequestEvent != null) { _instance.OnEconomySearchItemsRequestEvent((EconomyModels.SearchItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.SetItemModerationStateRequest)) { if (_instance.OnEconomySetItemModerationStateRequestEvent != null) { _instance.OnEconomySetItemModerationStateRequestEvent((EconomyModels.SetItemModerationStateRequest)e.Request); return; } } + if (type == typeof(EconomyModels.SubmitItemReviewVoteRequest)) { if (_instance.OnEconomySubmitItemReviewVoteRequestEvent != null) { _instance.OnEconomySubmitItemReviewVoteRequestEvent((EconomyModels.SubmitItemReviewVoteRequest)e.Request); return; } } + if (type == typeof(EconomyModels.SubtractInventoryItemsRequest)) { if (_instance.OnEconomySubtractInventoryItemsRequestEvent != null) { _instance.OnEconomySubtractInventoryItemsRequestEvent((EconomyModels.SubtractInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.TakedownItemReviewsRequest)) { if (_instance.OnEconomyTakedownItemReviewsRequestEvent != null) { _instance.OnEconomyTakedownItemReviewsRequestEvent((EconomyModels.TakedownItemReviewsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.TransferInventoryItemsRequest)) { if (_instance.OnEconomyTransferInventoryItemsRequestEvent != null) { _instance.OnEconomyTransferInventoryItemsRequestEvent((EconomyModels.TransferInventoryItemsRequest)e.Request); return; } } + if (type == typeof(EconomyModels.UpdateCatalogConfigRequest)) { if (_instance.OnEconomyUpdateCatalogConfigRequestEvent != null) { _instance.OnEconomyUpdateCatalogConfigRequestEvent((EconomyModels.UpdateCatalogConfigRequest)e.Request); return; } } + if (type == typeof(EconomyModels.UpdateDraftItemRequest)) { if (_instance.OnEconomyUpdateDraftItemRequestEvent != null) { _instance.OnEconomyUpdateDraftItemRequestEvent((EconomyModels.UpdateDraftItemRequest)e.Request); return; } } + if (type == typeof(EconomyModels.UpdateInventoryItemsRequest)) { if (_instance.OnEconomyUpdateInventoryItemsRequestEvent != null) { _instance.OnEconomyUpdateInventoryItemsRequestEvent((EconomyModels.UpdateInventoryItemsRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(EventsModels.CreateTelemetryKeyRequest)) { if (_instance.OnEventsCreateTelemetryKeyRequestEvent != null) { _instance.OnEventsCreateTelemetryKeyRequestEvent((EventsModels.CreateTelemetryKeyRequest)e.Request); return; } } + if (type == typeof(EventsModels.DeleteTelemetryKeyRequest)) { if (_instance.OnEventsDeleteTelemetryKeyRequestEvent != null) { _instance.OnEventsDeleteTelemetryKeyRequestEvent((EventsModels.DeleteTelemetryKeyRequest)e.Request); return; } } + if (type == typeof(EventsModels.GetTelemetryKeyRequest)) { if (_instance.OnEventsGetTelemetryKeyRequestEvent != null) { _instance.OnEventsGetTelemetryKeyRequestEvent((EventsModels.GetTelemetryKeyRequest)e.Request); return; } } + if (type == typeof(EventsModels.ListTelemetryKeysRequest)) { if (_instance.OnEventsListTelemetryKeysRequestEvent != null) { _instance.OnEventsListTelemetryKeysRequestEvent((EventsModels.ListTelemetryKeysRequest)e.Request); return; } } + if (type == typeof(EventsModels.SetTelemetryKeyActiveRequest)) { if (_instance.OnEventsSetTelemetryKeyActiveRequestEvent != null) { _instance.OnEventsSetTelemetryKeyActiveRequestEvent((EventsModels.SetTelemetryKeyActiveRequest)e.Request); return; } } + if (type == typeof(EventsModels.WriteEventsRequest)) { if (_instance.OnEventsWriteEventsRequestEvent != null) { _instance.OnEventsWriteEventsRequestEvent((EventsModels.WriteEventsRequest)e.Request); return; } } + if (type == typeof(EventsModels.WriteEventsRequest)) { if (_instance.OnEventsWriteTelemetryEventsRequestEvent != null) { _instance.OnEventsWriteTelemetryEventsRequestEvent((EventsModels.WriteEventsRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(ExperimentationModels.CreateExclusionGroupRequest)) { if (_instance.OnExperimentationCreateExclusionGroupRequestEvent != null) { _instance.OnExperimentationCreateExclusionGroupRequestEvent((ExperimentationModels.CreateExclusionGroupRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.CreateExperimentRequest)) { if (_instance.OnExperimentationCreateExperimentRequestEvent != null) { _instance.OnExperimentationCreateExperimentRequestEvent((ExperimentationModels.CreateExperimentRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.DeleteExclusionGroupRequest)) { if (_instance.OnExperimentationDeleteExclusionGroupRequestEvent != null) { _instance.OnExperimentationDeleteExclusionGroupRequestEvent((ExperimentationModels.DeleteExclusionGroupRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.DeleteExperimentRequest)) { if (_instance.OnExperimentationDeleteExperimentRequestEvent != null) { _instance.OnExperimentationDeleteExperimentRequestEvent((ExperimentationModels.DeleteExperimentRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.GetExclusionGroupsRequest)) { if (_instance.OnExperimentationGetExclusionGroupsRequestEvent != null) { _instance.OnExperimentationGetExclusionGroupsRequestEvent((ExperimentationModels.GetExclusionGroupsRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.GetExclusionGroupTrafficRequest)) { if (_instance.OnExperimentationGetExclusionGroupTrafficRequestEvent != null) { _instance.OnExperimentationGetExclusionGroupTrafficRequestEvent((ExperimentationModels.GetExclusionGroupTrafficRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.GetExperimentsRequest)) { if (_instance.OnExperimentationGetExperimentsRequestEvent != null) { _instance.OnExperimentationGetExperimentsRequestEvent((ExperimentationModels.GetExperimentsRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.GetLatestScorecardRequest)) { if (_instance.OnExperimentationGetLatestScorecardRequestEvent != null) { _instance.OnExperimentationGetLatestScorecardRequestEvent((ExperimentationModels.GetLatestScorecardRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.GetTreatmentAssignmentRequest)) { if (_instance.OnExperimentationGetTreatmentAssignmentRequestEvent != null) { _instance.OnExperimentationGetTreatmentAssignmentRequestEvent((ExperimentationModels.GetTreatmentAssignmentRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.StartExperimentRequest)) { if (_instance.OnExperimentationStartExperimentRequestEvent != null) { _instance.OnExperimentationStartExperimentRequestEvent((ExperimentationModels.StartExperimentRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.StopExperimentRequest)) { if (_instance.OnExperimentationStopExperimentRequestEvent != null) { _instance.OnExperimentationStopExperimentRequestEvent((ExperimentationModels.StopExperimentRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.UpdateExclusionGroupRequest)) { if (_instance.OnExperimentationUpdateExclusionGroupRequestEvent != null) { _instance.OnExperimentationUpdateExclusionGroupRequestEvent((ExperimentationModels.UpdateExclusionGroupRequest)e.Request); return; } } + if (type == typeof(ExperimentationModels.UpdateExperimentRequest)) { if (_instance.OnExperimentationUpdateExperimentRequestEvent != null) { _instance.OnExperimentationUpdateExperimentRequestEvent((ExperimentationModels.UpdateExperimentRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(InsightsModels.InsightsEmptyRequest)) { if (_instance.OnInsightsGetDetailsRequestEvent != null) { _instance.OnInsightsGetDetailsRequestEvent((InsightsModels.InsightsEmptyRequest)e.Request); return; } } + if (type == typeof(InsightsModels.InsightsEmptyRequest)) { if (_instance.OnInsightsGetLimitsRequestEvent != null) { _instance.OnInsightsGetLimitsRequestEvent((InsightsModels.InsightsEmptyRequest)e.Request); return; } } + if (type == typeof(InsightsModels.InsightsGetOperationStatusRequest)) { if (_instance.OnInsightsGetOperationStatusRequestEvent != null) { _instance.OnInsightsGetOperationStatusRequestEvent((InsightsModels.InsightsGetOperationStatusRequest)e.Request); return; } } + if (type == typeof(InsightsModels.InsightsGetPendingOperationsRequest)) { if (_instance.OnInsightsGetPendingOperationsRequestEvent != null) { _instance.OnInsightsGetPendingOperationsRequestEvent((InsightsModels.InsightsGetPendingOperationsRequest)e.Request); return; } } + if (type == typeof(InsightsModels.InsightsSetPerformanceRequest)) { if (_instance.OnInsightsSetPerformanceRequestEvent != null) { _instance.OnInsightsSetPerformanceRequestEvent((InsightsModels.InsightsSetPerformanceRequest)e.Request); return; } } + if (type == typeof(InsightsModels.InsightsSetStorageRetentionRequest)) { if (_instance.OnInsightsSetStorageRetentionRequestEvent != null) { _instance.OnInsightsSetStorageRetentionRequestEvent((InsightsModels.InsightsSetStorageRetentionRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(GroupsModels.AcceptGroupApplicationRequest)) { if (_instance.OnGroupsAcceptGroupApplicationRequestEvent != null) { _instance.OnGroupsAcceptGroupApplicationRequestEvent((GroupsModels.AcceptGroupApplicationRequest)e.Request); return; } } + if (type == typeof(GroupsModels.AcceptGroupInvitationRequest)) { if (_instance.OnGroupsAcceptGroupInvitationRequestEvent != null) { _instance.OnGroupsAcceptGroupInvitationRequestEvent((GroupsModels.AcceptGroupInvitationRequest)e.Request); return; } } + if (type == typeof(GroupsModels.AddMembersRequest)) { if (_instance.OnGroupsAddMembersRequestEvent != null) { _instance.OnGroupsAddMembersRequestEvent((GroupsModels.AddMembersRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ApplyToGroupRequest)) { if (_instance.OnGroupsApplyToGroupRequestEvent != null) { _instance.OnGroupsApplyToGroupRequestEvent((GroupsModels.ApplyToGroupRequest)e.Request); return; } } + if (type == typeof(GroupsModels.BlockEntityRequest)) { if (_instance.OnGroupsBlockEntityRequestEvent != null) { _instance.OnGroupsBlockEntityRequestEvent((GroupsModels.BlockEntityRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ChangeMemberRoleRequest)) { if (_instance.OnGroupsChangeMemberRoleRequestEvent != null) { _instance.OnGroupsChangeMemberRoleRequestEvent((GroupsModels.ChangeMemberRoleRequest)e.Request); return; } } + if (type == typeof(GroupsModels.CreateGroupRequest)) { if (_instance.OnGroupsCreateGroupRequestEvent != null) { _instance.OnGroupsCreateGroupRequestEvent((GroupsModels.CreateGroupRequest)e.Request); return; } } + if (type == typeof(GroupsModels.CreateGroupRoleRequest)) { if (_instance.OnGroupsCreateRoleRequestEvent != null) { _instance.OnGroupsCreateRoleRequestEvent((GroupsModels.CreateGroupRoleRequest)e.Request); return; } } + if (type == typeof(GroupsModels.DeleteGroupRequest)) { if (_instance.OnGroupsDeleteGroupRequestEvent != null) { _instance.OnGroupsDeleteGroupRequestEvent((GroupsModels.DeleteGroupRequest)e.Request); return; } } + if (type == typeof(GroupsModels.DeleteRoleRequest)) { if (_instance.OnGroupsDeleteRoleRequestEvent != null) { _instance.OnGroupsDeleteRoleRequestEvent((GroupsModels.DeleteRoleRequest)e.Request); return; } } + if (type == typeof(GroupsModels.GetGroupRequest)) { if (_instance.OnGroupsGetGroupRequestEvent != null) { _instance.OnGroupsGetGroupRequestEvent((GroupsModels.GetGroupRequest)e.Request); return; } } + if (type == typeof(GroupsModels.InviteToGroupRequest)) { if (_instance.OnGroupsInviteToGroupRequestEvent != null) { _instance.OnGroupsInviteToGroupRequestEvent((GroupsModels.InviteToGroupRequest)e.Request); return; } } + if (type == typeof(GroupsModels.IsMemberRequest)) { if (_instance.OnGroupsIsMemberRequestEvent != null) { _instance.OnGroupsIsMemberRequestEvent((GroupsModels.IsMemberRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ListGroupApplicationsRequest)) { if (_instance.OnGroupsListGroupApplicationsRequestEvent != null) { _instance.OnGroupsListGroupApplicationsRequestEvent((GroupsModels.ListGroupApplicationsRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ListGroupBlocksRequest)) { if (_instance.OnGroupsListGroupBlocksRequestEvent != null) { _instance.OnGroupsListGroupBlocksRequestEvent((GroupsModels.ListGroupBlocksRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ListGroupInvitationsRequest)) { if (_instance.OnGroupsListGroupInvitationsRequestEvent != null) { _instance.OnGroupsListGroupInvitationsRequestEvent((GroupsModels.ListGroupInvitationsRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ListGroupMembersRequest)) { if (_instance.OnGroupsListGroupMembersRequestEvent != null) { _instance.OnGroupsListGroupMembersRequestEvent((GroupsModels.ListGroupMembersRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ListMembershipRequest)) { if (_instance.OnGroupsListMembershipRequestEvent != null) { _instance.OnGroupsListMembershipRequestEvent((GroupsModels.ListMembershipRequest)e.Request); return; } } + if (type == typeof(GroupsModels.ListMembershipOpportunitiesRequest)) { if (_instance.OnGroupsListMembershipOpportunitiesRequestEvent != null) { _instance.OnGroupsListMembershipOpportunitiesRequestEvent((GroupsModels.ListMembershipOpportunitiesRequest)e.Request); return; } } + if (type == typeof(GroupsModels.RemoveGroupApplicationRequest)) { if (_instance.OnGroupsRemoveGroupApplicationRequestEvent != null) { _instance.OnGroupsRemoveGroupApplicationRequestEvent((GroupsModels.RemoveGroupApplicationRequest)e.Request); return; } } + if (type == typeof(GroupsModels.RemoveGroupInvitationRequest)) { if (_instance.OnGroupsRemoveGroupInvitationRequestEvent != null) { _instance.OnGroupsRemoveGroupInvitationRequestEvent((GroupsModels.RemoveGroupInvitationRequest)e.Request); return; } } + if (type == typeof(GroupsModels.RemoveMembersRequest)) { if (_instance.OnGroupsRemoveMembersRequestEvent != null) { _instance.OnGroupsRemoveMembersRequestEvent((GroupsModels.RemoveMembersRequest)e.Request); return; } } + if (type == typeof(GroupsModels.UnblockEntityRequest)) { if (_instance.OnGroupsUnblockEntityRequestEvent != null) { _instance.OnGroupsUnblockEntityRequestEvent((GroupsModels.UnblockEntityRequest)e.Request); return; } } + if (type == typeof(GroupsModels.UpdateGroupRequest)) { if (_instance.OnGroupsUpdateGroupRequestEvent != null) { _instance.OnGroupsUpdateGroupRequestEvent((GroupsModels.UpdateGroupRequest)e.Request); return; } } + if (type == typeof(GroupsModels.UpdateGroupRoleRequest)) { if (_instance.OnGroupsUpdateRoleRequestEvent != null) { _instance.OnGroupsUpdateRoleRequestEvent((GroupsModels.UpdateGroupRoleRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(ProgressionModels.CreateLeaderboardDefinitionRequest)) { if (_instance.OnProgressionCreateLeaderboardDefinitionRequestEvent != null) { _instance.OnProgressionCreateLeaderboardDefinitionRequestEvent((ProgressionModels.CreateLeaderboardDefinitionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.CreateStatisticDefinitionRequest)) { if (_instance.OnProgressionCreateStatisticDefinitionRequestEvent != null) { _instance.OnProgressionCreateStatisticDefinitionRequestEvent((ProgressionModels.CreateStatisticDefinitionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.DeleteLeaderboardDefinitionRequest)) { if (_instance.OnProgressionDeleteLeaderboardDefinitionRequestEvent != null) { _instance.OnProgressionDeleteLeaderboardDefinitionRequestEvent((ProgressionModels.DeleteLeaderboardDefinitionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.DeleteLeaderboardEntriesRequest)) { if (_instance.OnProgressionDeleteLeaderboardEntriesRequestEvent != null) { _instance.OnProgressionDeleteLeaderboardEntriesRequestEvent((ProgressionModels.DeleteLeaderboardEntriesRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.DeleteStatisticDefinitionRequest)) { if (_instance.OnProgressionDeleteStatisticDefinitionRequestEvent != null) { _instance.OnProgressionDeleteStatisticDefinitionRequestEvent((ProgressionModels.DeleteStatisticDefinitionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.DeleteStatisticsRequest)) { if (_instance.OnProgressionDeleteStatisticsRequestEvent != null) { _instance.OnProgressionDeleteStatisticsRequestEvent((ProgressionModels.DeleteStatisticsRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetFriendLeaderboardForEntityRequest)) { if (_instance.OnProgressionGetFriendLeaderboardForEntityRequestEvent != null) { _instance.OnProgressionGetFriendLeaderboardForEntityRequestEvent((ProgressionModels.GetFriendLeaderboardForEntityRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetEntityLeaderboardRequest)) { if (_instance.OnProgressionGetLeaderboardRequestEvent != null) { _instance.OnProgressionGetLeaderboardRequestEvent((ProgressionModels.GetEntityLeaderboardRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetLeaderboardAroundEntityRequest)) { if (_instance.OnProgressionGetLeaderboardAroundEntityRequestEvent != null) { _instance.OnProgressionGetLeaderboardAroundEntityRequestEvent((ProgressionModels.GetLeaderboardAroundEntityRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetLeaderboardDefinitionRequest)) { if (_instance.OnProgressionGetLeaderboardDefinitionRequestEvent != null) { _instance.OnProgressionGetLeaderboardDefinitionRequestEvent((ProgressionModels.GetLeaderboardDefinitionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetLeaderboardForEntitiesRequest)) { if (_instance.OnProgressionGetLeaderboardForEntitiesRequestEvent != null) { _instance.OnProgressionGetLeaderboardForEntitiesRequestEvent((ProgressionModels.GetLeaderboardForEntitiesRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetStatisticDefinitionRequest)) { if (_instance.OnProgressionGetStatisticDefinitionRequestEvent != null) { _instance.OnProgressionGetStatisticDefinitionRequestEvent((ProgressionModels.GetStatisticDefinitionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetStatisticsRequest)) { if (_instance.OnProgressionGetStatisticsRequestEvent != null) { _instance.OnProgressionGetStatisticsRequestEvent((ProgressionModels.GetStatisticsRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.GetStatisticsForEntitiesRequest)) { if (_instance.OnProgressionGetStatisticsForEntitiesRequestEvent != null) { _instance.OnProgressionGetStatisticsForEntitiesRequestEvent((ProgressionModels.GetStatisticsForEntitiesRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.IncrementLeaderboardVersionRequest)) { if (_instance.OnProgressionIncrementLeaderboardVersionRequestEvent != null) { _instance.OnProgressionIncrementLeaderboardVersionRequestEvent((ProgressionModels.IncrementLeaderboardVersionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.IncrementStatisticVersionRequest)) { if (_instance.OnProgressionIncrementStatisticVersionRequestEvent != null) { _instance.OnProgressionIncrementStatisticVersionRequestEvent((ProgressionModels.IncrementStatisticVersionRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.ListLeaderboardDefinitionsRequest)) { if (_instance.OnProgressionListLeaderboardDefinitionsRequestEvent != null) { _instance.OnProgressionListLeaderboardDefinitionsRequestEvent((ProgressionModels.ListLeaderboardDefinitionsRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.ListStatisticDefinitionsRequest)) { if (_instance.OnProgressionListStatisticDefinitionsRequestEvent != null) { _instance.OnProgressionListStatisticDefinitionsRequestEvent((ProgressionModels.ListStatisticDefinitionsRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.UnlinkLeaderboardFromStatisticRequest)) { if (_instance.OnProgressionUnlinkLeaderboardFromStatisticRequestEvent != null) { _instance.OnProgressionUnlinkLeaderboardFromStatisticRequestEvent((ProgressionModels.UnlinkLeaderboardFromStatisticRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.UpdateLeaderboardEntriesRequest)) { if (_instance.OnProgressionUpdateLeaderboardEntriesRequestEvent != null) { _instance.OnProgressionUpdateLeaderboardEntriesRequestEvent((ProgressionModels.UpdateLeaderboardEntriesRequest)e.Request); return; } } + if (type == typeof(ProgressionModels.UpdateStatisticsRequest)) { if (_instance.OnProgressionUpdateStatisticsRequestEvent != null) { _instance.OnProgressionUpdateStatisticsRequestEvent((ProgressionModels.UpdateStatisticsRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(LocalizationModels.GetLanguageListRequest)) { if (_instance.OnLocalizationGetLanguageListRequestEvent != null) { _instance.OnLocalizationGetLanguageListRequestEvent((LocalizationModels.GetLanguageListRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(MultiplayerModels.CancelAllMatchmakingTicketsForPlayerRequest)) { if (_instance.OnMultiplayerCancelAllMatchmakingTicketsForPlayerRequestEvent != null) { _instance.OnMultiplayerCancelAllMatchmakingTicketsForPlayerRequestEvent((MultiplayerModels.CancelAllMatchmakingTicketsForPlayerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CancelAllServerBackfillTicketsForPlayerRequest)) { if (_instance.OnMultiplayerCancelAllServerBackfillTicketsForPlayerRequestEvent != null) { _instance.OnMultiplayerCancelAllServerBackfillTicketsForPlayerRequestEvent((MultiplayerModels.CancelAllServerBackfillTicketsForPlayerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CancelMatchmakingTicketRequest)) { if (_instance.OnMultiplayerCancelMatchmakingTicketRequestEvent != null) { _instance.OnMultiplayerCancelMatchmakingTicketRequestEvent((MultiplayerModels.CancelMatchmakingTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CancelServerBackfillTicketRequest)) { if (_instance.OnMultiplayerCancelServerBackfillTicketRequestEvent != null) { _instance.OnMultiplayerCancelServerBackfillTicketRequestEvent((MultiplayerModels.CancelServerBackfillTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateBuildAliasRequest)) { if (_instance.OnMultiplayerCreateBuildAliasRequestEvent != null) { _instance.OnMultiplayerCreateBuildAliasRequestEvent((MultiplayerModels.CreateBuildAliasRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateBuildWithCustomContainerRequest)) { if (_instance.OnMultiplayerCreateBuildWithCustomContainerRequestEvent != null) { _instance.OnMultiplayerCreateBuildWithCustomContainerRequestEvent((MultiplayerModels.CreateBuildWithCustomContainerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateBuildWithManagedContainerRequest)) { if (_instance.OnMultiplayerCreateBuildWithManagedContainerRequestEvent != null) { _instance.OnMultiplayerCreateBuildWithManagedContainerRequestEvent((MultiplayerModels.CreateBuildWithManagedContainerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateBuildWithProcessBasedServerRequest)) { if (_instance.OnMultiplayerCreateBuildWithProcessBasedServerRequestEvent != null) { _instance.OnMultiplayerCreateBuildWithProcessBasedServerRequestEvent((MultiplayerModels.CreateBuildWithProcessBasedServerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateLobbyRequest)) { if (_instance.OnMultiplayerCreateLobbyRequestEvent != null) { _instance.OnMultiplayerCreateLobbyRequestEvent((MultiplayerModels.CreateLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateMatchmakingTicketRequest)) { if (_instance.OnMultiplayerCreateMatchmakingTicketRequestEvent != null) { _instance.OnMultiplayerCreateMatchmakingTicketRequestEvent((MultiplayerModels.CreateMatchmakingTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateRemoteUserRequest)) { if (_instance.OnMultiplayerCreateRemoteUserRequestEvent != null) { _instance.OnMultiplayerCreateRemoteUserRequestEvent((MultiplayerModels.CreateRemoteUserRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateServerBackfillTicketRequest)) { if (_instance.OnMultiplayerCreateServerBackfillTicketRequestEvent != null) { _instance.OnMultiplayerCreateServerBackfillTicketRequestEvent((MultiplayerModels.CreateServerBackfillTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateServerMatchmakingTicketRequest)) { if (_instance.OnMultiplayerCreateServerMatchmakingTicketRequestEvent != null) { _instance.OnMultiplayerCreateServerMatchmakingTicketRequestEvent((MultiplayerModels.CreateServerMatchmakingTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.CreateTitleMultiplayerServersQuotaChangeRequest)) { if (_instance.OnMultiplayerCreateTitleMultiplayerServersQuotaChangeRequestEvent != null) { _instance.OnMultiplayerCreateTitleMultiplayerServersQuotaChangeRequestEvent((MultiplayerModels.CreateTitleMultiplayerServersQuotaChangeRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteAssetRequest)) { if (_instance.OnMultiplayerDeleteAssetRequestEvent != null) { _instance.OnMultiplayerDeleteAssetRequestEvent((MultiplayerModels.DeleteAssetRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteBuildRequest)) { if (_instance.OnMultiplayerDeleteBuildRequestEvent != null) { _instance.OnMultiplayerDeleteBuildRequestEvent((MultiplayerModels.DeleteBuildRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteBuildAliasRequest)) { if (_instance.OnMultiplayerDeleteBuildAliasRequestEvent != null) { _instance.OnMultiplayerDeleteBuildAliasRequestEvent((MultiplayerModels.DeleteBuildAliasRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteBuildRegionRequest)) { if (_instance.OnMultiplayerDeleteBuildRegionRequestEvent != null) { _instance.OnMultiplayerDeleteBuildRegionRequestEvent((MultiplayerModels.DeleteBuildRegionRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteCertificateRequest)) { if (_instance.OnMultiplayerDeleteCertificateRequestEvent != null) { _instance.OnMultiplayerDeleteCertificateRequestEvent((MultiplayerModels.DeleteCertificateRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteContainerImageRequest)) { if (_instance.OnMultiplayerDeleteContainerImageRepositoryRequestEvent != null) { _instance.OnMultiplayerDeleteContainerImageRepositoryRequestEvent((MultiplayerModels.DeleteContainerImageRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteLobbyRequest)) { if (_instance.OnMultiplayerDeleteLobbyRequestEvent != null) { _instance.OnMultiplayerDeleteLobbyRequestEvent((MultiplayerModels.DeleteLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteRemoteUserRequest)) { if (_instance.OnMultiplayerDeleteRemoteUserRequestEvent != null) { _instance.OnMultiplayerDeleteRemoteUserRequestEvent((MultiplayerModels.DeleteRemoteUserRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.DeleteSecretRequest)) { if (_instance.OnMultiplayerDeleteSecretRequestEvent != null) { _instance.OnMultiplayerDeleteSecretRequestEvent((MultiplayerModels.DeleteSecretRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.EnableMultiplayerServersForTitleRequest)) { if (_instance.OnMultiplayerEnableMultiplayerServersForTitleRequestEvent != null) { _instance.OnMultiplayerEnableMultiplayerServersForTitleRequestEvent((MultiplayerModels.EnableMultiplayerServersForTitleRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.FindFriendLobbiesRequest)) { if (_instance.OnMultiplayerFindFriendLobbiesRequestEvent != null) { _instance.OnMultiplayerFindFriendLobbiesRequestEvent((MultiplayerModels.FindFriendLobbiesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.FindLobbiesRequest)) { if (_instance.OnMultiplayerFindLobbiesRequestEvent != null) { _instance.OnMultiplayerFindLobbiesRequestEvent((MultiplayerModels.FindLobbiesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetAssetDownloadUrlRequest)) { if (_instance.OnMultiplayerGetAssetDownloadUrlRequestEvent != null) { _instance.OnMultiplayerGetAssetDownloadUrlRequestEvent((MultiplayerModels.GetAssetDownloadUrlRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetAssetUploadUrlRequest)) { if (_instance.OnMultiplayerGetAssetUploadUrlRequestEvent != null) { _instance.OnMultiplayerGetAssetUploadUrlRequestEvent((MultiplayerModels.GetAssetUploadUrlRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetBuildRequest)) { if (_instance.OnMultiplayerGetBuildRequestEvent != null) { _instance.OnMultiplayerGetBuildRequestEvent((MultiplayerModels.GetBuildRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetBuildAliasRequest)) { if (_instance.OnMultiplayerGetBuildAliasRequestEvent != null) { _instance.OnMultiplayerGetBuildAliasRequestEvent((MultiplayerModels.GetBuildAliasRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetContainerRegistryCredentialsRequest)) { if (_instance.OnMultiplayerGetContainerRegistryCredentialsRequestEvent != null) { _instance.OnMultiplayerGetContainerRegistryCredentialsRequestEvent((MultiplayerModels.GetContainerRegistryCredentialsRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetLobbyRequest)) { if (_instance.OnMultiplayerGetLobbyRequestEvent != null) { _instance.OnMultiplayerGetLobbyRequestEvent((MultiplayerModels.GetLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetMatchRequest)) { if (_instance.OnMultiplayerGetMatchRequestEvent != null) { _instance.OnMultiplayerGetMatchRequestEvent((MultiplayerModels.GetMatchRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetMatchmakingQueueRequest)) { if (_instance.OnMultiplayerGetMatchmakingQueueRequestEvent != null) { _instance.OnMultiplayerGetMatchmakingQueueRequestEvent((MultiplayerModels.GetMatchmakingQueueRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetMatchmakingTicketRequest)) { if (_instance.OnMultiplayerGetMatchmakingTicketRequestEvent != null) { _instance.OnMultiplayerGetMatchmakingTicketRequestEvent((MultiplayerModels.GetMatchmakingTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetMultiplayerServerDetailsRequest)) { if (_instance.OnMultiplayerGetMultiplayerServerDetailsRequestEvent != null) { _instance.OnMultiplayerGetMultiplayerServerDetailsRequestEvent((MultiplayerModels.GetMultiplayerServerDetailsRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetMultiplayerServerLogsRequest)) { if (_instance.OnMultiplayerGetMultiplayerServerLogsRequestEvent != null) { _instance.OnMultiplayerGetMultiplayerServerLogsRequestEvent((MultiplayerModels.GetMultiplayerServerLogsRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetMultiplayerSessionLogsBySessionIdRequest)) { if (_instance.OnMultiplayerGetMultiplayerSessionLogsBySessionIdRequestEvent != null) { _instance.OnMultiplayerGetMultiplayerSessionLogsBySessionIdRequestEvent((MultiplayerModels.GetMultiplayerSessionLogsBySessionIdRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetQueueStatisticsRequest)) { if (_instance.OnMultiplayerGetQueueStatisticsRequestEvent != null) { _instance.OnMultiplayerGetQueueStatisticsRequestEvent((MultiplayerModels.GetQueueStatisticsRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetRemoteLoginEndpointRequest)) { if (_instance.OnMultiplayerGetRemoteLoginEndpointRequestEvent != null) { _instance.OnMultiplayerGetRemoteLoginEndpointRequestEvent((MultiplayerModels.GetRemoteLoginEndpointRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetServerBackfillTicketRequest)) { if (_instance.OnMultiplayerGetServerBackfillTicketRequestEvent != null) { _instance.OnMultiplayerGetServerBackfillTicketRequestEvent((MultiplayerModels.GetServerBackfillTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetTitleEnabledForMultiplayerServersStatusRequest)) { if (_instance.OnMultiplayerGetTitleEnabledForMultiplayerServersStatusRequestEvent != null) { _instance.OnMultiplayerGetTitleEnabledForMultiplayerServersStatusRequestEvent((MultiplayerModels.GetTitleEnabledForMultiplayerServersStatusRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetTitleMultiplayerServersQuotaChangeRequest)) { if (_instance.OnMultiplayerGetTitleMultiplayerServersQuotaChangeRequestEvent != null) { _instance.OnMultiplayerGetTitleMultiplayerServersQuotaChangeRequestEvent((MultiplayerModels.GetTitleMultiplayerServersQuotaChangeRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.GetTitleMultiplayerServersQuotasRequest)) { if (_instance.OnMultiplayerGetTitleMultiplayerServersQuotasRequestEvent != null) { _instance.OnMultiplayerGetTitleMultiplayerServersQuotasRequestEvent((MultiplayerModels.GetTitleMultiplayerServersQuotasRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.InviteToLobbyRequest)) { if (_instance.OnMultiplayerInviteToLobbyRequestEvent != null) { _instance.OnMultiplayerInviteToLobbyRequestEvent((MultiplayerModels.InviteToLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.JoinArrangedLobbyRequest)) { if (_instance.OnMultiplayerJoinArrangedLobbyRequestEvent != null) { _instance.OnMultiplayerJoinArrangedLobbyRequestEvent((MultiplayerModels.JoinArrangedLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.JoinLobbyRequest)) { if (_instance.OnMultiplayerJoinLobbyRequestEvent != null) { _instance.OnMultiplayerJoinLobbyRequestEvent((MultiplayerModels.JoinLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.JoinLobbyAsServerRequest)) { if (_instance.OnMultiplayerJoinLobbyAsServerRequestEvent != null) { _instance.OnMultiplayerJoinLobbyAsServerRequestEvent((MultiplayerModels.JoinLobbyAsServerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.JoinMatchmakingTicketRequest)) { if (_instance.OnMultiplayerJoinMatchmakingTicketRequestEvent != null) { _instance.OnMultiplayerJoinMatchmakingTicketRequestEvent((MultiplayerModels.JoinMatchmakingTicketRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.LeaveLobbyRequest)) { if (_instance.OnMultiplayerLeaveLobbyRequestEvent != null) { _instance.OnMultiplayerLeaveLobbyRequestEvent((MultiplayerModels.LeaveLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.LeaveLobbyAsServerRequest)) { if (_instance.OnMultiplayerLeaveLobbyAsServerRequestEvent != null) { _instance.OnMultiplayerLeaveLobbyAsServerRequestEvent((MultiplayerModels.LeaveLobbyAsServerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListMultiplayerServersRequest)) { if (_instance.OnMultiplayerListArchivedMultiplayerServersRequestEvent != null) { _instance.OnMultiplayerListArchivedMultiplayerServersRequestEvent((MultiplayerModels.ListMultiplayerServersRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListAssetSummariesRequest)) { if (_instance.OnMultiplayerListAssetSummariesRequestEvent != null) { _instance.OnMultiplayerListAssetSummariesRequestEvent((MultiplayerModels.ListAssetSummariesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListBuildAliasesRequest)) { if (_instance.OnMultiplayerListBuildAliasesRequestEvent != null) { _instance.OnMultiplayerListBuildAliasesRequestEvent((MultiplayerModels.ListBuildAliasesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListBuildSummariesRequest)) { if (_instance.OnMultiplayerListBuildSummariesV2RequestEvent != null) { _instance.OnMultiplayerListBuildSummariesV2RequestEvent((MultiplayerModels.ListBuildSummariesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListCertificateSummariesRequest)) { if (_instance.OnMultiplayerListCertificateSummariesRequestEvent != null) { _instance.OnMultiplayerListCertificateSummariesRequestEvent((MultiplayerModels.ListCertificateSummariesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListContainerImagesRequest)) { if (_instance.OnMultiplayerListContainerImagesRequestEvent != null) { _instance.OnMultiplayerListContainerImagesRequestEvent((MultiplayerModels.ListContainerImagesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListContainerImageTagsRequest)) { if (_instance.OnMultiplayerListContainerImageTagsRequestEvent != null) { _instance.OnMultiplayerListContainerImageTagsRequestEvent((MultiplayerModels.ListContainerImageTagsRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListMatchmakingQueuesRequest)) { if (_instance.OnMultiplayerListMatchmakingQueuesRequestEvent != null) { _instance.OnMultiplayerListMatchmakingQueuesRequestEvent((MultiplayerModels.ListMatchmakingQueuesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListMatchmakingTicketsForPlayerRequest)) { if (_instance.OnMultiplayerListMatchmakingTicketsForPlayerRequestEvent != null) { _instance.OnMultiplayerListMatchmakingTicketsForPlayerRequestEvent((MultiplayerModels.ListMatchmakingTicketsForPlayerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListMultiplayerServersRequest)) { if (_instance.OnMultiplayerListMultiplayerServersRequestEvent != null) { _instance.OnMultiplayerListMultiplayerServersRequestEvent((MultiplayerModels.ListMultiplayerServersRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListPartyQosServersRequest)) { if (_instance.OnMultiplayerListPartyQosServersRequestEvent != null) { _instance.OnMultiplayerListPartyQosServersRequestEvent((MultiplayerModels.ListPartyQosServersRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListQosServersForTitleRequest)) { if (_instance.OnMultiplayerListQosServersForTitleRequestEvent != null) { _instance.OnMultiplayerListQosServersForTitleRequestEvent((MultiplayerModels.ListQosServersForTitleRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListSecretSummariesRequest)) { if (_instance.OnMultiplayerListSecretSummariesRequestEvent != null) { _instance.OnMultiplayerListSecretSummariesRequestEvent((MultiplayerModels.ListSecretSummariesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListServerBackfillTicketsForPlayerRequest)) { if (_instance.OnMultiplayerListServerBackfillTicketsForPlayerRequestEvent != null) { _instance.OnMultiplayerListServerBackfillTicketsForPlayerRequestEvent((MultiplayerModels.ListServerBackfillTicketsForPlayerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListTitleMultiplayerServersQuotaChangesRequest)) { if (_instance.OnMultiplayerListTitleMultiplayerServersQuotaChangesRequestEvent != null) { _instance.OnMultiplayerListTitleMultiplayerServersQuotaChangesRequestEvent((MultiplayerModels.ListTitleMultiplayerServersQuotaChangesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ListVirtualMachineSummariesRequest)) { if (_instance.OnMultiplayerListVirtualMachineSummariesRequestEvent != null) { _instance.OnMultiplayerListVirtualMachineSummariesRequestEvent((MultiplayerModels.ListVirtualMachineSummariesRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.RemoveMatchmakingQueueRequest)) { if (_instance.OnMultiplayerRemoveMatchmakingQueueRequestEvent != null) { _instance.OnMultiplayerRemoveMatchmakingQueueRequestEvent((MultiplayerModels.RemoveMatchmakingQueueRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.RemoveMemberFromLobbyRequest)) { if (_instance.OnMultiplayerRemoveMemberRequestEvent != null) { _instance.OnMultiplayerRemoveMemberRequestEvent((MultiplayerModels.RemoveMemberFromLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.RequestMultiplayerServerRequest)) { if (_instance.OnMultiplayerRequestMultiplayerServerRequestEvent != null) { _instance.OnMultiplayerRequestMultiplayerServerRequestEvent((MultiplayerModels.RequestMultiplayerServerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.RequestPartyServiceRequest)) { if (_instance.OnMultiplayerRequestPartyServiceRequestEvent != null) { _instance.OnMultiplayerRequestPartyServiceRequestEvent((MultiplayerModels.RequestPartyServiceRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.RolloverContainerRegistryCredentialsRequest)) { if (_instance.OnMultiplayerRolloverContainerRegistryCredentialsRequestEvent != null) { _instance.OnMultiplayerRolloverContainerRegistryCredentialsRequestEvent((MultiplayerModels.RolloverContainerRegistryCredentialsRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.SetMatchmakingQueueRequest)) { if (_instance.OnMultiplayerSetMatchmakingQueueRequestEvent != null) { _instance.OnMultiplayerSetMatchmakingQueueRequestEvent((MultiplayerModels.SetMatchmakingQueueRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.ShutdownMultiplayerServerRequest)) { if (_instance.OnMultiplayerShutdownMultiplayerServerRequestEvent != null) { _instance.OnMultiplayerShutdownMultiplayerServerRequestEvent((MultiplayerModels.ShutdownMultiplayerServerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.SubscribeToLobbyResourceRequest)) { if (_instance.OnMultiplayerSubscribeToLobbyResourceRequestEvent != null) { _instance.OnMultiplayerSubscribeToLobbyResourceRequestEvent((MultiplayerModels.SubscribeToLobbyResourceRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.SubscribeToMatchResourceRequest)) { if (_instance.OnMultiplayerSubscribeToMatchmakingResourceRequestEvent != null) { _instance.OnMultiplayerSubscribeToMatchmakingResourceRequestEvent((MultiplayerModels.SubscribeToMatchResourceRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UnsubscribeFromLobbyResourceRequest)) { if (_instance.OnMultiplayerUnsubscribeFromLobbyResourceRequestEvent != null) { _instance.OnMultiplayerUnsubscribeFromLobbyResourceRequestEvent((MultiplayerModels.UnsubscribeFromLobbyResourceRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UnsubscribeFromMatchResourceRequest)) { if (_instance.OnMultiplayerUnsubscribeFromMatchmakingResourceRequestEvent != null) { _instance.OnMultiplayerUnsubscribeFromMatchmakingResourceRequestEvent((MultiplayerModels.UnsubscribeFromMatchResourceRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UntagContainerImageRequest)) { if (_instance.OnMultiplayerUntagContainerImageRequestEvent != null) { _instance.OnMultiplayerUntagContainerImageRequestEvent((MultiplayerModels.UntagContainerImageRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UpdateBuildAliasRequest)) { if (_instance.OnMultiplayerUpdateBuildAliasRequestEvent != null) { _instance.OnMultiplayerUpdateBuildAliasRequestEvent((MultiplayerModels.UpdateBuildAliasRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UpdateBuildNameRequest)) { if (_instance.OnMultiplayerUpdateBuildNameRequestEvent != null) { _instance.OnMultiplayerUpdateBuildNameRequestEvent((MultiplayerModels.UpdateBuildNameRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UpdateBuildRegionRequest)) { if (_instance.OnMultiplayerUpdateBuildRegionRequestEvent != null) { _instance.OnMultiplayerUpdateBuildRegionRequestEvent((MultiplayerModels.UpdateBuildRegionRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UpdateBuildRegionsRequest)) { if (_instance.OnMultiplayerUpdateBuildRegionsRequestEvent != null) { _instance.OnMultiplayerUpdateBuildRegionsRequestEvent((MultiplayerModels.UpdateBuildRegionsRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UpdateLobbyRequest)) { if (_instance.OnMultiplayerUpdateLobbyRequestEvent != null) { _instance.OnMultiplayerUpdateLobbyRequestEvent((MultiplayerModels.UpdateLobbyRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UpdateLobbyAsServerRequest)) { if (_instance.OnMultiplayerUpdateLobbyAsServerRequestEvent != null) { _instance.OnMultiplayerUpdateLobbyAsServerRequestEvent((MultiplayerModels.UpdateLobbyAsServerRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UploadCertificateRequest)) { if (_instance.OnMultiplayerUploadCertificateRequestEvent != null) { _instance.OnMultiplayerUploadCertificateRequestEvent((MultiplayerModels.UploadCertificateRequest)e.Request); return; } } + if (type == typeof(MultiplayerModels.UploadSecretRequest)) { if (_instance.OnMultiplayerUploadSecretRequestEvent != null) { _instance.OnMultiplayerUploadSecretRequestEvent((MultiplayerModels.UploadSecretRequest)e.Request); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(ProfilesModels.GetGlobalPolicyRequest)) { if (_instance.OnProfilesGetGlobalPolicyRequestEvent != null) { _instance.OnProfilesGetGlobalPolicyRequestEvent((ProfilesModels.GetGlobalPolicyRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.GetEntityProfileRequest)) { if (_instance.OnProfilesGetProfileRequestEvent != null) { _instance.OnProfilesGetProfileRequestEvent((ProfilesModels.GetEntityProfileRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.GetEntityProfilesRequest)) { if (_instance.OnProfilesGetProfilesRequestEvent != null) { _instance.OnProfilesGetProfilesRequestEvent((ProfilesModels.GetEntityProfilesRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.GetTitlePlayersFromMasterPlayerAccountIdsRequest)) { if (_instance.OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsRequestEvent != null) { _instance.OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsRequestEvent((ProfilesModels.GetTitlePlayersFromMasterPlayerAccountIdsRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.GetTitlePlayersFromXboxLiveIDsRequest)) { if (_instance.OnProfilesGetTitlePlayersFromXboxLiveIDsRequestEvent != null) { _instance.OnProfilesGetTitlePlayersFromXboxLiveIDsRequestEvent((ProfilesModels.GetTitlePlayersFromXboxLiveIDsRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.SetDisplayNameRequest)) { if (_instance.OnProfilesSetDisplayNameRequestEvent != null) { _instance.OnProfilesSetDisplayNameRequestEvent((ProfilesModels.SetDisplayNameRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.SetGlobalPolicyRequest)) { if (_instance.OnProfilesSetGlobalPolicyRequestEvent != null) { _instance.OnProfilesSetGlobalPolicyRequestEvent((ProfilesModels.SetGlobalPolicyRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.SetProfileLanguageRequest)) { if (_instance.OnProfilesSetProfileLanguageRequestEvent != null) { _instance.OnProfilesSetProfileLanguageRequestEvent((ProfilesModels.SetProfileLanguageRequest)e.Request); return; } } + if (type == typeof(ProfilesModels.SetEntityProfilePolicyRequest)) { if (_instance.OnProfilesSetProfilePolicyRequestEvent != null) { _instance.OnProfilesSetProfilePolicyRequestEvent((ProfilesModels.SetEntityProfilePolicyRequest)e.Request); return; } } +#endif +#if ENABLE_PLAYFABSERVER_API +#endif +#if !DISABLE_PLAYFABENTITY_API + if (type == typeof(AddonModels.CreateOrUpdateAppleRequest)) { if (_instance.OnAddonCreateOrUpdateAppleRequestEvent != null) { _instance.OnAddonCreateOrUpdateAppleRequestEvent((AddonModels.CreateOrUpdateAppleRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdateFacebookRequest)) { if (_instance.OnAddonCreateOrUpdateFacebookRequestEvent != null) { _instance.OnAddonCreateOrUpdateFacebookRequestEvent((AddonModels.CreateOrUpdateFacebookRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdateFacebookInstantGamesRequest)) { if (_instance.OnAddonCreateOrUpdateFacebookInstantGamesRequestEvent != null) { _instance.OnAddonCreateOrUpdateFacebookInstantGamesRequestEvent((AddonModels.CreateOrUpdateFacebookInstantGamesRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdateGoogleRequest)) { if (_instance.OnAddonCreateOrUpdateGoogleRequestEvent != null) { _instance.OnAddonCreateOrUpdateGoogleRequestEvent((AddonModels.CreateOrUpdateGoogleRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdateKongregateRequest)) { if (_instance.OnAddonCreateOrUpdateKongregateRequestEvent != null) { _instance.OnAddonCreateOrUpdateKongregateRequestEvent((AddonModels.CreateOrUpdateKongregateRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdateNintendoRequest)) { if (_instance.OnAddonCreateOrUpdateNintendoRequestEvent != null) { _instance.OnAddonCreateOrUpdateNintendoRequestEvent((AddonModels.CreateOrUpdateNintendoRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdatePSNRequest)) { if (_instance.OnAddonCreateOrUpdatePSNRequestEvent != null) { _instance.OnAddonCreateOrUpdatePSNRequestEvent((AddonModels.CreateOrUpdatePSNRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdateSteamRequest)) { if (_instance.OnAddonCreateOrUpdateSteamRequestEvent != null) { _instance.OnAddonCreateOrUpdateSteamRequestEvent((AddonModels.CreateOrUpdateSteamRequest)e.Request); return; } } + if (type == typeof(AddonModels.CreateOrUpdateTwitchRequest)) { if (_instance.OnAddonCreateOrUpdateTwitchRequestEvent != null) { _instance.OnAddonCreateOrUpdateTwitchRequestEvent((AddonModels.CreateOrUpdateTwitchRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteAppleRequest)) { if (_instance.OnAddonDeleteAppleRequestEvent != null) { _instance.OnAddonDeleteAppleRequestEvent((AddonModels.DeleteAppleRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteFacebookRequest)) { if (_instance.OnAddonDeleteFacebookRequestEvent != null) { _instance.OnAddonDeleteFacebookRequestEvent((AddonModels.DeleteFacebookRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteFacebookInstantGamesRequest)) { if (_instance.OnAddonDeleteFacebookInstantGamesRequestEvent != null) { _instance.OnAddonDeleteFacebookInstantGamesRequestEvent((AddonModels.DeleteFacebookInstantGamesRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteGoogleRequest)) { if (_instance.OnAddonDeleteGoogleRequestEvent != null) { _instance.OnAddonDeleteGoogleRequestEvent((AddonModels.DeleteGoogleRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteKongregateRequest)) { if (_instance.OnAddonDeleteKongregateRequestEvent != null) { _instance.OnAddonDeleteKongregateRequestEvent((AddonModels.DeleteKongregateRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteNintendoRequest)) { if (_instance.OnAddonDeleteNintendoRequestEvent != null) { _instance.OnAddonDeleteNintendoRequestEvent((AddonModels.DeleteNintendoRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeletePSNRequest)) { if (_instance.OnAddonDeletePSNRequestEvent != null) { _instance.OnAddonDeletePSNRequestEvent((AddonModels.DeletePSNRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteSteamRequest)) { if (_instance.OnAddonDeleteSteamRequestEvent != null) { _instance.OnAddonDeleteSteamRequestEvent((AddonModels.DeleteSteamRequest)e.Request); return; } } + if (type == typeof(AddonModels.DeleteTwitchRequest)) { if (_instance.OnAddonDeleteTwitchRequestEvent != null) { _instance.OnAddonDeleteTwitchRequestEvent((AddonModels.DeleteTwitchRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetAppleRequest)) { if (_instance.OnAddonGetAppleRequestEvent != null) { _instance.OnAddonGetAppleRequestEvent((AddonModels.GetAppleRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetFacebookRequest)) { if (_instance.OnAddonGetFacebookRequestEvent != null) { _instance.OnAddonGetFacebookRequestEvent((AddonModels.GetFacebookRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetFacebookInstantGamesRequest)) { if (_instance.OnAddonGetFacebookInstantGamesRequestEvent != null) { _instance.OnAddonGetFacebookInstantGamesRequestEvent((AddonModels.GetFacebookInstantGamesRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetGoogleRequest)) { if (_instance.OnAddonGetGoogleRequestEvent != null) { _instance.OnAddonGetGoogleRequestEvent((AddonModels.GetGoogleRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetKongregateRequest)) { if (_instance.OnAddonGetKongregateRequestEvent != null) { _instance.OnAddonGetKongregateRequestEvent((AddonModels.GetKongregateRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetNintendoRequest)) { if (_instance.OnAddonGetNintendoRequestEvent != null) { _instance.OnAddonGetNintendoRequestEvent((AddonModels.GetNintendoRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetPSNRequest)) { if (_instance.OnAddonGetPSNRequestEvent != null) { _instance.OnAddonGetPSNRequestEvent((AddonModels.GetPSNRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetSteamRequest)) { if (_instance.OnAddonGetSteamRequestEvent != null) { _instance.OnAddonGetSteamRequestEvent((AddonModels.GetSteamRequest)e.Request); return; } } + if (type == typeof(AddonModels.GetTwitchRequest)) { if (_instance.OnAddonGetTwitchRequestEvent != null) { _instance.OnAddonGetTwitchRequestEvent((AddonModels.GetTwitchRequest)e.Request); return; } } +#endif + + } + else + { + var type = e.Result.GetType(); +#if ENABLE_PLAYFABADMIN_API + + if (type == typeof(AdminModels.EmptyResponse)) { if (_instance.OnAdminAbortTaskInstanceResultEvent != null) { _instance.OnAdminAbortTaskInstanceResultEvent((AdminModels.EmptyResponse)e.Result); return; } } + if (type == typeof(AdminModels.AddLocalizedNewsResult)) { if (_instance.OnAdminAddLocalizedNewsResultEvent != null) { _instance.OnAdminAddLocalizedNewsResultEvent((AdminModels.AddLocalizedNewsResult)e.Result); return; } } + if (type == typeof(AdminModels.AddNewsResult)) { if (_instance.OnAdminAddNewsResultEvent != null) { _instance.OnAdminAddNewsResultEvent((AdminModels.AddNewsResult)e.Result); return; } } + if (type == typeof(AdminModels.AddPlayerTagResult)) { if (_instance.OnAdminAddPlayerTagResultEvent != null) { _instance.OnAdminAddPlayerTagResultEvent((AdminModels.AddPlayerTagResult)e.Result); return; } } + if (type == typeof(AdminModels.ModifyUserVirtualCurrencyResult)) { if (_instance.OnAdminAddUserVirtualCurrencyResultEvent != null) { _instance.OnAdminAddUserVirtualCurrencyResultEvent((AdminModels.ModifyUserVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(AdminModels.BlankResult)) { if (_instance.OnAdminAddVirtualCurrencyTypesResultEvent != null) { _instance.OnAdminAddVirtualCurrencyTypesResultEvent((AdminModels.BlankResult)e.Result); return; } } + if (type == typeof(AdminModels.BanUsersResult)) { if (_instance.OnAdminBanUsersResultEvent != null) { _instance.OnAdminBanUsersResultEvent((AdminModels.BanUsersResult)e.Result); return; } } + if (type == typeof(AdminModels.CheckLimitedEditionItemAvailabilityResult)) { if (_instance.OnAdminCheckLimitedEditionItemAvailabilityResultEvent != null) { _instance.OnAdminCheckLimitedEditionItemAvailabilityResultEvent((AdminModels.CheckLimitedEditionItemAvailabilityResult)e.Result); return; } } + if (type == typeof(AdminModels.CreateTaskResult)) { if (_instance.OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent != null) { _instance.OnAdminCreateActionsOnPlayersInSegmentTaskResultEvent((AdminModels.CreateTaskResult)e.Result); return; } } + if (type == typeof(AdminModels.CreateTaskResult)) { if (_instance.OnAdminCreateCloudScriptTaskResultEvent != null) { _instance.OnAdminCreateCloudScriptTaskResultEvent((AdminModels.CreateTaskResult)e.Result); return; } } + if (type == typeof(AdminModels.CreateTaskResult)) { if (_instance.OnAdminCreateInsightsScheduledScalingTaskResultEvent != null) { _instance.OnAdminCreateInsightsScheduledScalingTaskResultEvent((AdminModels.CreateTaskResult)e.Result); return; } } + if (type == typeof(AdminModels.EmptyResponse)) { if (_instance.OnAdminCreateOpenIdConnectionResultEvent != null) { _instance.OnAdminCreateOpenIdConnectionResultEvent((AdminModels.EmptyResponse)e.Result); return; } } + if (type == typeof(AdminModels.CreatePlayerSharedSecretResult)) { if (_instance.OnAdminCreatePlayerSharedSecretResultEvent != null) { _instance.OnAdminCreatePlayerSharedSecretResultEvent((AdminModels.CreatePlayerSharedSecretResult)e.Result); return; } } + if (type == typeof(AdminModels.CreatePlayerStatisticDefinitionResult)) { if (_instance.OnAdminCreatePlayerStatisticDefinitionResultEvent != null) { _instance.OnAdminCreatePlayerStatisticDefinitionResultEvent((AdminModels.CreatePlayerStatisticDefinitionResult)e.Result); return; } } + if (type == typeof(AdminModels.CreateSegmentResponse)) { if (_instance.OnAdminCreateSegmentResultEvent != null) { _instance.OnAdminCreateSegmentResultEvent((AdminModels.CreateSegmentResponse)e.Result); return; } } + if (type == typeof(AdminModels.BlankResult)) { if (_instance.OnAdminDeleteContentResultEvent != null) { _instance.OnAdminDeleteContentResultEvent((AdminModels.BlankResult)e.Result); return; } } + if (type == typeof(AdminModels.DeleteMasterPlayerAccountResult)) { if (_instance.OnAdminDeleteMasterPlayerAccountResultEvent != null) { _instance.OnAdminDeleteMasterPlayerAccountResultEvent((AdminModels.DeleteMasterPlayerAccountResult)e.Result); return; } } + if (type == typeof(AdminModels.DeleteMasterPlayerEventDataResult)) { if (_instance.OnAdminDeleteMasterPlayerEventDataResultEvent != null) { _instance.OnAdminDeleteMasterPlayerEventDataResultEvent((AdminModels.DeleteMasterPlayerEventDataResult)e.Result); return; } } + if (type == typeof(AdminModels.DeleteMembershipSubscriptionResult)) { if (_instance.OnAdminDeleteMembershipSubscriptionResultEvent != null) { _instance.OnAdminDeleteMembershipSubscriptionResultEvent((AdminModels.DeleteMembershipSubscriptionResult)e.Result); return; } } + if (type == typeof(AdminModels.EmptyResponse)) { if (_instance.OnAdminDeleteOpenIdConnectionResultEvent != null) { _instance.OnAdminDeleteOpenIdConnectionResultEvent((AdminModels.EmptyResponse)e.Result); return; } } + if (type == typeof(AdminModels.DeletePlayerResult)) { if (_instance.OnAdminDeletePlayerResultEvent != null) { _instance.OnAdminDeletePlayerResultEvent((AdminModels.DeletePlayerResult)e.Result); return; } } + if (type == typeof(AdminModels.DeletePlayerSharedSecretResult)) { if (_instance.OnAdminDeletePlayerSharedSecretResultEvent != null) { _instance.OnAdminDeletePlayerSharedSecretResultEvent((AdminModels.DeletePlayerSharedSecretResult)e.Result); return; } } + if (type == typeof(AdminModels.DeleteSegmentsResponse)) { if (_instance.OnAdminDeleteSegmentResultEvent != null) { _instance.OnAdminDeleteSegmentResultEvent((AdminModels.DeleteSegmentsResponse)e.Result); return; } } + if (type == typeof(AdminModels.DeleteStoreResult)) { if (_instance.OnAdminDeleteStoreResultEvent != null) { _instance.OnAdminDeleteStoreResultEvent((AdminModels.DeleteStoreResult)e.Result); return; } } + if (type == typeof(AdminModels.EmptyResponse)) { if (_instance.OnAdminDeleteTaskResultEvent != null) { _instance.OnAdminDeleteTaskResultEvent((AdminModels.EmptyResponse)e.Result); return; } } + if (type == typeof(AdminModels.DeleteTitleResult)) { if (_instance.OnAdminDeleteTitleResultEvent != null) { _instance.OnAdminDeleteTitleResultEvent((AdminModels.DeleteTitleResult)e.Result); return; } } + if (type == typeof(AdminModels.DeleteTitleDataOverrideResult)) { if (_instance.OnAdminDeleteTitleDataOverrideResultEvent != null) { _instance.OnAdminDeleteTitleDataOverrideResultEvent((AdminModels.DeleteTitleDataOverrideResult)e.Result); return; } } + if (type == typeof(AdminModels.ExportMasterPlayerDataResult)) { if (_instance.OnAdminExportMasterPlayerDataResultEvent != null) { _instance.OnAdminExportMasterPlayerDataResultEvent((AdminModels.ExportMasterPlayerDataResult)e.Result); return; } } + if (type == typeof(AdminModels.ExportPlayersInSegmentResult)) { if (_instance.OnAdminExportPlayersInSegmentResultEvent != null) { _instance.OnAdminExportPlayersInSegmentResultEvent((AdminModels.ExportPlayersInSegmentResult)e.Result); return; } } + if (type == typeof(AdminModels.GetActionsOnPlayersInSegmentTaskInstanceResult)) { if (_instance.OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent != null) { _instance.OnAdminGetActionsOnPlayersInSegmentTaskInstanceResultEvent((AdminModels.GetActionsOnPlayersInSegmentTaskInstanceResult)e.Result); return; } } + if (type == typeof(AdminModels.GetAllSegmentsResult)) { if (_instance.OnAdminGetAllSegmentsResultEvent != null) { _instance.OnAdminGetAllSegmentsResultEvent((AdminModels.GetAllSegmentsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetCatalogItemsResult)) { if (_instance.OnAdminGetCatalogItemsResultEvent != null) { _instance.OnAdminGetCatalogItemsResultEvent((AdminModels.GetCatalogItemsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetCloudScriptRevisionResult)) { if (_instance.OnAdminGetCloudScriptRevisionResultEvent != null) { _instance.OnAdminGetCloudScriptRevisionResultEvent((AdminModels.GetCloudScriptRevisionResult)e.Result); return; } } + if (type == typeof(AdminModels.GetCloudScriptTaskInstanceResult)) { if (_instance.OnAdminGetCloudScriptTaskInstanceResultEvent != null) { _instance.OnAdminGetCloudScriptTaskInstanceResultEvent((AdminModels.GetCloudScriptTaskInstanceResult)e.Result); return; } } + if (type == typeof(AdminModels.GetCloudScriptVersionsResult)) { if (_instance.OnAdminGetCloudScriptVersionsResultEvent != null) { _instance.OnAdminGetCloudScriptVersionsResultEvent((AdminModels.GetCloudScriptVersionsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetContentListResult)) { if (_instance.OnAdminGetContentListResultEvent != null) { _instance.OnAdminGetContentListResultEvent((AdminModels.GetContentListResult)e.Result); return; } } + if (type == typeof(AdminModels.GetContentUploadUrlResult)) { if (_instance.OnAdminGetContentUploadUrlResultEvent != null) { _instance.OnAdminGetContentUploadUrlResultEvent((AdminModels.GetContentUploadUrlResult)e.Result); return; } } + if (type == typeof(AdminModels.GetDataReportResult)) { if (_instance.OnAdminGetDataReportResultEvent != null) { _instance.OnAdminGetDataReportResultEvent((AdminModels.GetDataReportResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayedTitleListResult)) { if (_instance.OnAdminGetPlayedTitleListResultEvent != null) { _instance.OnAdminGetPlayedTitleListResultEvent((AdminModels.GetPlayedTitleListResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayerIdFromAuthTokenResult)) { if (_instance.OnAdminGetPlayerIdFromAuthTokenResultEvent != null) { _instance.OnAdminGetPlayerIdFromAuthTokenResultEvent((AdminModels.GetPlayerIdFromAuthTokenResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayerProfileResult)) { if (_instance.OnAdminGetPlayerProfileResultEvent != null) { _instance.OnAdminGetPlayerProfileResultEvent((AdminModels.GetPlayerProfileResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayerSegmentsResult)) { if (_instance.OnAdminGetPlayerSegmentsResultEvent != null) { _instance.OnAdminGetPlayerSegmentsResultEvent((AdminModels.GetPlayerSegmentsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayerSharedSecretsResult)) { if (_instance.OnAdminGetPlayerSharedSecretsResultEvent != null) { _instance.OnAdminGetPlayerSharedSecretsResultEvent((AdminModels.GetPlayerSharedSecretsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayersInSegmentResult)) { if (_instance.OnAdminGetPlayersInSegmentResultEvent != null) { _instance.OnAdminGetPlayersInSegmentResultEvent((AdminModels.GetPlayersInSegmentResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayerStatisticDefinitionsResult)) { if (_instance.OnAdminGetPlayerStatisticDefinitionsResultEvent != null) { _instance.OnAdminGetPlayerStatisticDefinitionsResultEvent((AdminModels.GetPlayerStatisticDefinitionsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayerStatisticVersionsResult)) { if (_instance.OnAdminGetPlayerStatisticVersionsResultEvent != null) { _instance.OnAdminGetPlayerStatisticVersionsResultEvent((AdminModels.GetPlayerStatisticVersionsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayerTagsResult)) { if (_instance.OnAdminGetPlayerTagsResultEvent != null) { _instance.OnAdminGetPlayerTagsResultEvent((AdminModels.GetPlayerTagsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPolicyResponse)) { if (_instance.OnAdminGetPolicyResultEvent != null) { _instance.OnAdminGetPolicyResultEvent((AdminModels.GetPolicyResponse)e.Result); return; } } + if (type == typeof(AdminModels.GetPublisherDataResult)) { if (_instance.OnAdminGetPublisherDataResultEvent != null) { _instance.OnAdminGetPublisherDataResultEvent((AdminModels.GetPublisherDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GetRandomResultTablesResult)) { if (_instance.OnAdminGetRandomResultTablesResultEvent != null) { _instance.OnAdminGetRandomResultTablesResultEvent((AdminModels.GetRandomResultTablesResult)e.Result); return; } } + if (type == typeof(AdminModels.GetPlayersInSegmentExportResponse)) { if (_instance.OnAdminGetSegmentExportResultEvent != null) { _instance.OnAdminGetSegmentExportResultEvent((AdminModels.GetPlayersInSegmentExportResponse)e.Result); return; } } + if (type == typeof(AdminModels.GetSegmentsResponse)) { if (_instance.OnAdminGetSegmentsResultEvent != null) { _instance.OnAdminGetSegmentsResultEvent((AdminModels.GetSegmentsResponse)e.Result); return; } } + if (type == typeof(AdminModels.GetStoreItemsResult)) { if (_instance.OnAdminGetStoreItemsResultEvent != null) { _instance.OnAdminGetStoreItemsResultEvent((AdminModels.GetStoreItemsResult)e.Result); return; } } + if (type == typeof(AdminModels.GetTaskInstancesResult)) { if (_instance.OnAdminGetTaskInstancesResultEvent != null) { _instance.OnAdminGetTaskInstancesResultEvent((AdminModels.GetTaskInstancesResult)e.Result); return; } } + if (type == typeof(AdminModels.GetTasksResult)) { if (_instance.OnAdminGetTasksResultEvent != null) { _instance.OnAdminGetTasksResultEvent((AdminModels.GetTasksResult)e.Result); return; } } + if (type == typeof(AdminModels.GetTitleDataResult)) { if (_instance.OnAdminGetTitleDataResultEvent != null) { _instance.OnAdminGetTitleDataResultEvent((AdminModels.GetTitleDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GetTitleDataResult)) { if (_instance.OnAdminGetTitleInternalDataResultEvent != null) { _instance.OnAdminGetTitleInternalDataResultEvent((AdminModels.GetTitleDataResult)e.Result); return; } } + if (type == typeof(AdminModels.LookupUserAccountInfoResult)) { if (_instance.OnAdminGetUserAccountInfoResultEvent != null) { _instance.OnAdminGetUserAccountInfoResultEvent((AdminModels.LookupUserAccountInfoResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserBansResult)) { if (_instance.OnAdminGetUserBansResultEvent != null) { _instance.OnAdminGetUserBansResultEvent((AdminModels.GetUserBansResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserDataResult)) { if (_instance.OnAdminGetUserDataResultEvent != null) { _instance.OnAdminGetUserDataResultEvent((AdminModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserDataResult)) { if (_instance.OnAdminGetUserInternalDataResultEvent != null) { _instance.OnAdminGetUserInternalDataResultEvent((AdminModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserInventoryResult)) { if (_instance.OnAdminGetUserInventoryResultEvent != null) { _instance.OnAdminGetUserInventoryResultEvent((AdminModels.GetUserInventoryResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserDataResult)) { if (_instance.OnAdminGetUserPublisherDataResultEvent != null) { _instance.OnAdminGetUserPublisherDataResultEvent((AdminModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserDataResult)) { if (_instance.OnAdminGetUserPublisherInternalDataResultEvent != null) { _instance.OnAdminGetUserPublisherInternalDataResultEvent((AdminModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserDataResult)) { if (_instance.OnAdminGetUserPublisherReadOnlyDataResultEvent != null) { _instance.OnAdminGetUserPublisherReadOnlyDataResultEvent((AdminModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GetUserDataResult)) { if (_instance.OnAdminGetUserReadOnlyDataResultEvent != null) { _instance.OnAdminGetUserReadOnlyDataResultEvent((AdminModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.GrantItemsToUsersResult)) { if (_instance.OnAdminGrantItemsToUsersResultEvent != null) { _instance.OnAdminGrantItemsToUsersResultEvent((AdminModels.GrantItemsToUsersResult)e.Result); return; } } + if (type == typeof(AdminModels.IncrementLimitedEditionItemAvailabilityResult)) { if (_instance.OnAdminIncrementLimitedEditionItemAvailabilityResultEvent != null) { _instance.OnAdminIncrementLimitedEditionItemAvailabilityResultEvent((AdminModels.IncrementLimitedEditionItemAvailabilityResult)e.Result); return; } } + if (type == typeof(AdminModels.IncrementPlayerStatisticVersionResult)) { if (_instance.OnAdminIncrementPlayerStatisticVersionResultEvent != null) { _instance.OnAdminIncrementPlayerStatisticVersionResultEvent((AdminModels.IncrementPlayerStatisticVersionResult)e.Result); return; } } + if (type == typeof(AdminModels.ListOpenIdConnectionResponse)) { if (_instance.OnAdminListOpenIdConnectionResultEvent != null) { _instance.OnAdminListOpenIdConnectionResultEvent((AdminModels.ListOpenIdConnectionResponse)e.Result); return; } } + if (type == typeof(AdminModels.ListVirtualCurrencyTypesResult)) { if (_instance.OnAdminListVirtualCurrencyTypesResultEvent != null) { _instance.OnAdminListVirtualCurrencyTypesResultEvent((AdminModels.ListVirtualCurrencyTypesResult)e.Result); return; } } + if (type == typeof(AdminModels.RefundPurchaseResponse)) { if (_instance.OnAdminRefundPurchaseResultEvent != null) { _instance.OnAdminRefundPurchaseResultEvent((AdminModels.RefundPurchaseResponse)e.Result); return; } } + if (type == typeof(AdminModels.RemovePlayerTagResult)) { if (_instance.OnAdminRemovePlayerTagResultEvent != null) { _instance.OnAdminRemovePlayerTagResultEvent((AdminModels.RemovePlayerTagResult)e.Result); return; } } + if (type == typeof(AdminModels.BlankResult)) { if (_instance.OnAdminRemoveVirtualCurrencyTypesResultEvent != null) { _instance.OnAdminRemoveVirtualCurrencyTypesResultEvent((AdminModels.BlankResult)e.Result); return; } } + if (type == typeof(AdminModels.ResetCharacterStatisticsResult)) { if (_instance.OnAdminResetCharacterStatisticsResultEvent != null) { _instance.OnAdminResetCharacterStatisticsResultEvent((AdminModels.ResetCharacterStatisticsResult)e.Result); return; } } + if (type == typeof(AdminModels.ResetPasswordResult)) { if (_instance.OnAdminResetPasswordResultEvent != null) { _instance.OnAdminResetPasswordResultEvent((AdminModels.ResetPasswordResult)e.Result); return; } } + if (type == typeof(AdminModels.ResetUserStatisticsResult)) { if (_instance.OnAdminResetUserStatisticsResultEvent != null) { _instance.OnAdminResetUserStatisticsResultEvent((AdminModels.ResetUserStatisticsResult)e.Result); return; } } + if (type == typeof(AdminModels.ResolvePurchaseDisputeResponse)) { if (_instance.OnAdminResolvePurchaseDisputeResultEvent != null) { _instance.OnAdminResolvePurchaseDisputeResultEvent((AdminModels.ResolvePurchaseDisputeResponse)e.Result); return; } } + if (type == typeof(AdminModels.RevokeAllBansForUserResult)) { if (_instance.OnAdminRevokeAllBansForUserResultEvent != null) { _instance.OnAdminRevokeAllBansForUserResultEvent((AdminModels.RevokeAllBansForUserResult)e.Result); return; } } + if (type == typeof(AdminModels.RevokeBansResult)) { if (_instance.OnAdminRevokeBansResultEvent != null) { _instance.OnAdminRevokeBansResultEvent((AdminModels.RevokeBansResult)e.Result); return; } } + if (type == typeof(AdminModels.RevokeInventoryResult)) { if (_instance.OnAdminRevokeInventoryItemResultEvent != null) { _instance.OnAdminRevokeInventoryItemResultEvent((AdminModels.RevokeInventoryResult)e.Result); return; } } + if (type == typeof(AdminModels.RevokeInventoryItemsResult)) { if (_instance.OnAdminRevokeInventoryItemsResultEvent != null) { _instance.OnAdminRevokeInventoryItemsResultEvent((AdminModels.RevokeInventoryItemsResult)e.Result); return; } } + if (type == typeof(AdminModels.RunTaskResult)) { if (_instance.OnAdminRunTaskResultEvent != null) { _instance.OnAdminRunTaskResultEvent((AdminModels.RunTaskResult)e.Result); return; } } + if (type == typeof(AdminModels.SendAccountRecoveryEmailResult)) { if (_instance.OnAdminSendAccountRecoveryEmailResultEvent != null) { _instance.OnAdminSendAccountRecoveryEmailResultEvent((AdminModels.SendAccountRecoveryEmailResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateCatalogItemsResult)) { if (_instance.OnAdminSetCatalogItemsResultEvent != null) { _instance.OnAdminSetCatalogItemsResultEvent((AdminModels.UpdateCatalogItemsResult)e.Result); return; } } + if (type == typeof(AdminModels.SetMembershipOverrideResult)) { if (_instance.OnAdminSetMembershipOverrideResultEvent != null) { _instance.OnAdminSetMembershipOverrideResultEvent((AdminModels.SetMembershipOverrideResult)e.Result); return; } } + if (type == typeof(AdminModels.SetPlayerSecretResult)) { if (_instance.OnAdminSetPlayerSecretResultEvent != null) { _instance.OnAdminSetPlayerSecretResultEvent((AdminModels.SetPlayerSecretResult)e.Result); return; } } + if (type == typeof(AdminModels.SetPublishedRevisionResult)) { if (_instance.OnAdminSetPublishedRevisionResultEvent != null) { _instance.OnAdminSetPublishedRevisionResultEvent((AdminModels.SetPublishedRevisionResult)e.Result); return; } } + if (type == typeof(AdminModels.SetPublisherDataResult)) { if (_instance.OnAdminSetPublisherDataResultEvent != null) { _instance.OnAdminSetPublisherDataResultEvent((AdminModels.SetPublisherDataResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateStoreItemsResult)) { if (_instance.OnAdminSetStoreItemsResultEvent != null) { _instance.OnAdminSetStoreItemsResultEvent((AdminModels.UpdateStoreItemsResult)e.Result); return; } } + if (type == typeof(AdminModels.SetTitleDataResult)) { if (_instance.OnAdminSetTitleDataResultEvent != null) { _instance.OnAdminSetTitleDataResultEvent((AdminModels.SetTitleDataResult)e.Result); return; } } + if (type == typeof(AdminModels.SetTitleDataAndOverridesResult)) { if (_instance.OnAdminSetTitleDataAndOverridesResultEvent != null) { _instance.OnAdminSetTitleDataAndOverridesResultEvent((AdminModels.SetTitleDataAndOverridesResult)e.Result); return; } } + if (type == typeof(AdminModels.SetTitleDataResult)) { if (_instance.OnAdminSetTitleInternalDataResultEvent != null) { _instance.OnAdminSetTitleInternalDataResultEvent((AdminModels.SetTitleDataResult)e.Result); return; } } + if (type == typeof(AdminModels.SetupPushNotificationResult)) { if (_instance.OnAdminSetupPushNotificationResultEvent != null) { _instance.OnAdminSetupPushNotificationResultEvent((AdminModels.SetupPushNotificationResult)e.Result); return; } } + if (type == typeof(AdminModels.ModifyUserVirtualCurrencyResult)) { if (_instance.OnAdminSubtractUserVirtualCurrencyResultEvent != null) { _instance.OnAdminSubtractUserVirtualCurrencyResultEvent((AdminModels.ModifyUserVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateBansResult)) { if (_instance.OnAdminUpdateBansResultEvent != null) { _instance.OnAdminUpdateBansResultEvent((AdminModels.UpdateBansResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateCatalogItemsResult)) { if (_instance.OnAdminUpdateCatalogItemsResultEvent != null) { _instance.OnAdminUpdateCatalogItemsResultEvent((AdminModels.UpdateCatalogItemsResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateCloudScriptResult)) { if (_instance.OnAdminUpdateCloudScriptResultEvent != null) { _instance.OnAdminUpdateCloudScriptResultEvent((AdminModels.UpdateCloudScriptResult)e.Result); return; } } + if (type == typeof(AdminModels.EmptyResponse)) { if (_instance.OnAdminUpdateOpenIdConnectionResultEvent != null) { _instance.OnAdminUpdateOpenIdConnectionResultEvent((AdminModels.EmptyResponse)e.Result); return; } } + if (type == typeof(AdminModels.UpdatePlayerSharedSecretResult)) { if (_instance.OnAdminUpdatePlayerSharedSecretResultEvent != null) { _instance.OnAdminUpdatePlayerSharedSecretResultEvent((AdminModels.UpdatePlayerSharedSecretResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdatePlayerStatisticDefinitionResult)) { if (_instance.OnAdminUpdatePlayerStatisticDefinitionResultEvent != null) { _instance.OnAdminUpdatePlayerStatisticDefinitionResultEvent((AdminModels.UpdatePlayerStatisticDefinitionResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdatePolicyResponse)) { if (_instance.OnAdminUpdatePolicyResultEvent != null) { _instance.OnAdminUpdatePolicyResultEvent((AdminModels.UpdatePolicyResponse)e.Result); return; } } + if (type == typeof(AdminModels.UpdateRandomResultTablesResult)) { if (_instance.OnAdminUpdateRandomResultTablesResultEvent != null) { _instance.OnAdminUpdateRandomResultTablesResultEvent((AdminModels.UpdateRandomResultTablesResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateSegmentResponse)) { if (_instance.OnAdminUpdateSegmentResultEvent != null) { _instance.OnAdminUpdateSegmentResultEvent((AdminModels.UpdateSegmentResponse)e.Result); return; } } + if (type == typeof(AdminModels.UpdateStoreItemsResult)) { if (_instance.OnAdminUpdateStoreItemsResultEvent != null) { _instance.OnAdminUpdateStoreItemsResultEvent((AdminModels.UpdateStoreItemsResult)e.Result); return; } } + if (type == typeof(AdminModels.EmptyResponse)) { if (_instance.OnAdminUpdateTaskResultEvent != null) { _instance.OnAdminUpdateTaskResultEvent((AdminModels.EmptyResponse)e.Result); return; } } + if (type == typeof(AdminModels.UpdateUserDataResult)) { if (_instance.OnAdminUpdateUserDataResultEvent != null) { _instance.OnAdminUpdateUserDataResultEvent((AdminModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateUserDataResult)) { if (_instance.OnAdminUpdateUserInternalDataResultEvent != null) { _instance.OnAdminUpdateUserInternalDataResultEvent((AdminModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateUserDataResult)) { if (_instance.OnAdminUpdateUserPublisherDataResultEvent != null) { _instance.OnAdminUpdateUserPublisherDataResultEvent((AdminModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateUserDataResult)) { if (_instance.OnAdminUpdateUserPublisherInternalDataResultEvent != null) { _instance.OnAdminUpdateUserPublisherInternalDataResultEvent((AdminModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateUserDataResult)) { if (_instance.OnAdminUpdateUserPublisherReadOnlyDataResultEvent != null) { _instance.OnAdminUpdateUserPublisherReadOnlyDataResultEvent((AdminModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateUserDataResult)) { if (_instance.OnAdminUpdateUserReadOnlyDataResultEvent != null) { _instance.OnAdminUpdateUserReadOnlyDataResultEvent((AdminModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(AdminModels.UpdateUserTitleDisplayNameResult)) { if (_instance.OnAdminUpdateUserTitleDisplayNameResultEvent != null) { _instance.OnAdminUpdateUserTitleDisplayNameResultEvent((AdminModels.UpdateUserTitleDisplayNameResult)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABCLIENT_API + if (type == typeof(ClientModels.LoginResult)) { if (_instance.OnLoginResultEvent != null) { _instance.OnLoginResultEvent((ClientModels.LoginResult)e.Result); return; } } + + if (type == typeof(ClientModels.AcceptTradeResponse)) { if (_instance.OnAcceptTradeResultEvent != null) { _instance.OnAcceptTradeResultEvent((ClientModels.AcceptTradeResponse)e.Result); return; } } + if (type == typeof(ClientModels.AddFriendResult)) { if (_instance.OnAddFriendResultEvent != null) { _instance.OnAddFriendResultEvent((ClientModels.AddFriendResult)e.Result); return; } } + if (type == typeof(ClientModels.AddGenericIDResult)) { if (_instance.OnAddGenericIDResultEvent != null) { _instance.OnAddGenericIDResultEvent((ClientModels.AddGenericIDResult)e.Result); return; } } + if (type == typeof(ClientModels.AddOrUpdateContactEmailResult)) { if (_instance.OnAddOrUpdateContactEmailResultEvent != null) { _instance.OnAddOrUpdateContactEmailResultEvent((ClientModels.AddOrUpdateContactEmailResult)e.Result); return; } } + if (type == typeof(ClientModels.AddSharedGroupMembersResult)) { if (_instance.OnAddSharedGroupMembersResultEvent != null) { _instance.OnAddSharedGroupMembersResultEvent((ClientModels.AddSharedGroupMembersResult)e.Result); return; } } + if (type == typeof(ClientModels.AddUsernamePasswordResult)) { if (_instance.OnAddUsernamePasswordResultEvent != null) { _instance.OnAddUsernamePasswordResultEvent((ClientModels.AddUsernamePasswordResult)e.Result); return; } } + if (type == typeof(ClientModels.ModifyUserVirtualCurrencyResult)) { if (_instance.OnAddUserVirtualCurrencyResultEvent != null) { _instance.OnAddUserVirtualCurrencyResultEvent((ClientModels.ModifyUserVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(ClientModels.AndroidDevicePushNotificationRegistrationResult)) { if (_instance.OnAndroidDevicePushNotificationRegistrationResultEvent != null) { _instance.OnAndroidDevicePushNotificationRegistrationResultEvent((ClientModels.AndroidDevicePushNotificationRegistrationResult)e.Result); return; } } + if (type == typeof(ClientModels.AttributeInstallResult)) { if (_instance.OnAttributeInstallResultEvent != null) { _instance.OnAttributeInstallResultEvent((ClientModels.AttributeInstallResult)e.Result); return; } } + if (type == typeof(ClientModels.CancelTradeResponse)) { if (_instance.OnCancelTradeResultEvent != null) { _instance.OnCancelTradeResultEvent((ClientModels.CancelTradeResponse)e.Result); return; } } + if (type == typeof(ClientModels.ConfirmPurchaseResult)) { if (_instance.OnConfirmPurchaseResultEvent != null) { _instance.OnConfirmPurchaseResultEvent((ClientModels.ConfirmPurchaseResult)e.Result); return; } } + if (type == typeof(ClientModels.ConsumeItemResult)) { if (_instance.OnConsumeItemResultEvent != null) { _instance.OnConsumeItemResultEvent((ClientModels.ConsumeItemResult)e.Result); return; } } + if (type == typeof(ClientModels.ConsumeMicrosoftStoreEntitlementsResponse)) { if (_instance.OnConsumeMicrosoftStoreEntitlementsResultEvent != null) { _instance.OnConsumeMicrosoftStoreEntitlementsResultEvent((ClientModels.ConsumeMicrosoftStoreEntitlementsResponse)e.Result); return; } } + if (type == typeof(ClientModels.ConsumePS5EntitlementsResult)) { if (_instance.OnConsumePS5EntitlementsResultEvent != null) { _instance.OnConsumePS5EntitlementsResultEvent((ClientModels.ConsumePS5EntitlementsResult)e.Result); return; } } + if (type == typeof(ClientModels.ConsumePSNEntitlementsResult)) { if (_instance.OnConsumePSNEntitlementsResultEvent != null) { _instance.OnConsumePSNEntitlementsResultEvent((ClientModels.ConsumePSNEntitlementsResult)e.Result); return; } } + if (type == typeof(ClientModels.ConsumeXboxEntitlementsResult)) { if (_instance.OnConsumeXboxEntitlementsResultEvent != null) { _instance.OnConsumeXboxEntitlementsResultEvent((ClientModels.ConsumeXboxEntitlementsResult)e.Result); return; } } + if (type == typeof(ClientModels.CreateSharedGroupResult)) { if (_instance.OnCreateSharedGroupResultEvent != null) { _instance.OnCreateSharedGroupResultEvent((ClientModels.CreateSharedGroupResult)e.Result); return; } } + if (type == typeof(ClientModels.ExecuteCloudScriptResult)) { if (_instance.OnExecuteCloudScriptResultEvent != null) { _instance.OnExecuteCloudScriptResultEvent((ClientModels.ExecuteCloudScriptResult)e.Result); return; } } + if (type == typeof(ClientModels.GetAccountInfoResult)) { if (_instance.OnGetAccountInfoResultEvent != null) { _instance.OnGetAccountInfoResultEvent((ClientModels.GetAccountInfoResult)e.Result); return; } } + if (type == typeof(ClientModels.GetAdPlacementsResult)) { if (_instance.OnGetAdPlacementsResultEvent != null) { _instance.OnGetAdPlacementsResultEvent((ClientModels.GetAdPlacementsResult)e.Result); return; } } + if (type == typeof(ClientModels.ListUsersCharactersResult)) { if (_instance.OnGetAllUsersCharactersResultEvent != null) { _instance.OnGetAllUsersCharactersResultEvent((ClientModels.ListUsersCharactersResult)e.Result); return; } } + if (type == typeof(ClientModels.GetCatalogItemsResult)) { if (_instance.OnGetCatalogItemsResultEvent != null) { _instance.OnGetCatalogItemsResultEvent((ClientModels.GetCatalogItemsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetCharacterDataResult)) { if (_instance.OnGetCharacterDataResultEvent != null) { _instance.OnGetCharacterDataResultEvent((ClientModels.GetCharacterDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetCharacterInventoryResult)) { if (_instance.OnGetCharacterInventoryResultEvent != null) { _instance.OnGetCharacterInventoryResultEvent((ClientModels.GetCharacterInventoryResult)e.Result); return; } } + if (type == typeof(ClientModels.GetCharacterLeaderboardResult)) { if (_instance.OnGetCharacterLeaderboardResultEvent != null) { _instance.OnGetCharacterLeaderboardResultEvent((ClientModels.GetCharacterLeaderboardResult)e.Result); return; } } + if (type == typeof(ClientModels.GetCharacterDataResult)) { if (_instance.OnGetCharacterReadOnlyDataResultEvent != null) { _instance.OnGetCharacterReadOnlyDataResultEvent((ClientModels.GetCharacterDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetCharacterStatisticsResult)) { if (_instance.OnGetCharacterStatisticsResultEvent != null) { _instance.OnGetCharacterStatisticsResultEvent((ClientModels.GetCharacterStatisticsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetContentDownloadUrlResult)) { if (_instance.OnGetContentDownloadUrlResultEvent != null) { _instance.OnGetContentDownloadUrlResultEvent((ClientModels.GetContentDownloadUrlResult)e.Result); return; } } + if (type == typeof(ClientModels.GetLeaderboardResult)) { if (_instance.OnGetFriendLeaderboardResultEvent != null) { _instance.OnGetFriendLeaderboardResultEvent((ClientModels.GetLeaderboardResult)e.Result); return; } } + if (type == typeof(ClientModels.GetFriendLeaderboardAroundPlayerResult)) { if (_instance.OnGetFriendLeaderboardAroundPlayerResultEvent != null) { _instance.OnGetFriendLeaderboardAroundPlayerResultEvent((ClientModels.GetFriendLeaderboardAroundPlayerResult)e.Result); return; } } + if (type == typeof(ClientModels.GetFriendsListResult)) { if (_instance.OnGetFriendsListResultEvent != null) { _instance.OnGetFriendsListResultEvent((ClientModels.GetFriendsListResult)e.Result); return; } } + if (type == typeof(ClientModels.GetLeaderboardResult)) { if (_instance.OnGetLeaderboardResultEvent != null) { _instance.OnGetLeaderboardResultEvent((ClientModels.GetLeaderboardResult)e.Result); return; } } + if (type == typeof(ClientModels.GetLeaderboardAroundCharacterResult)) { if (_instance.OnGetLeaderboardAroundCharacterResultEvent != null) { _instance.OnGetLeaderboardAroundCharacterResultEvent((ClientModels.GetLeaderboardAroundCharacterResult)e.Result); return; } } + if (type == typeof(ClientModels.GetLeaderboardAroundPlayerResult)) { if (_instance.OnGetLeaderboardAroundPlayerResultEvent != null) { _instance.OnGetLeaderboardAroundPlayerResultEvent((ClientModels.GetLeaderboardAroundPlayerResult)e.Result); return; } } + if (type == typeof(ClientModels.GetLeaderboardForUsersCharactersResult)) { if (_instance.OnGetLeaderboardForUserCharactersResultEvent != null) { _instance.OnGetLeaderboardForUserCharactersResultEvent((ClientModels.GetLeaderboardForUsersCharactersResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPaymentTokenResult)) { if (_instance.OnGetPaymentTokenResultEvent != null) { _instance.OnGetPaymentTokenResultEvent((ClientModels.GetPaymentTokenResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPhotonAuthenticationTokenResult)) { if (_instance.OnGetPhotonAuthenticationTokenResultEvent != null) { _instance.OnGetPhotonAuthenticationTokenResultEvent((ClientModels.GetPhotonAuthenticationTokenResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayerCombinedInfoResult)) { if (_instance.OnGetPlayerCombinedInfoResultEvent != null) { _instance.OnGetPlayerCombinedInfoResultEvent((ClientModels.GetPlayerCombinedInfoResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayerProfileResult)) { if (_instance.OnGetPlayerProfileResultEvent != null) { _instance.OnGetPlayerProfileResultEvent((ClientModels.GetPlayerProfileResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayerSegmentsResult)) { if (_instance.OnGetPlayerSegmentsResultEvent != null) { _instance.OnGetPlayerSegmentsResultEvent((ClientModels.GetPlayerSegmentsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayerStatisticsResult)) { if (_instance.OnGetPlayerStatisticsResultEvent != null) { _instance.OnGetPlayerStatisticsResultEvent((ClientModels.GetPlayerStatisticsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayerStatisticVersionsResult)) { if (_instance.OnGetPlayerStatisticVersionsResultEvent != null) { _instance.OnGetPlayerStatisticVersionsResultEvent((ClientModels.GetPlayerStatisticVersionsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayerTagsResult)) { if (_instance.OnGetPlayerTagsResultEvent != null) { _instance.OnGetPlayerTagsResultEvent((ClientModels.GetPlayerTagsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayerTradesResponse)) { if (_instance.OnGetPlayerTradesResultEvent != null) { _instance.OnGetPlayerTradesResultEvent((ClientModels.GetPlayerTradesResponse)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromFacebookIDsResult)) { if (_instance.OnGetPlayFabIDsFromFacebookIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromFacebookIDsResultEvent((ClientModels.GetPlayFabIDsFromFacebookIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromFacebookInstantGamesIdsResult)) { if (_instance.OnGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent != null) { _instance.OnGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent((ClientModels.GetPlayFabIDsFromFacebookInstantGamesIdsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGameCenterIDsResult)) { if (_instance.OnGetPlayFabIDsFromGameCenterIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromGameCenterIDsResultEvent((ClientModels.GetPlayFabIDsFromGameCenterIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGenericIDsResult)) { if (_instance.OnGetPlayFabIDsFromGenericIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromGenericIDsResultEvent((ClientModels.GetPlayFabIDsFromGenericIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGoogleIDsResult)) { if (_instance.OnGetPlayFabIDsFromGoogleIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromGoogleIDsResultEvent((ClientModels.GetPlayFabIDsFromGoogleIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult)) { if (_instance.OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromGooglePlayGamesPlayerIDsResultEvent((ClientModels.GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromKongregateIDsResult)) { if (_instance.OnGetPlayFabIDsFromKongregateIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromKongregateIDsResultEvent((ClientModels.GetPlayFabIDsFromKongregateIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromNintendoServiceAccountIdsResult)) { if (_instance.OnGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent != null) { _instance.OnGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent((ClientModels.GetPlayFabIDsFromNintendoServiceAccountIdsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsResult)) { if (_instance.OnGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent != null) { _instance.OnGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent((ClientModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromPSNAccountIDsResult)) { if (_instance.OnGetPlayFabIDsFromPSNAccountIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromPSNAccountIDsResultEvent((ClientModels.GetPlayFabIDsFromPSNAccountIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromPSNOnlineIDsResult)) { if (_instance.OnGetPlayFabIDsFromPSNOnlineIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromPSNOnlineIDsResultEvent((ClientModels.GetPlayFabIDsFromPSNOnlineIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromSteamIDsResult)) { if (_instance.OnGetPlayFabIDsFromSteamIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromSteamIDsResultEvent((ClientModels.GetPlayFabIDsFromSteamIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromTwitchIDsResult)) { if (_instance.OnGetPlayFabIDsFromTwitchIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromTwitchIDsResultEvent((ClientModels.GetPlayFabIDsFromTwitchIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPlayFabIDsFromXboxLiveIDsResult)) { if (_instance.OnGetPlayFabIDsFromXboxLiveIDsResultEvent != null) { _instance.OnGetPlayFabIDsFromXboxLiveIDsResultEvent((ClientModels.GetPlayFabIDsFromXboxLiveIDsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPublisherDataResult)) { if (_instance.OnGetPublisherDataResultEvent != null) { _instance.OnGetPublisherDataResultEvent((ClientModels.GetPublisherDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetPurchaseResult)) { if (_instance.OnGetPurchaseResultEvent != null) { _instance.OnGetPurchaseResultEvent((ClientModels.GetPurchaseResult)e.Result); return; } } + if (type == typeof(ClientModels.GetSharedGroupDataResult)) { if (_instance.OnGetSharedGroupDataResultEvent != null) { _instance.OnGetSharedGroupDataResultEvent((ClientModels.GetSharedGroupDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetStoreItemsResult)) { if (_instance.OnGetStoreItemsResultEvent != null) { _instance.OnGetStoreItemsResultEvent((ClientModels.GetStoreItemsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetTimeResult)) { if (_instance.OnGetTimeResultEvent != null) { _instance.OnGetTimeResultEvent((ClientModels.GetTimeResult)e.Result); return; } } + if (type == typeof(ClientModels.GetTitleDataResult)) { if (_instance.OnGetTitleDataResultEvent != null) { _instance.OnGetTitleDataResultEvent((ClientModels.GetTitleDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetTitleNewsResult)) { if (_instance.OnGetTitleNewsResultEvent != null) { _instance.OnGetTitleNewsResultEvent((ClientModels.GetTitleNewsResult)e.Result); return; } } + if (type == typeof(ClientModels.GetTitlePublicKeyResult)) { if (_instance.OnGetTitlePublicKeyResultEvent != null) { _instance.OnGetTitlePublicKeyResultEvent((ClientModels.GetTitlePublicKeyResult)e.Result); return; } } + if (type == typeof(ClientModels.GetTradeStatusResponse)) { if (_instance.OnGetTradeStatusResultEvent != null) { _instance.OnGetTradeStatusResultEvent((ClientModels.GetTradeStatusResponse)e.Result); return; } } + if (type == typeof(ClientModels.GetUserDataResult)) { if (_instance.OnGetUserDataResultEvent != null) { _instance.OnGetUserDataResultEvent((ClientModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetUserInventoryResult)) { if (_instance.OnGetUserInventoryResultEvent != null) { _instance.OnGetUserInventoryResultEvent((ClientModels.GetUserInventoryResult)e.Result); return; } } + if (type == typeof(ClientModels.GetUserDataResult)) { if (_instance.OnGetUserPublisherDataResultEvent != null) { _instance.OnGetUserPublisherDataResultEvent((ClientModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetUserDataResult)) { if (_instance.OnGetUserPublisherReadOnlyDataResultEvent != null) { _instance.OnGetUserPublisherReadOnlyDataResultEvent((ClientModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GetUserDataResult)) { if (_instance.OnGetUserReadOnlyDataResultEvent != null) { _instance.OnGetUserReadOnlyDataResultEvent((ClientModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ClientModels.GrantCharacterToUserResult)) { if (_instance.OnGrantCharacterToUserResultEvent != null) { _instance.OnGrantCharacterToUserResultEvent((ClientModels.GrantCharacterToUserResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkAndroidDeviceIDResult)) { if (_instance.OnLinkAndroidDeviceIDResultEvent != null) { _instance.OnLinkAndroidDeviceIDResultEvent((ClientModels.LinkAndroidDeviceIDResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResult)) { if (_instance.OnLinkAppleResultEvent != null) { _instance.OnLinkAppleResultEvent((ClientModels.EmptyResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkCustomIDResult)) { if (_instance.OnLinkCustomIDResultEvent != null) { _instance.OnLinkCustomIDResultEvent((ClientModels.LinkCustomIDResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkFacebookAccountResult)) { if (_instance.OnLinkFacebookAccountResultEvent != null) { _instance.OnLinkFacebookAccountResultEvent((ClientModels.LinkFacebookAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkFacebookInstantGamesIdResult)) { if (_instance.OnLinkFacebookInstantGamesIdResultEvent != null) { _instance.OnLinkFacebookInstantGamesIdResultEvent((ClientModels.LinkFacebookInstantGamesIdResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkGameCenterAccountResult)) { if (_instance.OnLinkGameCenterAccountResultEvent != null) { _instance.OnLinkGameCenterAccountResultEvent((ClientModels.LinkGameCenterAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkGoogleAccountResult)) { if (_instance.OnLinkGoogleAccountResultEvent != null) { _instance.OnLinkGoogleAccountResultEvent((ClientModels.LinkGoogleAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkGooglePlayGamesServicesAccountResult)) { if (_instance.OnLinkGooglePlayGamesServicesAccountResultEvent != null) { _instance.OnLinkGooglePlayGamesServicesAccountResultEvent((ClientModels.LinkGooglePlayGamesServicesAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkIOSDeviceIDResult)) { if (_instance.OnLinkIOSDeviceIDResultEvent != null) { _instance.OnLinkIOSDeviceIDResultEvent((ClientModels.LinkIOSDeviceIDResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkKongregateAccountResult)) { if (_instance.OnLinkKongregateResultEvent != null) { _instance.OnLinkKongregateResultEvent((ClientModels.LinkKongregateAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResult)) { if (_instance.OnLinkNintendoServiceAccountResultEvent != null) { _instance.OnLinkNintendoServiceAccountResultEvent((ClientModels.EmptyResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkNintendoSwitchDeviceIdResult)) { if (_instance.OnLinkNintendoSwitchDeviceIdResultEvent != null) { _instance.OnLinkNintendoSwitchDeviceIdResultEvent((ClientModels.LinkNintendoSwitchDeviceIdResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResult)) { if (_instance.OnLinkOpenIdConnectResultEvent != null) { _instance.OnLinkOpenIdConnectResultEvent((ClientModels.EmptyResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkPSNAccountResult)) { if (_instance.OnLinkPSNAccountResultEvent != null) { _instance.OnLinkPSNAccountResultEvent((ClientModels.LinkPSNAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkSteamAccountResult)) { if (_instance.OnLinkSteamAccountResultEvent != null) { _instance.OnLinkSteamAccountResultEvent((ClientModels.LinkSteamAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkTwitchAccountResult)) { if (_instance.OnLinkTwitchResultEvent != null) { _instance.OnLinkTwitchResultEvent((ClientModels.LinkTwitchAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.LinkXboxAccountResult)) { if (_instance.OnLinkXboxAccountResultEvent != null) { _instance.OnLinkXboxAccountResultEvent((ClientModels.LinkXboxAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.OpenTradeResponse)) { if (_instance.OnOpenTradeResultEvent != null) { _instance.OnOpenTradeResultEvent((ClientModels.OpenTradeResponse)e.Result); return; } } + if (type == typeof(ClientModels.PayForPurchaseResult)) { if (_instance.OnPayForPurchaseResultEvent != null) { _instance.OnPayForPurchaseResultEvent((ClientModels.PayForPurchaseResult)e.Result); return; } } + if (type == typeof(ClientModels.PurchaseItemResult)) { if (_instance.OnPurchaseItemResultEvent != null) { _instance.OnPurchaseItemResultEvent((ClientModels.PurchaseItemResult)e.Result); return; } } + if (type == typeof(ClientModels.RedeemCouponResult)) { if (_instance.OnRedeemCouponResultEvent != null) { _instance.OnRedeemCouponResultEvent((ClientModels.RedeemCouponResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResponse)) { if (_instance.OnRefreshPSNAuthTokenResultEvent != null) { _instance.OnRefreshPSNAuthTokenResultEvent((ClientModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ClientModels.RegisterForIOSPushNotificationResult)) { if (_instance.OnRegisterForIOSPushNotificationResultEvent != null) { _instance.OnRegisterForIOSPushNotificationResultEvent((ClientModels.RegisterForIOSPushNotificationResult)e.Result); return; } } + if (type == typeof(ClientModels.RegisterPlayFabUserResult)) { if (_instance.OnRegisterPlayFabUserResultEvent != null) { _instance.OnRegisterPlayFabUserResultEvent((ClientModels.RegisterPlayFabUserResult)e.Result); return; } } + if (type == typeof(ClientModels.RemoveContactEmailResult)) { if (_instance.OnRemoveContactEmailResultEvent != null) { _instance.OnRemoveContactEmailResultEvent((ClientModels.RemoveContactEmailResult)e.Result); return; } } + if (type == typeof(ClientModels.RemoveFriendResult)) { if (_instance.OnRemoveFriendResultEvent != null) { _instance.OnRemoveFriendResultEvent((ClientModels.RemoveFriendResult)e.Result); return; } } + if (type == typeof(ClientModels.RemoveGenericIDResult)) { if (_instance.OnRemoveGenericIDResultEvent != null) { _instance.OnRemoveGenericIDResultEvent((ClientModels.RemoveGenericIDResult)e.Result); return; } } + if (type == typeof(ClientModels.RemoveSharedGroupMembersResult)) { if (_instance.OnRemoveSharedGroupMembersResultEvent != null) { _instance.OnRemoveSharedGroupMembersResultEvent((ClientModels.RemoveSharedGroupMembersResult)e.Result); return; } } + if (type == typeof(ClientModels.ReportAdActivityResult)) { if (_instance.OnReportAdActivityResultEvent != null) { _instance.OnReportAdActivityResultEvent((ClientModels.ReportAdActivityResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResponse)) { if (_instance.OnReportDeviceInfoResultEvent != null) { _instance.OnReportDeviceInfoResultEvent((ClientModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ClientModels.ReportPlayerClientResult)) { if (_instance.OnReportPlayerResultEvent != null) { _instance.OnReportPlayerResultEvent((ClientModels.ReportPlayerClientResult)e.Result); return; } } + if (type == typeof(ClientModels.RestoreIOSPurchasesResult)) { if (_instance.OnRestoreIOSPurchasesResultEvent != null) { _instance.OnRestoreIOSPurchasesResultEvent((ClientModels.RestoreIOSPurchasesResult)e.Result); return; } } + if (type == typeof(ClientModels.RewardAdActivityResult)) { if (_instance.OnRewardAdActivityResultEvent != null) { _instance.OnRewardAdActivityResultEvent((ClientModels.RewardAdActivityResult)e.Result); return; } } + if (type == typeof(ClientModels.SendAccountRecoveryEmailResult)) { if (_instance.OnSendAccountRecoveryEmailResultEvent != null) { _instance.OnSendAccountRecoveryEmailResultEvent((ClientModels.SendAccountRecoveryEmailResult)e.Result); return; } } + if (type == typeof(ClientModels.SetFriendTagsResult)) { if (_instance.OnSetFriendTagsResultEvent != null) { _instance.OnSetFriendTagsResultEvent((ClientModels.SetFriendTagsResult)e.Result); return; } } + if (type == typeof(ClientModels.SetPlayerSecretResult)) { if (_instance.OnSetPlayerSecretResultEvent != null) { _instance.OnSetPlayerSecretResultEvent((ClientModels.SetPlayerSecretResult)e.Result); return; } } + if (type == typeof(ClientModels.StartPurchaseResult)) { if (_instance.OnStartPurchaseResultEvent != null) { _instance.OnStartPurchaseResultEvent((ClientModels.StartPurchaseResult)e.Result); return; } } + if (type == typeof(ClientModels.ModifyUserVirtualCurrencyResult)) { if (_instance.OnSubtractUserVirtualCurrencyResultEvent != null) { _instance.OnSubtractUserVirtualCurrencyResultEvent((ClientModels.ModifyUserVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkAndroidDeviceIDResult)) { if (_instance.OnUnlinkAndroidDeviceIDResultEvent != null) { _instance.OnUnlinkAndroidDeviceIDResultEvent((ClientModels.UnlinkAndroidDeviceIDResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResponse)) { if (_instance.OnUnlinkAppleResultEvent != null) { _instance.OnUnlinkAppleResultEvent((ClientModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkCustomIDResult)) { if (_instance.OnUnlinkCustomIDResultEvent != null) { _instance.OnUnlinkCustomIDResultEvent((ClientModels.UnlinkCustomIDResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkFacebookAccountResult)) { if (_instance.OnUnlinkFacebookAccountResultEvent != null) { _instance.OnUnlinkFacebookAccountResultEvent((ClientModels.UnlinkFacebookAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkFacebookInstantGamesIdResult)) { if (_instance.OnUnlinkFacebookInstantGamesIdResultEvent != null) { _instance.OnUnlinkFacebookInstantGamesIdResultEvent((ClientModels.UnlinkFacebookInstantGamesIdResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkGameCenterAccountResult)) { if (_instance.OnUnlinkGameCenterAccountResultEvent != null) { _instance.OnUnlinkGameCenterAccountResultEvent((ClientModels.UnlinkGameCenterAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkGoogleAccountResult)) { if (_instance.OnUnlinkGoogleAccountResultEvent != null) { _instance.OnUnlinkGoogleAccountResultEvent((ClientModels.UnlinkGoogleAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkGooglePlayGamesServicesAccountResult)) { if (_instance.OnUnlinkGooglePlayGamesServicesAccountResultEvent != null) { _instance.OnUnlinkGooglePlayGamesServicesAccountResultEvent((ClientModels.UnlinkGooglePlayGamesServicesAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkIOSDeviceIDResult)) { if (_instance.OnUnlinkIOSDeviceIDResultEvent != null) { _instance.OnUnlinkIOSDeviceIDResultEvent((ClientModels.UnlinkIOSDeviceIDResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkKongregateAccountResult)) { if (_instance.OnUnlinkKongregateResultEvent != null) { _instance.OnUnlinkKongregateResultEvent((ClientModels.UnlinkKongregateAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResponse)) { if (_instance.OnUnlinkNintendoServiceAccountResultEvent != null) { _instance.OnUnlinkNintendoServiceAccountResultEvent((ClientModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkNintendoSwitchDeviceIdResult)) { if (_instance.OnUnlinkNintendoSwitchDeviceIdResultEvent != null) { _instance.OnUnlinkNintendoSwitchDeviceIdResultEvent((ClientModels.UnlinkNintendoSwitchDeviceIdResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResponse)) { if (_instance.OnUnlinkOpenIdConnectResultEvent != null) { _instance.OnUnlinkOpenIdConnectResultEvent((ClientModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkPSNAccountResult)) { if (_instance.OnUnlinkPSNAccountResultEvent != null) { _instance.OnUnlinkPSNAccountResultEvent((ClientModels.UnlinkPSNAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkSteamAccountResult)) { if (_instance.OnUnlinkSteamAccountResultEvent != null) { _instance.OnUnlinkSteamAccountResultEvent((ClientModels.UnlinkSteamAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkTwitchAccountResult)) { if (_instance.OnUnlinkTwitchResultEvent != null) { _instance.OnUnlinkTwitchResultEvent((ClientModels.UnlinkTwitchAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlinkXboxAccountResult)) { if (_instance.OnUnlinkXboxAccountResultEvent != null) { _instance.OnUnlinkXboxAccountResultEvent((ClientModels.UnlinkXboxAccountResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlockContainerItemResult)) { if (_instance.OnUnlockContainerInstanceResultEvent != null) { _instance.OnUnlockContainerInstanceResultEvent((ClientModels.UnlockContainerItemResult)e.Result); return; } } + if (type == typeof(ClientModels.UnlockContainerItemResult)) { if (_instance.OnUnlockContainerItemResultEvent != null) { _instance.OnUnlockContainerItemResultEvent((ClientModels.UnlockContainerItemResult)e.Result); return; } } + if (type == typeof(ClientModels.EmptyResponse)) { if (_instance.OnUpdateAvatarUrlResultEvent != null) { _instance.OnUpdateAvatarUrlResultEvent((ClientModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ClientModels.UpdateCharacterDataResult)) { if (_instance.OnUpdateCharacterDataResultEvent != null) { _instance.OnUpdateCharacterDataResultEvent((ClientModels.UpdateCharacterDataResult)e.Result); return; } } + if (type == typeof(ClientModels.UpdateCharacterStatisticsResult)) { if (_instance.OnUpdateCharacterStatisticsResultEvent != null) { _instance.OnUpdateCharacterStatisticsResultEvent((ClientModels.UpdateCharacterStatisticsResult)e.Result); return; } } + if (type == typeof(ClientModels.UpdatePlayerStatisticsResult)) { if (_instance.OnUpdatePlayerStatisticsResultEvent != null) { _instance.OnUpdatePlayerStatisticsResultEvent((ClientModels.UpdatePlayerStatisticsResult)e.Result); return; } } + if (type == typeof(ClientModels.UpdateSharedGroupDataResult)) { if (_instance.OnUpdateSharedGroupDataResultEvent != null) { _instance.OnUpdateSharedGroupDataResultEvent((ClientModels.UpdateSharedGroupDataResult)e.Result); return; } } + if (type == typeof(ClientModels.UpdateUserDataResult)) { if (_instance.OnUpdateUserDataResultEvent != null) { _instance.OnUpdateUserDataResultEvent((ClientModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ClientModels.UpdateUserDataResult)) { if (_instance.OnUpdateUserPublisherDataResultEvent != null) { _instance.OnUpdateUserPublisherDataResultEvent((ClientModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ClientModels.UpdateUserTitleDisplayNameResult)) { if (_instance.OnUpdateUserTitleDisplayNameResultEvent != null) { _instance.OnUpdateUserTitleDisplayNameResultEvent((ClientModels.UpdateUserTitleDisplayNameResult)e.Result); return; } } + if (type == typeof(ClientModels.ValidateAmazonReceiptResult)) { if (_instance.OnValidateAmazonIAPReceiptResultEvent != null) { _instance.OnValidateAmazonIAPReceiptResultEvent((ClientModels.ValidateAmazonReceiptResult)e.Result); return; } } + if (type == typeof(ClientModels.ValidateGooglePlayPurchaseResult)) { if (_instance.OnValidateGooglePlayPurchaseResultEvent != null) { _instance.OnValidateGooglePlayPurchaseResultEvent((ClientModels.ValidateGooglePlayPurchaseResult)e.Result); return; } } + if (type == typeof(ClientModels.ValidateIOSReceiptResult)) { if (_instance.OnValidateIOSReceiptResultEvent != null) { _instance.OnValidateIOSReceiptResultEvent((ClientModels.ValidateIOSReceiptResult)e.Result); return; } } + if (type == typeof(ClientModels.ValidateWindowsReceiptResult)) { if (_instance.OnValidateWindowsStoreReceiptResultEvent != null) { _instance.OnValidateWindowsStoreReceiptResultEvent((ClientModels.ValidateWindowsReceiptResult)e.Result); return; } } + if (type == typeof(ClientModels.WriteEventResponse)) { if (_instance.OnWriteCharacterEventResultEvent != null) { _instance.OnWriteCharacterEventResultEvent((ClientModels.WriteEventResponse)e.Result); return; } } + if (type == typeof(ClientModels.WriteEventResponse)) { if (_instance.OnWritePlayerEventResultEvent != null) { _instance.OnWritePlayerEventResultEvent((ClientModels.WriteEventResponse)e.Result); return; } } + if (type == typeof(ClientModels.WriteEventResponse)) { if (_instance.OnWriteTitleEventResultEvent != null) { _instance.OnWriteTitleEventResultEvent((ClientModels.WriteEventResponse)e.Result); return; } } +#endif +#if ENABLE_PLAYFABSERVER_API + + if (type == typeof(ServerModels.ModifyCharacterVirtualCurrencyResult)) { if (_instance.OnServerAddCharacterVirtualCurrencyResultEvent != null) { _instance.OnServerAddCharacterVirtualCurrencyResultEvent((ServerModels.ModifyCharacterVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResponse)) { if (_instance.OnServerAddFriendResultEvent != null) { _instance.OnServerAddFriendResultEvent((ServerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResult)) { if (_instance.OnServerAddGenericIDResultEvent != null) { _instance.OnServerAddGenericIDResultEvent((ServerModels.EmptyResult)e.Result); return; } } + if (type == typeof(ServerModels.AddPlayerTagResult)) { if (_instance.OnServerAddPlayerTagResultEvent != null) { _instance.OnServerAddPlayerTagResultEvent((ServerModels.AddPlayerTagResult)e.Result); return; } } + if (type == typeof(ServerModels.AddSharedGroupMembersResult)) { if (_instance.OnServerAddSharedGroupMembersResultEvent != null) { _instance.OnServerAddSharedGroupMembersResultEvent((ServerModels.AddSharedGroupMembersResult)e.Result); return; } } + if (type == typeof(ServerModels.ModifyUserVirtualCurrencyResult)) { if (_instance.OnServerAddUserVirtualCurrencyResultEvent != null) { _instance.OnServerAddUserVirtualCurrencyResultEvent((ServerModels.ModifyUserVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(ServerModels.AuthenticateSessionTicketResult)) { if (_instance.OnServerAuthenticateSessionTicketResultEvent != null) { _instance.OnServerAuthenticateSessionTicketResultEvent((ServerModels.AuthenticateSessionTicketResult)e.Result); return; } } + if (type == typeof(ServerModels.AwardSteamAchievementResult)) { if (_instance.OnServerAwardSteamAchievementResultEvent != null) { _instance.OnServerAwardSteamAchievementResultEvent((ServerModels.AwardSteamAchievementResult)e.Result); return; } } + if (type == typeof(ServerModels.BanUsersResult)) { if (_instance.OnServerBanUsersResultEvent != null) { _instance.OnServerBanUsersResultEvent((ServerModels.BanUsersResult)e.Result); return; } } + if (type == typeof(ServerModels.ConsumeItemResult)) { if (_instance.OnServerConsumeItemResultEvent != null) { _instance.OnServerConsumeItemResultEvent((ServerModels.ConsumeItemResult)e.Result); return; } } + if (type == typeof(ServerModels.CreateSharedGroupResult)) { if (_instance.OnServerCreateSharedGroupResultEvent != null) { _instance.OnServerCreateSharedGroupResultEvent((ServerModels.CreateSharedGroupResult)e.Result); return; } } + if (type == typeof(ServerModels.DeleteCharacterFromUserResult)) { if (_instance.OnServerDeleteCharacterFromUserResultEvent != null) { _instance.OnServerDeleteCharacterFromUserResultEvent((ServerModels.DeleteCharacterFromUserResult)e.Result); return; } } + if (type == typeof(ServerModels.DeletePlayerResult)) { if (_instance.OnServerDeletePlayerResultEvent != null) { _instance.OnServerDeletePlayerResultEvent((ServerModels.DeletePlayerResult)e.Result); return; } } + if (type == typeof(ServerModels.DeletePushNotificationTemplateResult)) { if (_instance.OnServerDeletePushNotificationTemplateResultEvent != null) { _instance.OnServerDeletePushNotificationTemplateResultEvent((ServerModels.DeletePushNotificationTemplateResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResponse)) { if (_instance.OnServerDeleteSharedGroupResultEvent != null) { _instance.OnServerDeleteSharedGroupResultEvent((ServerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ServerModels.EvaluateRandomResultTableResult)) { if (_instance.OnServerEvaluateRandomResultTableResultEvent != null) { _instance.OnServerEvaluateRandomResultTableResultEvent((ServerModels.EvaluateRandomResultTableResult)e.Result); return; } } + if (type == typeof(ServerModels.ExecuteCloudScriptResult)) { if (_instance.OnServerExecuteCloudScriptResultEvent != null) { _instance.OnServerExecuteCloudScriptResultEvent((ServerModels.ExecuteCloudScriptResult)e.Result); return; } } + if (type == typeof(ServerModels.GetAllSegmentsResult)) { if (_instance.OnServerGetAllSegmentsResultEvent != null) { _instance.OnServerGetAllSegmentsResultEvent((ServerModels.GetAllSegmentsResult)e.Result); return; } } + if (type == typeof(ServerModels.ListUsersCharactersResult)) { if (_instance.OnServerGetAllUsersCharactersResultEvent != null) { _instance.OnServerGetAllUsersCharactersResultEvent((ServerModels.ListUsersCharactersResult)e.Result); return; } } + if (type == typeof(ServerModels.GetCatalogItemsResult)) { if (_instance.OnServerGetCatalogItemsResultEvent != null) { _instance.OnServerGetCatalogItemsResultEvent((ServerModels.GetCatalogItemsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetCharacterDataResult)) { if (_instance.OnServerGetCharacterDataResultEvent != null) { _instance.OnServerGetCharacterDataResultEvent((ServerModels.GetCharacterDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetCharacterDataResult)) { if (_instance.OnServerGetCharacterInternalDataResultEvent != null) { _instance.OnServerGetCharacterInternalDataResultEvent((ServerModels.GetCharacterDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetCharacterInventoryResult)) { if (_instance.OnServerGetCharacterInventoryResultEvent != null) { _instance.OnServerGetCharacterInventoryResultEvent((ServerModels.GetCharacterInventoryResult)e.Result); return; } } + if (type == typeof(ServerModels.GetCharacterLeaderboardResult)) { if (_instance.OnServerGetCharacterLeaderboardResultEvent != null) { _instance.OnServerGetCharacterLeaderboardResultEvent((ServerModels.GetCharacterLeaderboardResult)e.Result); return; } } + if (type == typeof(ServerModels.GetCharacterDataResult)) { if (_instance.OnServerGetCharacterReadOnlyDataResultEvent != null) { _instance.OnServerGetCharacterReadOnlyDataResultEvent((ServerModels.GetCharacterDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetCharacterStatisticsResult)) { if (_instance.OnServerGetCharacterStatisticsResultEvent != null) { _instance.OnServerGetCharacterStatisticsResultEvent((ServerModels.GetCharacterStatisticsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetContentDownloadUrlResult)) { if (_instance.OnServerGetContentDownloadUrlResultEvent != null) { _instance.OnServerGetContentDownloadUrlResultEvent((ServerModels.GetContentDownloadUrlResult)e.Result); return; } } + if (type == typeof(ServerModels.GetLeaderboardResult)) { if (_instance.OnServerGetFriendLeaderboardResultEvent != null) { _instance.OnServerGetFriendLeaderboardResultEvent((ServerModels.GetLeaderboardResult)e.Result); return; } } + if (type == typeof(ServerModels.GetFriendsListResult)) { if (_instance.OnServerGetFriendsListResultEvent != null) { _instance.OnServerGetFriendsListResultEvent((ServerModels.GetFriendsListResult)e.Result); return; } } + if (type == typeof(ServerModels.GetLeaderboardResult)) { if (_instance.OnServerGetLeaderboardResultEvent != null) { _instance.OnServerGetLeaderboardResultEvent((ServerModels.GetLeaderboardResult)e.Result); return; } } + if (type == typeof(ServerModels.GetLeaderboardAroundCharacterResult)) { if (_instance.OnServerGetLeaderboardAroundCharacterResultEvent != null) { _instance.OnServerGetLeaderboardAroundCharacterResultEvent((ServerModels.GetLeaderboardAroundCharacterResult)e.Result); return; } } + if (type == typeof(ServerModels.GetLeaderboardAroundUserResult)) { if (_instance.OnServerGetLeaderboardAroundUserResultEvent != null) { _instance.OnServerGetLeaderboardAroundUserResultEvent((ServerModels.GetLeaderboardAroundUserResult)e.Result); return; } } + if (type == typeof(ServerModels.GetLeaderboardForUsersCharactersResult)) { if (_instance.OnServerGetLeaderboardForUserCharactersResultEvent != null) { _instance.OnServerGetLeaderboardForUserCharactersResultEvent((ServerModels.GetLeaderboardForUsersCharactersResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayerCombinedInfoResult)) { if (_instance.OnServerGetPlayerCombinedInfoResultEvent != null) { _instance.OnServerGetPlayerCombinedInfoResultEvent((ServerModels.GetPlayerCombinedInfoResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayerProfileResult)) { if (_instance.OnServerGetPlayerProfileResultEvent != null) { _instance.OnServerGetPlayerProfileResultEvent((ServerModels.GetPlayerProfileResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayerSegmentsResult)) { if (_instance.OnServerGetPlayerSegmentsResultEvent != null) { _instance.OnServerGetPlayerSegmentsResultEvent((ServerModels.GetPlayerSegmentsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayersInSegmentResult)) { if (_instance.OnServerGetPlayersInSegmentResultEvent != null) { _instance.OnServerGetPlayersInSegmentResultEvent((ServerModels.GetPlayersInSegmentResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayerStatisticsResult)) { if (_instance.OnServerGetPlayerStatisticsResultEvent != null) { _instance.OnServerGetPlayerStatisticsResultEvent((ServerModels.GetPlayerStatisticsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayerStatisticVersionsResult)) { if (_instance.OnServerGetPlayerStatisticVersionsResultEvent != null) { _instance.OnServerGetPlayerStatisticVersionsResultEvent((ServerModels.GetPlayerStatisticVersionsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayerTagsResult)) { if (_instance.OnServerGetPlayerTagsResultEvent != null) { _instance.OnServerGetPlayerTagsResultEvent((ServerModels.GetPlayerTagsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromFacebookIDsResult)) { if (_instance.OnServerGetPlayFabIDsFromFacebookIDsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromFacebookIDsResultEvent((ServerModels.GetPlayFabIDsFromFacebookIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromFacebookInstantGamesIdsResult)) { if (_instance.OnServerGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromFacebookInstantGamesIdsResultEvent((ServerModels.GetPlayFabIDsFromFacebookInstantGamesIdsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromGenericIDsResult)) { if (_instance.OnServerGetPlayFabIDsFromGenericIDsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromGenericIDsResultEvent((ServerModels.GetPlayFabIDsFromGenericIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromNintendoServiceAccountIdsResult)) { if (_instance.OnServerGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromNintendoServiceAccountIdsResultEvent((ServerModels.GetPlayFabIDsFromNintendoServiceAccountIdsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsResult)) { if (_instance.OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromNintendoSwitchDeviceIdsResultEvent((ServerModels.GetPlayFabIDsFromNintendoSwitchDeviceIdsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromPSNAccountIDsResult)) { if (_instance.OnServerGetPlayFabIDsFromPSNAccountIDsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromPSNAccountIDsResultEvent((ServerModels.GetPlayFabIDsFromPSNAccountIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromPSNOnlineIDsResult)) { if (_instance.OnServerGetPlayFabIDsFromPSNOnlineIDsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromPSNOnlineIDsResultEvent((ServerModels.GetPlayFabIDsFromPSNOnlineIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromSteamIDsResult)) { if (_instance.OnServerGetPlayFabIDsFromSteamIDsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromSteamIDsResultEvent((ServerModels.GetPlayFabIDsFromSteamIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromTwitchIDsResult)) { if (_instance.OnServerGetPlayFabIDsFromTwitchIDsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromTwitchIDsResultEvent((ServerModels.GetPlayFabIDsFromTwitchIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPlayFabIDsFromXboxLiveIDsResult)) { if (_instance.OnServerGetPlayFabIDsFromXboxLiveIDsResultEvent != null) { _instance.OnServerGetPlayFabIDsFromXboxLiveIDsResultEvent((ServerModels.GetPlayFabIDsFromXboxLiveIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetPublisherDataResult)) { if (_instance.OnServerGetPublisherDataResultEvent != null) { _instance.OnServerGetPublisherDataResultEvent((ServerModels.GetPublisherDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetRandomResultTablesResult)) { if (_instance.OnServerGetRandomResultTablesResultEvent != null) { _instance.OnServerGetRandomResultTablesResultEvent((ServerModels.GetRandomResultTablesResult)e.Result); return; } } + if (type == typeof(ServerModels.GetServerCustomIDsFromPlayFabIDsResult)) { if (_instance.OnServerGetServerCustomIDsFromPlayFabIDsResultEvent != null) { _instance.OnServerGetServerCustomIDsFromPlayFabIDsResultEvent((ServerModels.GetServerCustomIDsFromPlayFabIDsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetSharedGroupDataResult)) { if (_instance.OnServerGetSharedGroupDataResultEvent != null) { _instance.OnServerGetSharedGroupDataResultEvent((ServerModels.GetSharedGroupDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetStoreItemsResult)) { if (_instance.OnServerGetStoreItemsResultEvent != null) { _instance.OnServerGetStoreItemsResultEvent((ServerModels.GetStoreItemsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetTimeResult)) { if (_instance.OnServerGetTimeResultEvent != null) { _instance.OnServerGetTimeResultEvent((ServerModels.GetTimeResult)e.Result); return; } } + if (type == typeof(ServerModels.GetTitleDataResult)) { if (_instance.OnServerGetTitleDataResultEvent != null) { _instance.OnServerGetTitleDataResultEvent((ServerModels.GetTitleDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetTitleDataResult)) { if (_instance.OnServerGetTitleInternalDataResultEvent != null) { _instance.OnServerGetTitleInternalDataResultEvent((ServerModels.GetTitleDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetTitleNewsResult)) { if (_instance.OnServerGetTitleNewsResultEvent != null) { _instance.OnServerGetTitleNewsResultEvent((ServerModels.GetTitleNewsResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserAccountInfoResult)) { if (_instance.OnServerGetUserAccountInfoResultEvent != null) { _instance.OnServerGetUserAccountInfoResultEvent((ServerModels.GetUserAccountInfoResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserBansResult)) { if (_instance.OnServerGetUserBansResultEvent != null) { _instance.OnServerGetUserBansResultEvent((ServerModels.GetUserBansResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserDataResult)) { if (_instance.OnServerGetUserDataResultEvent != null) { _instance.OnServerGetUserDataResultEvent((ServerModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserDataResult)) { if (_instance.OnServerGetUserInternalDataResultEvent != null) { _instance.OnServerGetUserInternalDataResultEvent((ServerModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserInventoryResult)) { if (_instance.OnServerGetUserInventoryResultEvent != null) { _instance.OnServerGetUserInventoryResultEvent((ServerModels.GetUserInventoryResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserDataResult)) { if (_instance.OnServerGetUserPublisherDataResultEvent != null) { _instance.OnServerGetUserPublisherDataResultEvent((ServerModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserDataResult)) { if (_instance.OnServerGetUserPublisherInternalDataResultEvent != null) { _instance.OnServerGetUserPublisherInternalDataResultEvent((ServerModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserDataResult)) { if (_instance.OnServerGetUserPublisherReadOnlyDataResultEvent != null) { _instance.OnServerGetUserPublisherReadOnlyDataResultEvent((ServerModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GetUserDataResult)) { if (_instance.OnServerGetUserReadOnlyDataResultEvent != null) { _instance.OnServerGetUserReadOnlyDataResultEvent((ServerModels.GetUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.GrantCharacterToUserResult)) { if (_instance.OnServerGrantCharacterToUserResultEvent != null) { _instance.OnServerGrantCharacterToUserResultEvent((ServerModels.GrantCharacterToUserResult)e.Result); return; } } + if (type == typeof(ServerModels.GrantItemsToCharacterResult)) { if (_instance.OnServerGrantItemsToCharacterResultEvent != null) { _instance.OnServerGrantItemsToCharacterResultEvent((ServerModels.GrantItemsToCharacterResult)e.Result); return; } } + if (type == typeof(ServerModels.GrantItemsToUserResult)) { if (_instance.OnServerGrantItemsToUserResultEvent != null) { _instance.OnServerGrantItemsToUserResultEvent((ServerModels.GrantItemsToUserResult)e.Result); return; } } + if (type == typeof(ServerModels.GrantItemsToUsersResult)) { if (_instance.OnServerGrantItemsToUsersResultEvent != null) { _instance.OnServerGrantItemsToUsersResultEvent((ServerModels.GrantItemsToUsersResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResult)) { if (_instance.OnServerLinkNintendoServiceAccountResultEvent != null) { _instance.OnServerLinkNintendoServiceAccountResultEvent((ServerModels.EmptyResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResult)) { if (_instance.OnServerLinkNintendoServiceAccountSubjectResultEvent != null) { _instance.OnServerLinkNintendoServiceAccountSubjectResultEvent((ServerModels.EmptyResult)e.Result); return; } } + if (type == typeof(ServerModels.LinkNintendoSwitchDeviceIdResult)) { if (_instance.OnServerLinkNintendoSwitchDeviceIdResultEvent != null) { _instance.OnServerLinkNintendoSwitchDeviceIdResultEvent((ServerModels.LinkNintendoSwitchDeviceIdResult)e.Result); return; } } + if (type == typeof(ServerModels.LinkPSNAccountResult)) { if (_instance.OnServerLinkPSNAccountResultEvent != null) { _instance.OnServerLinkPSNAccountResultEvent((ServerModels.LinkPSNAccountResult)e.Result); return; } } + if (type == typeof(ServerModels.LinkPSNIdResponse)) { if (_instance.OnServerLinkPSNIdResultEvent != null) { _instance.OnServerLinkPSNIdResultEvent((ServerModels.LinkPSNIdResponse)e.Result); return; } } + if (type == typeof(ServerModels.LinkServerCustomIdResult)) { if (_instance.OnServerLinkServerCustomIdResultEvent != null) { _instance.OnServerLinkServerCustomIdResultEvent((ServerModels.LinkServerCustomIdResult)e.Result); return; } } + if (type == typeof(ServerModels.LinkSteamIdResult)) { if (_instance.OnServerLinkSteamIdResultEvent != null) { _instance.OnServerLinkSteamIdResultEvent((ServerModels.LinkSteamIdResult)e.Result); return; } } + if (type == typeof(ServerModels.LinkXboxAccountResult)) { if (_instance.OnServerLinkXboxAccountResultEvent != null) { _instance.OnServerLinkXboxAccountResultEvent((ServerModels.LinkXboxAccountResult)e.Result); return; } } + if (type == typeof(ServerModels.ServerLoginResult)) { if (_instance.OnServerLoginWithPSNResultEvent != null) { _instance.OnServerLoginWithPSNResultEvent((ServerModels.ServerLoginResult)e.Result); return; } } + if (type == typeof(ServerModels.ServerLoginResult)) { if (_instance.OnServerLoginWithServerCustomIdResultEvent != null) { _instance.OnServerLoginWithServerCustomIdResultEvent((ServerModels.ServerLoginResult)e.Result); return; } } + if (type == typeof(ServerModels.ServerLoginResult)) { if (_instance.OnServerLoginWithSteamIdResultEvent != null) { _instance.OnServerLoginWithSteamIdResultEvent((ServerModels.ServerLoginResult)e.Result); return; } } + if (type == typeof(ServerModels.ServerLoginResult)) { if (_instance.OnServerLoginWithXboxResultEvent != null) { _instance.OnServerLoginWithXboxResultEvent((ServerModels.ServerLoginResult)e.Result); return; } } + if (type == typeof(ServerModels.ServerLoginResult)) { if (_instance.OnServerLoginWithXboxIdResultEvent != null) { _instance.OnServerLoginWithXboxIdResultEvent((ServerModels.ServerLoginResult)e.Result); return; } } + if (type == typeof(ServerModels.ModifyItemUsesResult)) { if (_instance.OnServerModifyItemUsesResultEvent != null) { _instance.OnServerModifyItemUsesResultEvent((ServerModels.ModifyItemUsesResult)e.Result); return; } } + if (type == typeof(ServerModels.MoveItemToCharacterFromCharacterResult)) { if (_instance.OnServerMoveItemToCharacterFromCharacterResultEvent != null) { _instance.OnServerMoveItemToCharacterFromCharacterResultEvent((ServerModels.MoveItemToCharacterFromCharacterResult)e.Result); return; } } + if (type == typeof(ServerModels.MoveItemToCharacterFromUserResult)) { if (_instance.OnServerMoveItemToCharacterFromUserResultEvent != null) { _instance.OnServerMoveItemToCharacterFromUserResultEvent((ServerModels.MoveItemToCharacterFromUserResult)e.Result); return; } } + if (type == typeof(ServerModels.MoveItemToUserFromCharacterResult)) { if (_instance.OnServerMoveItemToUserFromCharacterResultEvent != null) { _instance.OnServerMoveItemToUserFromCharacterResultEvent((ServerModels.MoveItemToUserFromCharacterResult)e.Result); return; } } + if (type == typeof(ServerModels.RedeemCouponResult)) { if (_instance.OnServerRedeemCouponResultEvent != null) { _instance.OnServerRedeemCouponResultEvent((ServerModels.RedeemCouponResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResponse)) { if (_instance.OnServerRemoveFriendResultEvent != null) { _instance.OnServerRemoveFriendResultEvent((ServerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResult)) { if (_instance.OnServerRemoveGenericIDResultEvent != null) { _instance.OnServerRemoveGenericIDResultEvent((ServerModels.EmptyResult)e.Result); return; } } + if (type == typeof(ServerModels.RemovePlayerTagResult)) { if (_instance.OnServerRemovePlayerTagResultEvent != null) { _instance.OnServerRemovePlayerTagResultEvent((ServerModels.RemovePlayerTagResult)e.Result); return; } } + if (type == typeof(ServerModels.RemoveSharedGroupMembersResult)) { if (_instance.OnServerRemoveSharedGroupMembersResultEvent != null) { _instance.OnServerRemoveSharedGroupMembersResultEvent((ServerModels.RemoveSharedGroupMembersResult)e.Result); return; } } + if (type == typeof(ServerModels.ReportPlayerServerResult)) { if (_instance.OnServerReportPlayerResultEvent != null) { _instance.OnServerReportPlayerResultEvent((ServerModels.ReportPlayerServerResult)e.Result); return; } } + if (type == typeof(ServerModels.RevokeAllBansForUserResult)) { if (_instance.OnServerRevokeAllBansForUserResultEvent != null) { _instance.OnServerRevokeAllBansForUserResultEvent((ServerModels.RevokeAllBansForUserResult)e.Result); return; } } + if (type == typeof(ServerModels.RevokeBansResult)) { if (_instance.OnServerRevokeBansResultEvent != null) { _instance.OnServerRevokeBansResultEvent((ServerModels.RevokeBansResult)e.Result); return; } } + if (type == typeof(ServerModels.RevokeInventoryResult)) { if (_instance.OnServerRevokeInventoryItemResultEvent != null) { _instance.OnServerRevokeInventoryItemResultEvent((ServerModels.RevokeInventoryResult)e.Result); return; } } + if (type == typeof(ServerModels.RevokeInventoryItemsResult)) { if (_instance.OnServerRevokeInventoryItemsResultEvent != null) { _instance.OnServerRevokeInventoryItemsResultEvent((ServerModels.RevokeInventoryItemsResult)e.Result); return; } } + if (type == typeof(ServerModels.SavePushNotificationTemplateResult)) { if (_instance.OnServerSavePushNotificationTemplateResultEvent != null) { _instance.OnServerSavePushNotificationTemplateResultEvent((ServerModels.SavePushNotificationTemplateResult)e.Result); return; } } + if (type == typeof(ServerModels.SendCustomAccountRecoveryEmailResult)) { if (_instance.OnServerSendCustomAccountRecoveryEmailResultEvent != null) { _instance.OnServerSendCustomAccountRecoveryEmailResultEvent((ServerModels.SendCustomAccountRecoveryEmailResult)e.Result); return; } } + if (type == typeof(ServerModels.SendEmailFromTemplateResult)) { if (_instance.OnServerSendEmailFromTemplateResultEvent != null) { _instance.OnServerSendEmailFromTemplateResultEvent((ServerModels.SendEmailFromTemplateResult)e.Result); return; } } + if (type == typeof(ServerModels.SendPushNotificationResult)) { if (_instance.OnServerSendPushNotificationResultEvent != null) { _instance.OnServerSendPushNotificationResultEvent((ServerModels.SendPushNotificationResult)e.Result); return; } } + if (type == typeof(ServerModels.SendPushNotificationResult)) { if (_instance.OnServerSendPushNotificationFromTemplateResultEvent != null) { _instance.OnServerSendPushNotificationFromTemplateResultEvent((ServerModels.SendPushNotificationResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResponse)) { if (_instance.OnServerSetFriendTagsResultEvent != null) { _instance.OnServerSetFriendTagsResultEvent((ServerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ServerModels.SetPlayerSecretResult)) { if (_instance.OnServerSetPlayerSecretResultEvent != null) { _instance.OnServerSetPlayerSecretResultEvent((ServerModels.SetPlayerSecretResult)e.Result); return; } } + if (type == typeof(ServerModels.SetPublisherDataResult)) { if (_instance.OnServerSetPublisherDataResultEvent != null) { _instance.OnServerSetPublisherDataResultEvent((ServerModels.SetPublisherDataResult)e.Result); return; } } + if (type == typeof(ServerModels.SetTitleDataResult)) { if (_instance.OnServerSetTitleDataResultEvent != null) { _instance.OnServerSetTitleDataResultEvent((ServerModels.SetTitleDataResult)e.Result); return; } } + if (type == typeof(ServerModels.SetTitleDataResult)) { if (_instance.OnServerSetTitleInternalDataResultEvent != null) { _instance.OnServerSetTitleInternalDataResultEvent((ServerModels.SetTitleDataResult)e.Result); return; } } + if (type == typeof(ServerModels.ModifyCharacterVirtualCurrencyResult)) { if (_instance.OnServerSubtractCharacterVirtualCurrencyResultEvent != null) { _instance.OnServerSubtractCharacterVirtualCurrencyResultEvent((ServerModels.ModifyCharacterVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(ServerModels.ModifyUserVirtualCurrencyResult)) { if (_instance.OnServerSubtractUserVirtualCurrencyResultEvent != null) { _instance.OnServerSubtractUserVirtualCurrencyResultEvent((ServerModels.ModifyUserVirtualCurrencyResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResponse)) { if (_instance.OnServerUnlinkNintendoServiceAccountResultEvent != null) { _instance.OnServerUnlinkNintendoServiceAccountResultEvent((ServerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ServerModels.UnlinkNintendoSwitchDeviceIdResult)) { if (_instance.OnServerUnlinkNintendoSwitchDeviceIdResultEvent != null) { _instance.OnServerUnlinkNintendoSwitchDeviceIdResultEvent((ServerModels.UnlinkNintendoSwitchDeviceIdResult)e.Result); return; } } + if (type == typeof(ServerModels.UnlinkPSNAccountResult)) { if (_instance.OnServerUnlinkPSNAccountResultEvent != null) { _instance.OnServerUnlinkPSNAccountResultEvent((ServerModels.UnlinkPSNAccountResult)e.Result); return; } } + if (type == typeof(ServerModels.UnlinkServerCustomIdResult)) { if (_instance.OnServerUnlinkServerCustomIdResultEvent != null) { _instance.OnServerUnlinkServerCustomIdResultEvent((ServerModels.UnlinkServerCustomIdResult)e.Result); return; } } + if (type == typeof(ServerModels.UnlinkSteamIdResult)) { if (_instance.OnServerUnlinkSteamIdResultEvent != null) { _instance.OnServerUnlinkSteamIdResultEvent((ServerModels.UnlinkSteamIdResult)e.Result); return; } } + if (type == typeof(ServerModels.UnlinkXboxAccountResult)) { if (_instance.OnServerUnlinkXboxAccountResultEvent != null) { _instance.OnServerUnlinkXboxAccountResultEvent((ServerModels.UnlinkXboxAccountResult)e.Result); return; } } + if (type == typeof(ServerModels.UnlockContainerItemResult)) { if (_instance.OnServerUnlockContainerInstanceResultEvent != null) { _instance.OnServerUnlockContainerInstanceResultEvent((ServerModels.UnlockContainerItemResult)e.Result); return; } } + if (type == typeof(ServerModels.UnlockContainerItemResult)) { if (_instance.OnServerUnlockContainerItemResultEvent != null) { _instance.OnServerUnlockContainerItemResultEvent((ServerModels.UnlockContainerItemResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResponse)) { if (_instance.OnServerUpdateAvatarUrlResultEvent != null) { _instance.OnServerUpdateAvatarUrlResultEvent((ServerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ServerModels.UpdateBansResult)) { if (_instance.OnServerUpdateBansResultEvent != null) { _instance.OnServerUpdateBansResultEvent((ServerModels.UpdateBansResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateCharacterDataResult)) { if (_instance.OnServerUpdateCharacterDataResultEvent != null) { _instance.OnServerUpdateCharacterDataResultEvent((ServerModels.UpdateCharacterDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateCharacterDataResult)) { if (_instance.OnServerUpdateCharacterInternalDataResultEvent != null) { _instance.OnServerUpdateCharacterInternalDataResultEvent((ServerModels.UpdateCharacterDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateCharacterDataResult)) { if (_instance.OnServerUpdateCharacterReadOnlyDataResultEvent != null) { _instance.OnServerUpdateCharacterReadOnlyDataResultEvent((ServerModels.UpdateCharacterDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateCharacterStatisticsResult)) { if (_instance.OnServerUpdateCharacterStatisticsResultEvent != null) { _instance.OnServerUpdateCharacterStatisticsResultEvent((ServerModels.UpdateCharacterStatisticsResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdatePlayerStatisticsResult)) { if (_instance.OnServerUpdatePlayerStatisticsResultEvent != null) { _instance.OnServerUpdatePlayerStatisticsResultEvent((ServerModels.UpdatePlayerStatisticsResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateSharedGroupDataResult)) { if (_instance.OnServerUpdateSharedGroupDataResultEvent != null) { _instance.OnServerUpdateSharedGroupDataResultEvent((ServerModels.UpdateSharedGroupDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateUserDataResult)) { if (_instance.OnServerUpdateUserDataResultEvent != null) { _instance.OnServerUpdateUserDataResultEvent((ServerModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateUserDataResult)) { if (_instance.OnServerUpdateUserInternalDataResultEvent != null) { _instance.OnServerUpdateUserInternalDataResultEvent((ServerModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.EmptyResponse)) { if (_instance.OnServerUpdateUserInventoryItemCustomDataResultEvent != null) { _instance.OnServerUpdateUserInventoryItemCustomDataResultEvent((ServerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ServerModels.UpdateUserDataResult)) { if (_instance.OnServerUpdateUserPublisherDataResultEvent != null) { _instance.OnServerUpdateUserPublisherDataResultEvent((ServerModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateUserDataResult)) { if (_instance.OnServerUpdateUserPublisherInternalDataResultEvent != null) { _instance.OnServerUpdateUserPublisherInternalDataResultEvent((ServerModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateUserDataResult)) { if (_instance.OnServerUpdateUserPublisherReadOnlyDataResultEvent != null) { _instance.OnServerUpdateUserPublisherReadOnlyDataResultEvent((ServerModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.UpdateUserDataResult)) { if (_instance.OnServerUpdateUserReadOnlyDataResultEvent != null) { _instance.OnServerUpdateUserReadOnlyDataResultEvent((ServerModels.UpdateUserDataResult)e.Result); return; } } + if (type == typeof(ServerModels.WriteEventResponse)) { if (_instance.OnServerWriteCharacterEventResultEvent != null) { _instance.OnServerWriteCharacterEventResultEvent((ServerModels.WriteEventResponse)e.Result); return; } } + if (type == typeof(ServerModels.WriteEventResponse)) { if (_instance.OnServerWritePlayerEventResultEvent != null) { _instance.OnServerWritePlayerEventResultEvent((ServerModels.WriteEventResponse)e.Result); return; } } + if (type == typeof(ServerModels.WriteEventResponse)) { if (_instance.OnServerWriteTitleEventResultEvent != null) { _instance.OnServerWriteTitleEventResultEvent((ServerModels.WriteEventResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(AuthenticationModels.AuthenticateCustomIdResult)) { if (_instance.OnAuthenticationAuthenticateGameServerWithCustomIdResultEvent != null) { _instance.OnAuthenticationAuthenticateGameServerWithCustomIdResultEvent((AuthenticationModels.AuthenticateCustomIdResult)e.Result); return; } } + if (type == typeof(AuthenticationModels.EmptyResponse)) { if (_instance.OnAuthenticationDeleteResultEvent != null) { _instance.OnAuthenticationDeleteResultEvent((AuthenticationModels.EmptyResponse)e.Result); return; } } + if (type == typeof(AuthenticationModels.GetEntityTokenResponse)) { if (_instance.OnAuthenticationGetEntityTokenResultEvent != null) { _instance.OnAuthenticationGetEntityTokenResultEvent((AuthenticationModels.GetEntityTokenResponse)e.Result); return; } } + if (type == typeof(AuthenticationModels.ValidateEntityTokenResponse)) { if (_instance.OnAuthenticationValidateEntityTokenResultEvent != null) { _instance.OnAuthenticationValidateEntityTokenResultEvent((AuthenticationModels.ValidateEntityTokenResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(CloudScriptModels.ExecuteCloudScriptResult)) { if (_instance.OnCloudScriptExecuteEntityCloudScriptResultEvent != null) { _instance.OnCloudScriptExecuteEntityCloudScriptResultEvent((CloudScriptModels.ExecuteCloudScriptResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.ExecuteFunctionResult)) { if (_instance.OnCloudScriptExecuteFunctionResultEvent != null) { _instance.OnCloudScriptExecuteFunctionResultEvent((CloudScriptModels.ExecuteFunctionResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.GetFunctionResult)) { if (_instance.OnCloudScriptGetFunctionResultEvent != null) { _instance.OnCloudScriptGetFunctionResultEvent((CloudScriptModels.GetFunctionResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.ListEventHubFunctionsResult)) { if (_instance.OnCloudScriptListEventHubFunctionsResultEvent != null) { _instance.OnCloudScriptListEventHubFunctionsResultEvent((CloudScriptModels.ListEventHubFunctionsResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.ListFunctionsResult)) { if (_instance.OnCloudScriptListFunctionsResultEvent != null) { _instance.OnCloudScriptListFunctionsResultEvent((CloudScriptModels.ListFunctionsResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.ListHttpFunctionsResult)) { if (_instance.OnCloudScriptListHttpFunctionsResultEvent != null) { _instance.OnCloudScriptListHttpFunctionsResultEvent((CloudScriptModels.ListHttpFunctionsResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.ListQueuedFunctionsResult)) { if (_instance.OnCloudScriptListQueuedFunctionsResultEvent != null) { _instance.OnCloudScriptListQueuedFunctionsResultEvent((CloudScriptModels.ListQueuedFunctionsResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptPostFunctionResultForEntityTriggeredActionResultEvent != null) { _instance.OnCloudScriptPostFunctionResultForEntityTriggeredActionResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptPostFunctionResultForFunctionExecutionResultEvent != null) { _instance.OnCloudScriptPostFunctionResultForFunctionExecutionResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent != null) { _instance.OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptPostFunctionResultForScheduledTaskResultEvent != null) { _instance.OnCloudScriptPostFunctionResultForScheduledTaskResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptRegisterEventHubFunctionResultEvent != null) { _instance.OnCloudScriptRegisterEventHubFunctionResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptRegisterHttpFunctionResultEvent != null) { _instance.OnCloudScriptRegisterHttpFunctionResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptRegisterQueuedFunctionResultEvent != null) { _instance.OnCloudScriptRegisterQueuedFunctionResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } + if (type == typeof(CloudScriptModels.EmptyResult)) { if (_instance.OnCloudScriptUnregisterFunctionResultEvent != null) { _instance.OnCloudScriptUnregisterFunctionResultEvent((CloudScriptModels.EmptyResult)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(DataModels.AbortFileUploadsResponse)) { if (_instance.OnDataAbortFileUploadsResultEvent != null) { _instance.OnDataAbortFileUploadsResultEvent((DataModels.AbortFileUploadsResponse)e.Result); return; } } + if (type == typeof(DataModels.DeleteFilesResponse)) { if (_instance.OnDataDeleteFilesResultEvent != null) { _instance.OnDataDeleteFilesResultEvent((DataModels.DeleteFilesResponse)e.Result); return; } } + if (type == typeof(DataModels.FinalizeFileUploadsResponse)) { if (_instance.OnDataFinalizeFileUploadsResultEvent != null) { _instance.OnDataFinalizeFileUploadsResultEvent((DataModels.FinalizeFileUploadsResponse)e.Result); return; } } + if (type == typeof(DataModels.GetFilesResponse)) { if (_instance.OnDataGetFilesResultEvent != null) { _instance.OnDataGetFilesResultEvent((DataModels.GetFilesResponse)e.Result); return; } } + if (type == typeof(DataModels.GetObjectsResponse)) { if (_instance.OnDataGetObjectsResultEvent != null) { _instance.OnDataGetObjectsResultEvent((DataModels.GetObjectsResponse)e.Result); return; } } + if (type == typeof(DataModels.InitiateFileUploadsResponse)) { if (_instance.OnDataInitiateFileUploadsResultEvent != null) { _instance.OnDataInitiateFileUploadsResultEvent((DataModels.InitiateFileUploadsResponse)e.Result); return; } } + if (type == typeof(DataModels.SetObjectsResponse)) { if (_instance.OnDataSetObjectsResultEvent != null) { _instance.OnDataSetObjectsResultEvent((DataModels.SetObjectsResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(EconomyModels.AddInventoryItemsResponse)) { if (_instance.OnEconomyAddInventoryItemsResultEvent != null) { _instance.OnEconomyAddInventoryItemsResultEvent((EconomyModels.AddInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.CreateDraftItemResponse)) { if (_instance.OnEconomyCreateDraftItemResultEvent != null) { _instance.OnEconomyCreateDraftItemResultEvent((EconomyModels.CreateDraftItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.CreateUploadUrlsResponse)) { if (_instance.OnEconomyCreateUploadUrlsResultEvent != null) { _instance.OnEconomyCreateUploadUrlsResultEvent((EconomyModels.CreateUploadUrlsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.DeleteEntityItemReviewsResponse)) { if (_instance.OnEconomyDeleteEntityItemReviewsResultEvent != null) { _instance.OnEconomyDeleteEntityItemReviewsResultEvent((EconomyModels.DeleteEntityItemReviewsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.DeleteInventoryCollectionResponse)) { if (_instance.OnEconomyDeleteInventoryCollectionResultEvent != null) { _instance.OnEconomyDeleteInventoryCollectionResultEvent((EconomyModels.DeleteInventoryCollectionResponse)e.Result); return; } } + if (type == typeof(EconomyModels.DeleteInventoryItemsResponse)) { if (_instance.OnEconomyDeleteInventoryItemsResultEvent != null) { _instance.OnEconomyDeleteInventoryItemsResultEvent((EconomyModels.DeleteInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.DeleteItemResponse)) { if (_instance.OnEconomyDeleteItemResultEvent != null) { _instance.OnEconomyDeleteItemResultEvent((EconomyModels.DeleteItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.ExecuteInventoryOperationsResponse)) { if (_instance.OnEconomyExecuteInventoryOperationsResultEvent != null) { _instance.OnEconomyExecuteInventoryOperationsResultEvent((EconomyModels.ExecuteInventoryOperationsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.ExecuteTransferOperationsResponse)) { if (_instance.OnEconomyExecuteTransferOperationsResultEvent != null) { _instance.OnEconomyExecuteTransferOperationsResultEvent((EconomyModels.ExecuteTransferOperationsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetCatalogConfigResponse)) { if (_instance.OnEconomyGetCatalogConfigResultEvent != null) { _instance.OnEconomyGetCatalogConfigResultEvent((EconomyModels.GetCatalogConfigResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetDraftItemResponse)) { if (_instance.OnEconomyGetDraftItemResultEvent != null) { _instance.OnEconomyGetDraftItemResultEvent((EconomyModels.GetDraftItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetDraftItemsResponse)) { if (_instance.OnEconomyGetDraftItemsResultEvent != null) { _instance.OnEconomyGetDraftItemsResultEvent((EconomyModels.GetDraftItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetEntityDraftItemsResponse)) { if (_instance.OnEconomyGetEntityDraftItemsResultEvent != null) { _instance.OnEconomyGetEntityDraftItemsResultEvent((EconomyModels.GetEntityDraftItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetEntityItemReviewResponse)) { if (_instance.OnEconomyGetEntityItemReviewResultEvent != null) { _instance.OnEconomyGetEntityItemReviewResultEvent((EconomyModels.GetEntityItemReviewResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetInventoryCollectionIdsResponse)) { if (_instance.OnEconomyGetInventoryCollectionIdsResultEvent != null) { _instance.OnEconomyGetInventoryCollectionIdsResultEvent((EconomyModels.GetInventoryCollectionIdsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetInventoryItemsResponse)) { if (_instance.OnEconomyGetInventoryItemsResultEvent != null) { _instance.OnEconomyGetInventoryItemsResultEvent((EconomyModels.GetInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetInventoryOperationStatusResponse)) { if (_instance.OnEconomyGetInventoryOperationStatusResultEvent != null) { _instance.OnEconomyGetInventoryOperationStatusResultEvent((EconomyModels.GetInventoryOperationStatusResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetItemResponse)) { if (_instance.OnEconomyGetItemResultEvent != null) { _instance.OnEconomyGetItemResultEvent((EconomyModels.GetItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetItemContainersResponse)) { if (_instance.OnEconomyGetItemContainersResultEvent != null) { _instance.OnEconomyGetItemContainersResultEvent((EconomyModels.GetItemContainersResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetItemModerationStateResponse)) { if (_instance.OnEconomyGetItemModerationStateResultEvent != null) { _instance.OnEconomyGetItemModerationStateResultEvent((EconomyModels.GetItemModerationStateResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetItemPublishStatusResponse)) { if (_instance.OnEconomyGetItemPublishStatusResultEvent != null) { _instance.OnEconomyGetItemPublishStatusResultEvent((EconomyModels.GetItemPublishStatusResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetItemReviewsResponse)) { if (_instance.OnEconomyGetItemReviewsResultEvent != null) { _instance.OnEconomyGetItemReviewsResultEvent((EconomyModels.GetItemReviewsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetItemReviewSummaryResponse)) { if (_instance.OnEconomyGetItemReviewSummaryResultEvent != null) { _instance.OnEconomyGetItemReviewSummaryResultEvent((EconomyModels.GetItemReviewSummaryResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetItemsResponse)) { if (_instance.OnEconomyGetItemsResultEvent != null) { _instance.OnEconomyGetItemsResultEvent((EconomyModels.GetItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetMicrosoftStoreAccessTokensResponse)) { if (_instance.OnEconomyGetMicrosoftStoreAccessTokensResultEvent != null) { _instance.OnEconomyGetMicrosoftStoreAccessTokensResultEvent((EconomyModels.GetMicrosoftStoreAccessTokensResponse)e.Result); return; } } + if (type == typeof(EconomyModels.GetTransactionHistoryResponse)) { if (_instance.OnEconomyGetTransactionHistoryResultEvent != null) { _instance.OnEconomyGetTransactionHistoryResultEvent((EconomyModels.GetTransactionHistoryResponse)e.Result); return; } } + if (type == typeof(EconomyModels.PublishDraftItemResponse)) { if (_instance.OnEconomyPublishDraftItemResultEvent != null) { _instance.OnEconomyPublishDraftItemResultEvent((EconomyModels.PublishDraftItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.PurchaseInventoryItemsResponse)) { if (_instance.OnEconomyPurchaseInventoryItemsResultEvent != null) { _instance.OnEconomyPurchaseInventoryItemsResultEvent((EconomyModels.PurchaseInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.RedeemAppleAppStoreInventoryItemsResponse)) { if (_instance.OnEconomyRedeemAppleAppStoreInventoryItemsResultEvent != null) { _instance.OnEconomyRedeemAppleAppStoreInventoryItemsResultEvent((EconomyModels.RedeemAppleAppStoreInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.RedeemGooglePlayInventoryItemsResponse)) { if (_instance.OnEconomyRedeemGooglePlayInventoryItemsResultEvent != null) { _instance.OnEconomyRedeemGooglePlayInventoryItemsResultEvent((EconomyModels.RedeemGooglePlayInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.RedeemMicrosoftStoreInventoryItemsResponse)) { if (_instance.OnEconomyRedeemMicrosoftStoreInventoryItemsResultEvent != null) { _instance.OnEconomyRedeemMicrosoftStoreInventoryItemsResultEvent((EconomyModels.RedeemMicrosoftStoreInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.RedeemNintendoEShopInventoryItemsResponse)) { if (_instance.OnEconomyRedeemNintendoEShopInventoryItemsResultEvent != null) { _instance.OnEconomyRedeemNintendoEShopInventoryItemsResultEvent((EconomyModels.RedeemNintendoEShopInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.RedeemPlayStationStoreInventoryItemsResponse)) { if (_instance.OnEconomyRedeemPlayStationStoreInventoryItemsResultEvent != null) { _instance.OnEconomyRedeemPlayStationStoreInventoryItemsResultEvent((EconomyModels.RedeemPlayStationStoreInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.RedeemSteamInventoryItemsResponse)) { if (_instance.OnEconomyRedeemSteamInventoryItemsResultEvent != null) { _instance.OnEconomyRedeemSteamInventoryItemsResultEvent((EconomyModels.RedeemSteamInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.ReportItemResponse)) { if (_instance.OnEconomyReportItemResultEvent != null) { _instance.OnEconomyReportItemResultEvent((EconomyModels.ReportItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.ReportItemReviewResponse)) { if (_instance.OnEconomyReportItemReviewResultEvent != null) { _instance.OnEconomyReportItemReviewResultEvent((EconomyModels.ReportItemReviewResponse)e.Result); return; } } + if (type == typeof(EconomyModels.ReviewItemResponse)) { if (_instance.OnEconomyReviewItemResultEvent != null) { _instance.OnEconomyReviewItemResultEvent((EconomyModels.ReviewItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.SearchItemsResponse)) { if (_instance.OnEconomySearchItemsResultEvent != null) { _instance.OnEconomySearchItemsResultEvent((EconomyModels.SearchItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.SetItemModerationStateResponse)) { if (_instance.OnEconomySetItemModerationStateResultEvent != null) { _instance.OnEconomySetItemModerationStateResultEvent((EconomyModels.SetItemModerationStateResponse)e.Result); return; } } + if (type == typeof(EconomyModels.SubmitItemReviewVoteResponse)) { if (_instance.OnEconomySubmitItemReviewVoteResultEvent != null) { _instance.OnEconomySubmitItemReviewVoteResultEvent((EconomyModels.SubmitItemReviewVoteResponse)e.Result); return; } } + if (type == typeof(EconomyModels.SubtractInventoryItemsResponse)) { if (_instance.OnEconomySubtractInventoryItemsResultEvent != null) { _instance.OnEconomySubtractInventoryItemsResultEvent((EconomyModels.SubtractInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.TakedownItemReviewsResponse)) { if (_instance.OnEconomyTakedownItemReviewsResultEvent != null) { _instance.OnEconomyTakedownItemReviewsResultEvent((EconomyModels.TakedownItemReviewsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.TransferInventoryItemsResponse)) { if (_instance.OnEconomyTransferInventoryItemsResultEvent != null) { _instance.OnEconomyTransferInventoryItemsResultEvent((EconomyModels.TransferInventoryItemsResponse)e.Result); return; } } + if (type == typeof(EconomyModels.UpdateCatalogConfigResponse)) { if (_instance.OnEconomyUpdateCatalogConfigResultEvent != null) { _instance.OnEconomyUpdateCatalogConfigResultEvent((EconomyModels.UpdateCatalogConfigResponse)e.Result); return; } } + if (type == typeof(EconomyModels.UpdateDraftItemResponse)) { if (_instance.OnEconomyUpdateDraftItemResultEvent != null) { _instance.OnEconomyUpdateDraftItemResultEvent((EconomyModels.UpdateDraftItemResponse)e.Result); return; } } + if (type == typeof(EconomyModels.UpdateInventoryItemsResponse)) { if (_instance.OnEconomyUpdateInventoryItemsResultEvent != null) { _instance.OnEconomyUpdateInventoryItemsResultEvent((EconomyModels.UpdateInventoryItemsResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(EventsModels.CreateTelemetryKeyResponse)) { if (_instance.OnEventsCreateTelemetryKeyResultEvent != null) { _instance.OnEventsCreateTelemetryKeyResultEvent((EventsModels.CreateTelemetryKeyResponse)e.Result); return; } } + if (type == typeof(EventsModels.DeleteTelemetryKeyResponse)) { if (_instance.OnEventsDeleteTelemetryKeyResultEvent != null) { _instance.OnEventsDeleteTelemetryKeyResultEvent((EventsModels.DeleteTelemetryKeyResponse)e.Result); return; } } + if (type == typeof(EventsModels.GetTelemetryKeyResponse)) { if (_instance.OnEventsGetTelemetryKeyResultEvent != null) { _instance.OnEventsGetTelemetryKeyResultEvent((EventsModels.GetTelemetryKeyResponse)e.Result); return; } } + if (type == typeof(EventsModels.ListTelemetryKeysResponse)) { if (_instance.OnEventsListTelemetryKeysResultEvent != null) { _instance.OnEventsListTelemetryKeysResultEvent((EventsModels.ListTelemetryKeysResponse)e.Result); return; } } + if (type == typeof(EventsModels.SetTelemetryKeyActiveResponse)) { if (_instance.OnEventsSetTelemetryKeyActiveResultEvent != null) { _instance.OnEventsSetTelemetryKeyActiveResultEvent((EventsModels.SetTelemetryKeyActiveResponse)e.Result); return; } } + if (type == typeof(EventsModels.WriteEventsResponse)) { if (_instance.OnEventsWriteEventsResultEvent != null) { _instance.OnEventsWriteEventsResultEvent((EventsModels.WriteEventsResponse)e.Result); return; } } + if (type == typeof(EventsModels.WriteEventsResponse)) { if (_instance.OnEventsWriteTelemetryEventsResultEvent != null) { _instance.OnEventsWriteTelemetryEventsResultEvent((EventsModels.WriteEventsResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(ExperimentationModels.CreateExclusionGroupResult)) { if (_instance.OnExperimentationCreateExclusionGroupResultEvent != null) { _instance.OnExperimentationCreateExclusionGroupResultEvent((ExperimentationModels.CreateExclusionGroupResult)e.Result); return; } } + if (type == typeof(ExperimentationModels.CreateExperimentResult)) { if (_instance.OnExperimentationCreateExperimentResultEvent != null) { _instance.OnExperimentationCreateExperimentResultEvent((ExperimentationModels.CreateExperimentResult)e.Result); return; } } + if (type == typeof(ExperimentationModels.EmptyResponse)) { if (_instance.OnExperimentationDeleteExclusionGroupResultEvent != null) { _instance.OnExperimentationDeleteExclusionGroupResultEvent((ExperimentationModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ExperimentationModels.EmptyResponse)) { if (_instance.OnExperimentationDeleteExperimentResultEvent != null) { _instance.OnExperimentationDeleteExperimentResultEvent((ExperimentationModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ExperimentationModels.GetExclusionGroupsResult)) { if (_instance.OnExperimentationGetExclusionGroupsResultEvent != null) { _instance.OnExperimentationGetExclusionGroupsResultEvent((ExperimentationModels.GetExclusionGroupsResult)e.Result); return; } } + if (type == typeof(ExperimentationModels.GetExclusionGroupTrafficResult)) { if (_instance.OnExperimentationGetExclusionGroupTrafficResultEvent != null) { _instance.OnExperimentationGetExclusionGroupTrafficResultEvent((ExperimentationModels.GetExclusionGroupTrafficResult)e.Result); return; } } + if (type == typeof(ExperimentationModels.GetExperimentsResult)) { if (_instance.OnExperimentationGetExperimentsResultEvent != null) { _instance.OnExperimentationGetExperimentsResultEvent((ExperimentationModels.GetExperimentsResult)e.Result); return; } } + if (type == typeof(ExperimentationModels.GetLatestScorecardResult)) { if (_instance.OnExperimentationGetLatestScorecardResultEvent != null) { _instance.OnExperimentationGetLatestScorecardResultEvent((ExperimentationModels.GetLatestScorecardResult)e.Result); return; } } + if (type == typeof(ExperimentationModels.GetTreatmentAssignmentResult)) { if (_instance.OnExperimentationGetTreatmentAssignmentResultEvent != null) { _instance.OnExperimentationGetTreatmentAssignmentResultEvent((ExperimentationModels.GetTreatmentAssignmentResult)e.Result); return; } } + if (type == typeof(ExperimentationModels.EmptyResponse)) { if (_instance.OnExperimentationStartExperimentResultEvent != null) { _instance.OnExperimentationStartExperimentResultEvent((ExperimentationModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ExperimentationModels.EmptyResponse)) { if (_instance.OnExperimentationStopExperimentResultEvent != null) { _instance.OnExperimentationStopExperimentResultEvent((ExperimentationModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ExperimentationModels.EmptyResponse)) { if (_instance.OnExperimentationUpdateExclusionGroupResultEvent != null) { _instance.OnExperimentationUpdateExclusionGroupResultEvent((ExperimentationModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ExperimentationModels.EmptyResponse)) { if (_instance.OnExperimentationUpdateExperimentResultEvent != null) { _instance.OnExperimentationUpdateExperimentResultEvent((ExperimentationModels.EmptyResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(InsightsModels.InsightsGetDetailsResponse)) { if (_instance.OnInsightsGetDetailsResultEvent != null) { _instance.OnInsightsGetDetailsResultEvent((InsightsModels.InsightsGetDetailsResponse)e.Result); return; } } + if (type == typeof(InsightsModels.InsightsGetLimitsResponse)) { if (_instance.OnInsightsGetLimitsResultEvent != null) { _instance.OnInsightsGetLimitsResultEvent((InsightsModels.InsightsGetLimitsResponse)e.Result); return; } } + if (type == typeof(InsightsModels.InsightsGetOperationStatusResponse)) { if (_instance.OnInsightsGetOperationStatusResultEvent != null) { _instance.OnInsightsGetOperationStatusResultEvent((InsightsModels.InsightsGetOperationStatusResponse)e.Result); return; } } + if (type == typeof(InsightsModels.InsightsGetPendingOperationsResponse)) { if (_instance.OnInsightsGetPendingOperationsResultEvent != null) { _instance.OnInsightsGetPendingOperationsResultEvent((InsightsModels.InsightsGetPendingOperationsResponse)e.Result); return; } } + if (type == typeof(InsightsModels.InsightsOperationResponse)) { if (_instance.OnInsightsSetPerformanceResultEvent != null) { _instance.OnInsightsSetPerformanceResultEvent((InsightsModels.InsightsOperationResponse)e.Result); return; } } + if (type == typeof(InsightsModels.InsightsOperationResponse)) { if (_instance.OnInsightsSetStorageRetentionResultEvent != null) { _instance.OnInsightsSetStorageRetentionResultEvent((InsightsModels.InsightsOperationResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsAcceptGroupApplicationResultEvent != null) { _instance.OnGroupsAcceptGroupApplicationResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsAcceptGroupInvitationResultEvent != null) { _instance.OnGroupsAcceptGroupInvitationResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsAddMembersResultEvent != null) { _instance.OnGroupsAddMembersResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.ApplyToGroupResponse)) { if (_instance.OnGroupsApplyToGroupResultEvent != null) { _instance.OnGroupsApplyToGroupResultEvent((GroupsModels.ApplyToGroupResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsBlockEntityResultEvent != null) { _instance.OnGroupsBlockEntityResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsChangeMemberRoleResultEvent != null) { _instance.OnGroupsChangeMemberRoleResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.CreateGroupResponse)) { if (_instance.OnGroupsCreateGroupResultEvent != null) { _instance.OnGroupsCreateGroupResultEvent((GroupsModels.CreateGroupResponse)e.Result); return; } } + if (type == typeof(GroupsModels.CreateGroupRoleResponse)) { if (_instance.OnGroupsCreateRoleResultEvent != null) { _instance.OnGroupsCreateRoleResultEvent((GroupsModels.CreateGroupRoleResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsDeleteGroupResultEvent != null) { _instance.OnGroupsDeleteGroupResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsDeleteRoleResultEvent != null) { _instance.OnGroupsDeleteRoleResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.GetGroupResponse)) { if (_instance.OnGroupsGetGroupResultEvent != null) { _instance.OnGroupsGetGroupResultEvent((GroupsModels.GetGroupResponse)e.Result); return; } } + if (type == typeof(GroupsModels.InviteToGroupResponse)) { if (_instance.OnGroupsInviteToGroupResultEvent != null) { _instance.OnGroupsInviteToGroupResultEvent((GroupsModels.InviteToGroupResponse)e.Result); return; } } + if (type == typeof(GroupsModels.IsMemberResponse)) { if (_instance.OnGroupsIsMemberResultEvent != null) { _instance.OnGroupsIsMemberResultEvent((GroupsModels.IsMemberResponse)e.Result); return; } } + if (type == typeof(GroupsModels.ListGroupApplicationsResponse)) { if (_instance.OnGroupsListGroupApplicationsResultEvent != null) { _instance.OnGroupsListGroupApplicationsResultEvent((GroupsModels.ListGroupApplicationsResponse)e.Result); return; } } + if (type == typeof(GroupsModels.ListGroupBlocksResponse)) { if (_instance.OnGroupsListGroupBlocksResultEvent != null) { _instance.OnGroupsListGroupBlocksResultEvent((GroupsModels.ListGroupBlocksResponse)e.Result); return; } } + if (type == typeof(GroupsModels.ListGroupInvitationsResponse)) { if (_instance.OnGroupsListGroupInvitationsResultEvent != null) { _instance.OnGroupsListGroupInvitationsResultEvent((GroupsModels.ListGroupInvitationsResponse)e.Result); return; } } + if (type == typeof(GroupsModels.ListGroupMembersResponse)) { if (_instance.OnGroupsListGroupMembersResultEvent != null) { _instance.OnGroupsListGroupMembersResultEvent((GroupsModels.ListGroupMembersResponse)e.Result); return; } } + if (type == typeof(GroupsModels.ListMembershipResponse)) { if (_instance.OnGroupsListMembershipResultEvent != null) { _instance.OnGroupsListMembershipResultEvent((GroupsModels.ListMembershipResponse)e.Result); return; } } + if (type == typeof(GroupsModels.ListMembershipOpportunitiesResponse)) { if (_instance.OnGroupsListMembershipOpportunitiesResultEvent != null) { _instance.OnGroupsListMembershipOpportunitiesResultEvent((GroupsModels.ListMembershipOpportunitiesResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsRemoveGroupApplicationResultEvent != null) { _instance.OnGroupsRemoveGroupApplicationResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsRemoveGroupInvitationResultEvent != null) { _instance.OnGroupsRemoveGroupInvitationResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsRemoveMembersResultEvent != null) { _instance.OnGroupsRemoveMembersResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.EmptyResponse)) { if (_instance.OnGroupsUnblockEntityResultEvent != null) { _instance.OnGroupsUnblockEntityResultEvent((GroupsModels.EmptyResponse)e.Result); return; } } + if (type == typeof(GroupsModels.UpdateGroupResponse)) { if (_instance.OnGroupsUpdateGroupResultEvent != null) { _instance.OnGroupsUpdateGroupResultEvent((GroupsModels.UpdateGroupResponse)e.Result); return; } } + if (type == typeof(GroupsModels.UpdateGroupRoleResponse)) { if (_instance.OnGroupsUpdateRoleResultEvent != null) { _instance.OnGroupsUpdateRoleResultEvent((GroupsModels.UpdateGroupRoleResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(ProgressionModels.EmptyResponse)) { if (_instance.OnProgressionCreateLeaderboardDefinitionResultEvent != null) { _instance.OnProgressionCreateLeaderboardDefinitionResultEvent((ProgressionModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.EmptyResponse)) { if (_instance.OnProgressionCreateStatisticDefinitionResultEvent != null) { _instance.OnProgressionCreateStatisticDefinitionResultEvent((ProgressionModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.EmptyResponse)) { if (_instance.OnProgressionDeleteLeaderboardDefinitionResultEvent != null) { _instance.OnProgressionDeleteLeaderboardDefinitionResultEvent((ProgressionModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.EmptyResponse)) { if (_instance.OnProgressionDeleteLeaderboardEntriesResultEvent != null) { _instance.OnProgressionDeleteLeaderboardEntriesResultEvent((ProgressionModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.EmptyResponse)) { if (_instance.OnProgressionDeleteStatisticDefinitionResultEvent != null) { _instance.OnProgressionDeleteStatisticDefinitionResultEvent((ProgressionModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.DeleteStatisticsResponse)) { if (_instance.OnProgressionDeleteStatisticsResultEvent != null) { _instance.OnProgressionDeleteStatisticsResultEvent((ProgressionModels.DeleteStatisticsResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetEntityLeaderboardResponse)) { if (_instance.OnProgressionGetFriendLeaderboardForEntityResultEvent != null) { _instance.OnProgressionGetFriendLeaderboardForEntityResultEvent((ProgressionModels.GetEntityLeaderboardResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetEntityLeaderboardResponse)) { if (_instance.OnProgressionGetLeaderboardResultEvent != null) { _instance.OnProgressionGetLeaderboardResultEvent((ProgressionModels.GetEntityLeaderboardResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetEntityLeaderboardResponse)) { if (_instance.OnProgressionGetLeaderboardAroundEntityResultEvent != null) { _instance.OnProgressionGetLeaderboardAroundEntityResultEvent((ProgressionModels.GetEntityLeaderboardResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetLeaderboardDefinitionResponse)) { if (_instance.OnProgressionGetLeaderboardDefinitionResultEvent != null) { _instance.OnProgressionGetLeaderboardDefinitionResultEvent((ProgressionModels.GetLeaderboardDefinitionResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetEntityLeaderboardResponse)) { if (_instance.OnProgressionGetLeaderboardForEntitiesResultEvent != null) { _instance.OnProgressionGetLeaderboardForEntitiesResultEvent((ProgressionModels.GetEntityLeaderboardResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetStatisticDefinitionResponse)) { if (_instance.OnProgressionGetStatisticDefinitionResultEvent != null) { _instance.OnProgressionGetStatisticDefinitionResultEvent((ProgressionModels.GetStatisticDefinitionResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetStatisticsResponse)) { if (_instance.OnProgressionGetStatisticsResultEvent != null) { _instance.OnProgressionGetStatisticsResultEvent((ProgressionModels.GetStatisticsResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.GetStatisticsForEntitiesResponse)) { if (_instance.OnProgressionGetStatisticsForEntitiesResultEvent != null) { _instance.OnProgressionGetStatisticsForEntitiesResultEvent((ProgressionModels.GetStatisticsForEntitiesResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.IncrementLeaderboardVersionResponse)) { if (_instance.OnProgressionIncrementLeaderboardVersionResultEvent != null) { _instance.OnProgressionIncrementLeaderboardVersionResultEvent((ProgressionModels.IncrementLeaderboardVersionResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.IncrementStatisticVersionResponse)) { if (_instance.OnProgressionIncrementStatisticVersionResultEvent != null) { _instance.OnProgressionIncrementStatisticVersionResultEvent((ProgressionModels.IncrementStatisticVersionResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.ListLeaderboardDefinitionsResponse)) { if (_instance.OnProgressionListLeaderboardDefinitionsResultEvent != null) { _instance.OnProgressionListLeaderboardDefinitionsResultEvent((ProgressionModels.ListLeaderboardDefinitionsResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.ListStatisticDefinitionsResponse)) { if (_instance.OnProgressionListStatisticDefinitionsResultEvent != null) { _instance.OnProgressionListStatisticDefinitionsResultEvent((ProgressionModels.ListStatisticDefinitionsResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.EmptyResponse)) { if (_instance.OnProgressionUnlinkLeaderboardFromStatisticResultEvent != null) { _instance.OnProgressionUnlinkLeaderboardFromStatisticResultEvent((ProgressionModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.EmptyResponse)) { if (_instance.OnProgressionUpdateLeaderboardEntriesResultEvent != null) { _instance.OnProgressionUpdateLeaderboardEntriesResultEvent((ProgressionModels.EmptyResponse)e.Result); return; } } + if (type == typeof(ProgressionModels.UpdateStatisticsResponse)) { if (_instance.OnProgressionUpdateStatisticsResultEvent != null) { _instance.OnProgressionUpdateStatisticsResultEvent((ProgressionModels.UpdateStatisticsResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(LocalizationModels.GetLanguageListResponse)) { if (_instance.OnLocalizationGetLanguageListResultEvent != null) { _instance.OnLocalizationGetLanguageListResultEvent((LocalizationModels.GetLanguageListResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(MultiplayerModels.CancelAllMatchmakingTicketsForPlayerResult)) { if (_instance.OnMultiplayerCancelAllMatchmakingTicketsForPlayerResultEvent != null) { _instance.OnMultiplayerCancelAllMatchmakingTicketsForPlayerResultEvent((MultiplayerModels.CancelAllMatchmakingTicketsForPlayerResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.CancelAllServerBackfillTicketsForPlayerResult)) { if (_instance.OnMultiplayerCancelAllServerBackfillTicketsForPlayerResultEvent != null) { _instance.OnMultiplayerCancelAllServerBackfillTicketsForPlayerResultEvent((MultiplayerModels.CancelAllServerBackfillTicketsForPlayerResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.CancelMatchmakingTicketResult)) { if (_instance.OnMultiplayerCancelMatchmakingTicketResultEvent != null) { _instance.OnMultiplayerCancelMatchmakingTicketResultEvent((MultiplayerModels.CancelMatchmakingTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.CancelServerBackfillTicketResult)) { if (_instance.OnMultiplayerCancelServerBackfillTicketResultEvent != null) { _instance.OnMultiplayerCancelServerBackfillTicketResultEvent((MultiplayerModels.CancelServerBackfillTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.BuildAliasDetailsResponse)) { if (_instance.OnMultiplayerCreateBuildAliasResultEvent != null) { _instance.OnMultiplayerCreateBuildAliasResultEvent((MultiplayerModels.BuildAliasDetailsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateBuildWithCustomContainerResponse)) { if (_instance.OnMultiplayerCreateBuildWithCustomContainerResultEvent != null) { _instance.OnMultiplayerCreateBuildWithCustomContainerResultEvent((MultiplayerModels.CreateBuildWithCustomContainerResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateBuildWithManagedContainerResponse)) { if (_instance.OnMultiplayerCreateBuildWithManagedContainerResultEvent != null) { _instance.OnMultiplayerCreateBuildWithManagedContainerResultEvent((MultiplayerModels.CreateBuildWithManagedContainerResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateBuildWithProcessBasedServerResponse)) { if (_instance.OnMultiplayerCreateBuildWithProcessBasedServerResultEvent != null) { _instance.OnMultiplayerCreateBuildWithProcessBasedServerResultEvent((MultiplayerModels.CreateBuildWithProcessBasedServerResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateLobbyResult)) { if (_instance.OnMultiplayerCreateLobbyResultEvent != null) { _instance.OnMultiplayerCreateLobbyResultEvent((MultiplayerModels.CreateLobbyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateMatchmakingTicketResult)) { if (_instance.OnMultiplayerCreateMatchmakingTicketResultEvent != null) { _instance.OnMultiplayerCreateMatchmakingTicketResultEvent((MultiplayerModels.CreateMatchmakingTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateRemoteUserResponse)) { if (_instance.OnMultiplayerCreateRemoteUserResultEvent != null) { _instance.OnMultiplayerCreateRemoteUserResultEvent((MultiplayerModels.CreateRemoteUserResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateServerBackfillTicketResult)) { if (_instance.OnMultiplayerCreateServerBackfillTicketResultEvent != null) { _instance.OnMultiplayerCreateServerBackfillTicketResultEvent((MultiplayerModels.CreateServerBackfillTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateMatchmakingTicketResult)) { if (_instance.OnMultiplayerCreateServerMatchmakingTicketResultEvent != null) { _instance.OnMultiplayerCreateServerMatchmakingTicketResultEvent((MultiplayerModels.CreateMatchmakingTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.CreateTitleMultiplayerServersQuotaChangeResponse)) { if (_instance.OnMultiplayerCreateTitleMultiplayerServersQuotaChangeResultEvent != null) { _instance.OnMultiplayerCreateTitleMultiplayerServersQuotaChangeResultEvent((MultiplayerModels.CreateTitleMultiplayerServersQuotaChangeResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteAssetResultEvent != null) { _instance.OnMultiplayerDeleteAssetResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteBuildResultEvent != null) { _instance.OnMultiplayerDeleteBuildResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteBuildAliasResultEvent != null) { _instance.OnMultiplayerDeleteBuildAliasResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteBuildRegionResultEvent != null) { _instance.OnMultiplayerDeleteBuildRegionResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteCertificateResultEvent != null) { _instance.OnMultiplayerDeleteCertificateResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteContainerImageRepositoryResultEvent != null) { _instance.OnMultiplayerDeleteContainerImageRepositoryResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerDeleteLobbyResultEvent != null) { _instance.OnMultiplayerDeleteLobbyResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteRemoteUserResultEvent != null) { _instance.OnMultiplayerDeleteRemoteUserResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerDeleteSecretResultEvent != null) { _instance.OnMultiplayerDeleteSecretResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EnableMultiplayerServersForTitleResponse)) { if (_instance.OnMultiplayerEnableMultiplayerServersForTitleResultEvent != null) { _instance.OnMultiplayerEnableMultiplayerServersForTitleResultEvent((MultiplayerModels.EnableMultiplayerServersForTitleResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.FindFriendLobbiesResult)) { if (_instance.OnMultiplayerFindFriendLobbiesResultEvent != null) { _instance.OnMultiplayerFindFriendLobbiesResultEvent((MultiplayerModels.FindFriendLobbiesResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.FindLobbiesResult)) { if (_instance.OnMultiplayerFindLobbiesResultEvent != null) { _instance.OnMultiplayerFindLobbiesResultEvent((MultiplayerModels.FindLobbiesResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetAssetDownloadUrlResponse)) { if (_instance.OnMultiplayerGetAssetDownloadUrlResultEvent != null) { _instance.OnMultiplayerGetAssetDownloadUrlResultEvent((MultiplayerModels.GetAssetDownloadUrlResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetAssetUploadUrlResponse)) { if (_instance.OnMultiplayerGetAssetUploadUrlResultEvent != null) { _instance.OnMultiplayerGetAssetUploadUrlResultEvent((MultiplayerModels.GetAssetUploadUrlResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetBuildResponse)) { if (_instance.OnMultiplayerGetBuildResultEvent != null) { _instance.OnMultiplayerGetBuildResultEvent((MultiplayerModels.GetBuildResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.BuildAliasDetailsResponse)) { if (_instance.OnMultiplayerGetBuildAliasResultEvent != null) { _instance.OnMultiplayerGetBuildAliasResultEvent((MultiplayerModels.BuildAliasDetailsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetContainerRegistryCredentialsResponse)) { if (_instance.OnMultiplayerGetContainerRegistryCredentialsResultEvent != null) { _instance.OnMultiplayerGetContainerRegistryCredentialsResultEvent((MultiplayerModels.GetContainerRegistryCredentialsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetLobbyResult)) { if (_instance.OnMultiplayerGetLobbyResultEvent != null) { _instance.OnMultiplayerGetLobbyResultEvent((MultiplayerModels.GetLobbyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetMatchResult)) { if (_instance.OnMultiplayerGetMatchResultEvent != null) { _instance.OnMultiplayerGetMatchResultEvent((MultiplayerModels.GetMatchResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetMatchmakingQueueResult)) { if (_instance.OnMultiplayerGetMatchmakingQueueResultEvent != null) { _instance.OnMultiplayerGetMatchmakingQueueResultEvent((MultiplayerModels.GetMatchmakingQueueResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetMatchmakingTicketResult)) { if (_instance.OnMultiplayerGetMatchmakingTicketResultEvent != null) { _instance.OnMultiplayerGetMatchmakingTicketResultEvent((MultiplayerModels.GetMatchmakingTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetMultiplayerServerDetailsResponse)) { if (_instance.OnMultiplayerGetMultiplayerServerDetailsResultEvent != null) { _instance.OnMultiplayerGetMultiplayerServerDetailsResultEvent((MultiplayerModels.GetMultiplayerServerDetailsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetMultiplayerServerLogsResponse)) { if (_instance.OnMultiplayerGetMultiplayerServerLogsResultEvent != null) { _instance.OnMultiplayerGetMultiplayerServerLogsResultEvent((MultiplayerModels.GetMultiplayerServerLogsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetMultiplayerServerLogsResponse)) { if (_instance.OnMultiplayerGetMultiplayerSessionLogsBySessionIdResultEvent != null) { _instance.OnMultiplayerGetMultiplayerSessionLogsBySessionIdResultEvent((MultiplayerModels.GetMultiplayerServerLogsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetQueueStatisticsResult)) { if (_instance.OnMultiplayerGetQueueStatisticsResultEvent != null) { _instance.OnMultiplayerGetQueueStatisticsResultEvent((MultiplayerModels.GetQueueStatisticsResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetRemoteLoginEndpointResponse)) { if (_instance.OnMultiplayerGetRemoteLoginEndpointResultEvent != null) { _instance.OnMultiplayerGetRemoteLoginEndpointResultEvent((MultiplayerModels.GetRemoteLoginEndpointResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetServerBackfillTicketResult)) { if (_instance.OnMultiplayerGetServerBackfillTicketResultEvent != null) { _instance.OnMultiplayerGetServerBackfillTicketResultEvent((MultiplayerModels.GetServerBackfillTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetTitleEnabledForMultiplayerServersStatusResponse)) { if (_instance.OnMultiplayerGetTitleEnabledForMultiplayerServersStatusResultEvent != null) { _instance.OnMultiplayerGetTitleEnabledForMultiplayerServersStatusResultEvent((MultiplayerModels.GetTitleEnabledForMultiplayerServersStatusResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetTitleMultiplayerServersQuotaChangeResponse)) { if (_instance.OnMultiplayerGetTitleMultiplayerServersQuotaChangeResultEvent != null) { _instance.OnMultiplayerGetTitleMultiplayerServersQuotaChangeResultEvent((MultiplayerModels.GetTitleMultiplayerServersQuotaChangeResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.GetTitleMultiplayerServersQuotasResponse)) { if (_instance.OnMultiplayerGetTitleMultiplayerServersQuotasResultEvent != null) { _instance.OnMultiplayerGetTitleMultiplayerServersQuotasResultEvent((MultiplayerModels.GetTitleMultiplayerServersQuotasResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerInviteToLobbyResultEvent != null) { _instance.OnMultiplayerInviteToLobbyResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.JoinLobbyResult)) { if (_instance.OnMultiplayerJoinArrangedLobbyResultEvent != null) { _instance.OnMultiplayerJoinArrangedLobbyResultEvent((MultiplayerModels.JoinLobbyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.JoinLobbyResult)) { if (_instance.OnMultiplayerJoinLobbyResultEvent != null) { _instance.OnMultiplayerJoinLobbyResultEvent((MultiplayerModels.JoinLobbyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.JoinLobbyAsServerResult)) { if (_instance.OnMultiplayerJoinLobbyAsServerResultEvent != null) { _instance.OnMultiplayerJoinLobbyAsServerResultEvent((MultiplayerModels.JoinLobbyAsServerResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.JoinMatchmakingTicketResult)) { if (_instance.OnMultiplayerJoinMatchmakingTicketResultEvent != null) { _instance.OnMultiplayerJoinMatchmakingTicketResultEvent((MultiplayerModels.JoinMatchmakingTicketResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerLeaveLobbyResultEvent != null) { _instance.OnMultiplayerLeaveLobbyResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerLeaveLobbyAsServerResultEvent != null) { _instance.OnMultiplayerLeaveLobbyAsServerResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListMultiplayerServersResponse)) { if (_instance.OnMultiplayerListArchivedMultiplayerServersResultEvent != null) { _instance.OnMultiplayerListArchivedMultiplayerServersResultEvent((MultiplayerModels.ListMultiplayerServersResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListAssetSummariesResponse)) { if (_instance.OnMultiplayerListAssetSummariesResultEvent != null) { _instance.OnMultiplayerListAssetSummariesResultEvent((MultiplayerModels.ListAssetSummariesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListBuildAliasesResponse)) { if (_instance.OnMultiplayerListBuildAliasesResultEvent != null) { _instance.OnMultiplayerListBuildAliasesResultEvent((MultiplayerModels.ListBuildAliasesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListBuildSummariesResponse)) { if (_instance.OnMultiplayerListBuildSummariesV2ResultEvent != null) { _instance.OnMultiplayerListBuildSummariesV2ResultEvent((MultiplayerModels.ListBuildSummariesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListCertificateSummariesResponse)) { if (_instance.OnMultiplayerListCertificateSummariesResultEvent != null) { _instance.OnMultiplayerListCertificateSummariesResultEvent((MultiplayerModels.ListCertificateSummariesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListContainerImagesResponse)) { if (_instance.OnMultiplayerListContainerImagesResultEvent != null) { _instance.OnMultiplayerListContainerImagesResultEvent((MultiplayerModels.ListContainerImagesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListContainerImageTagsResponse)) { if (_instance.OnMultiplayerListContainerImageTagsResultEvent != null) { _instance.OnMultiplayerListContainerImageTagsResultEvent((MultiplayerModels.ListContainerImageTagsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListMatchmakingQueuesResult)) { if (_instance.OnMultiplayerListMatchmakingQueuesResultEvent != null) { _instance.OnMultiplayerListMatchmakingQueuesResultEvent((MultiplayerModels.ListMatchmakingQueuesResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListMatchmakingTicketsForPlayerResult)) { if (_instance.OnMultiplayerListMatchmakingTicketsForPlayerResultEvent != null) { _instance.OnMultiplayerListMatchmakingTicketsForPlayerResultEvent((MultiplayerModels.ListMatchmakingTicketsForPlayerResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListMultiplayerServersResponse)) { if (_instance.OnMultiplayerListMultiplayerServersResultEvent != null) { _instance.OnMultiplayerListMultiplayerServersResultEvent((MultiplayerModels.ListMultiplayerServersResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListPartyQosServersResponse)) { if (_instance.OnMultiplayerListPartyQosServersResultEvent != null) { _instance.OnMultiplayerListPartyQosServersResultEvent((MultiplayerModels.ListPartyQosServersResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListQosServersForTitleResponse)) { if (_instance.OnMultiplayerListQosServersForTitleResultEvent != null) { _instance.OnMultiplayerListQosServersForTitleResultEvent((MultiplayerModels.ListQosServersForTitleResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListSecretSummariesResponse)) { if (_instance.OnMultiplayerListSecretSummariesResultEvent != null) { _instance.OnMultiplayerListSecretSummariesResultEvent((MultiplayerModels.ListSecretSummariesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListServerBackfillTicketsForPlayerResult)) { if (_instance.OnMultiplayerListServerBackfillTicketsForPlayerResultEvent != null) { _instance.OnMultiplayerListServerBackfillTicketsForPlayerResultEvent((MultiplayerModels.ListServerBackfillTicketsForPlayerResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListTitleMultiplayerServersQuotaChangesResponse)) { if (_instance.OnMultiplayerListTitleMultiplayerServersQuotaChangesResultEvent != null) { _instance.OnMultiplayerListTitleMultiplayerServersQuotaChangesResultEvent((MultiplayerModels.ListTitleMultiplayerServersQuotaChangesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.ListVirtualMachineSummariesResponse)) { if (_instance.OnMultiplayerListVirtualMachineSummariesResultEvent != null) { _instance.OnMultiplayerListVirtualMachineSummariesResultEvent((MultiplayerModels.ListVirtualMachineSummariesResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.RemoveMatchmakingQueueResult)) { if (_instance.OnMultiplayerRemoveMatchmakingQueueResultEvent != null) { _instance.OnMultiplayerRemoveMatchmakingQueueResultEvent((MultiplayerModels.RemoveMatchmakingQueueResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerRemoveMemberResultEvent != null) { _instance.OnMultiplayerRemoveMemberResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.RequestMultiplayerServerResponse)) { if (_instance.OnMultiplayerRequestMultiplayerServerResultEvent != null) { _instance.OnMultiplayerRequestMultiplayerServerResultEvent((MultiplayerModels.RequestMultiplayerServerResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.RequestPartyServiceResponse)) { if (_instance.OnMultiplayerRequestPartyServiceResultEvent != null) { _instance.OnMultiplayerRequestPartyServiceResultEvent((MultiplayerModels.RequestPartyServiceResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.RolloverContainerRegistryCredentialsResponse)) { if (_instance.OnMultiplayerRolloverContainerRegistryCredentialsResultEvent != null) { _instance.OnMultiplayerRolloverContainerRegistryCredentialsResultEvent((MultiplayerModels.RolloverContainerRegistryCredentialsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.SetMatchmakingQueueResult)) { if (_instance.OnMultiplayerSetMatchmakingQueueResultEvent != null) { _instance.OnMultiplayerSetMatchmakingQueueResultEvent((MultiplayerModels.SetMatchmakingQueueResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerShutdownMultiplayerServerResultEvent != null) { _instance.OnMultiplayerShutdownMultiplayerServerResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.SubscribeToLobbyResourceResult)) { if (_instance.OnMultiplayerSubscribeToLobbyResourceResultEvent != null) { _instance.OnMultiplayerSubscribeToLobbyResourceResultEvent((MultiplayerModels.SubscribeToLobbyResourceResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.SubscribeToMatchResourceResult)) { if (_instance.OnMultiplayerSubscribeToMatchmakingResourceResultEvent != null) { _instance.OnMultiplayerSubscribeToMatchmakingResourceResultEvent((MultiplayerModels.SubscribeToMatchResourceResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerUnsubscribeFromLobbyResourceResultEvent != null) { _instance.OnMultiplayerUnsubscribeFromLobbyResourceResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.UnsubscribeFromMatchResourceResult)) { if (_instance.OnMultiplayerUnsubscribeFromMatchmakingResourceResultEvent != null) { _instance.OnMultiplayerUnsubscribeFromMatchmakingResourceResultEvent((MultiplayerModels.UnsubscribeFromMatchResourceResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerUntagContainerImageResultEvent != null) { _instance.OnMultiplayerUntagContainerImageResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.BuildAliasDetailsResponse)) { if (_instance.OnMultiplayerUpdateBuildAliasResultEvent != null) { _instance.OnMultiplayerUpdateBuildAliasResultEvent((MultiplayerModels.BuildAliasDetailsResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerUpdateBuildNameResultEvent != null) { _instance.OnMultiplayerUpdateBuildNameResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerUpdateBuildRegionResultEvent != null) { _instance.OnMultiplayerUpdateBuildRegionResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerUpdateBuildRegionsResultEvent != null) { _instance.OnMultiplayerUpdateBuildRegionsResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerUpdateLobbyResultEvent != null) { _instance.OnMultiplayerUpdateLobbyResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.LobbyEmptyResult)) { if (_instance.OnMultiplayerUpdateLobbyAsServerResultEvent != null) { _instance.OnMultiplayerUpdateLobbyAsServerResultEvent((MultiplayerModels.LobbyEmptyResult)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerUploadCertificateResultEvent != null) { _instance.OnMultiplayerUploadCertificateResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } + if (type == typeof(MultiplayerModels.EmptyResponse)) { if (_instance.OnMultiplayerUploadSecretResultEvent != null) { _instance.OnMultiplayerUploadSecretResultEvent((MultiplayerModels.EmptyResponse)e.Result); return; } } +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(ProfilesModels.GetGlobalPolicyResponse)) { if (_instance.OnProfilesGetGlobalPolicyResultEvent != null) { _instance.OnProfilesGetGlobalPolicyResultEvent((ProfilesModels.GetGlobalPolicyResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.GetEntityProfileResponse)) { if (_instance.OnProfilesGetProfileResultEvent != null) { _instance.OnProfilesGetProfileResultEvent((ProfilesModels.GetEntityProfileResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.GetEntityProfilesResponse)) { if (_instance.OnProfilesGetProfilesResultEvent != null) { _instance.OnProfilesGetProfilesResultEvent((ProfilesModels.GetEntityProfilesResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.GetTitlePlayersFromMasterPlayerAccountIdsResponse)) { if (_instance.OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsResultEvent != null) { _instance.OnProfilesGetTitlePlayersFromMasterPlayerAccountIdsResultEvent((ProfilesModels.GetTitlePlayersFromMasterPlayerAccountIdsResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.GetTitlePlayersFromProviderIDsResponse)) { if (_instance.OnProfilesGetTitlePlayersFromXboxLiveIDsResultEvent != null) { _instance.OnProfilesGetTitlePlayersFromXboxLiveIDsResultEvent((ProfilesModels.GetTitlePlayersFromProviderIDsResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.SetDisplayNameResponse)) { if (_instance.OnProfilesSetDisplayNameResultEvent != null) { _instance.OnProfilesSetDisplayNameResultEvent((ProfilesModels.SetDisplayNameResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.SetGlobalPolicyResponse)) { if (_instance.OnProfilesSetGlobalPolicyResultEvent != null) { _instance.OnProfilesSetGlobalPolicyResultEvent((ProfilesModels.SetGlobalPolicyResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.SetProfileLanguageResponse)) { if (_instance.OnProfilesSetProfileLanguageResultEvent != null) { _instance.OnProfilesSetProfileLanguageResultEvent((ProfilesModels.SetProfileLanguageResponse)e.Result); return; } } + if (type == typeof(ProfilesModels.SetEntityProfilePolicyResponse)) { if (_instance.OnProfilesSetProfilePolicyResultEvent != null) { _instance.OnProfilesSetProfilePolicyResultEvent((ProfilesModels.SetEntityProfilePolicyResponse)e.Result); return; } } +#endif +#if ENABLE_PLAYFABSERVER_API + +#endif +#if !DISABLE_PLAYFABENTITY_API + + if (type == typeof(AddonModels.CreateOrUpdateAppleResponse)) { if (_instance.OnAddonCreateOrUpdateAppleResultEvent != null) { _instance.OnAddonCreateOrUpdateAppleResultEvent((AddonModels.CreateOrUpdateAppleResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdateFacebookResponse)) { if (_instance.OnAddonCreateOrUpdateFacebookResultEvent != null) { _instance.OnAddonCreateOrUpdateFacebookResultEvent((AddonModels.CreateOrUpdateFacebookResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdateFacebookInstantGamesResponse)) { if (_instance.OnAddonCreateOrUpdateFacebookInstantGamesResultEvent != null) { _instance.OnAddonCreateOrUpdateFacebookInstantGamesResultEvent((AddonModels.CreateOrUpdateFacebookInstantGamesResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdateGoogleResponse)) { if (_instance.OnAddonCreateOrUpdateGoogleResultEvent != null) { _instance.OnAddonCreateOrUpdateGoogleResultEvent((AddonModels.CreateOrUpdateGoogleResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdateKongregateResponse)) { if (_instance.OnAddonCreateOrUpdateKongregateResultEvent != null) { _instance.OnAddonCreateOrUpdateKongregateResultEvent((AddonModels.CreateOrUpdateKongregateResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdateNintendoResponse)) { if (_instance.OnAddonCreateOrUpdateNintendoResultEvent != null) { _instance.OnAddonCreateOrUpdateNintendoResultEvent((AddonModels.CreateOrUpdateNintendoResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdatePSNResponse)) { if (_instance.OnAddonCreateOrUpdatePSNResultEvent != null) { _instance.OnAddonCreateOrUpdatePSNResultEvent((AddonModels.CreateOrUpdatePSNResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdateSteamResponse)) { if (_instance.OnAddonCreateOrUpdateSteamResultEvent != null) { _instance.OnAddonCreateOrUpdateSteamResultEvent((AddonModels.CreateOrUpdateSteamResponse)e.Result); return; } } + if (type == typeof(AddonModels.CreateOrUpdateTwitchResponse)) { if (_instance.OnAddonCreateOrUpdateTwitchResultEvent != null) { _instance.OnAddonCreateOrUpdateTwitchResultEvent((AddonModels.CreateOrUpdateTwitchResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteAppleResponse)) { if (_instance.OnAddonDeleteAppleResultEvent != null) { _instance.OnAddonDeleteAppleResultEvent((AddonModels.DeleteAppleResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteFacebookResponse)) { if (_instance.OnAddonDeleteFacebookResultEvent != null) { _instance.OnAddonDeleteFacebookResultEvent((AddonModels.DeleteFacebookResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteFacebookInstantGamesResponse)) { if (_instance.OnAddonDeleteFacebookInstantGamesResultEvent != null) { _instance.OnAddonDeleteFacebookInstantGamesResultEvent((AddonModels.DeleteFacebookInstantGamesResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteGoogleResponse)) { if (_instance.OnAddonDeleteGoogleResultEvent != null) { _instance.OnAddonDeleteGoogleResultEvent((AddonModels.DeleteGoogleResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteKongregateResponse)) { if (_instance.OnAddonDeleteKongregateResultEvent != null) { _instance.OnAddonDeleteKongregateResultEvent((AddonModels.DeleteKongregateResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteNintendoResponse)) { if (_instance.OnAddonDeleteNintendoResultEvent != null) { _instance.OnAddonDeleteNintendoResultEvent((AddonModels.DeleteNintendoResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeletePSNResponse)) { if (_instance.OnAddonDeletePSNResultEvent != null) { _instance.OnAddonDeletePSNResultEvent((AddonModels.DeletePSNResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteSteamResponse)) { if (_instance.OnAddonDeleteSteamResultEvent != null) { _instance.OnAddonDeleteSteamResultEvent((AddonModels.DeleteSteamResponse)e.Result); return; } } + if (type == typeof(AddonModels.DeleteTwitchResponse)) { if (_instance.OnAddonDeleteTwitchResultEvent != null) { _instance.OnAddonDeleteTwitchResultEvent((AddonModels.DeleteTwitchResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetAppleResponse)) { if (_instance.OnAddonGetAppleResultEvent != null) { _instance.OnAddonGetAppleResultEvent((AddonModels.GetAppleResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetFacebookResponse)) { if (_instance.OnAddonGetFacebookResultEvent != null) { _instance.OnAddonGetFacebookResultEvent((AddonModels.GetFacebookResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetFacebookInstantGamesResponse)) { if (_instance.OnAddonGetFacebookInstantGamesResultEvent != null) { _instance.OnAddonGetFacebookInstantGamesResultEvent((AddonModels.GetFacebookInstantGamesResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetGoogleResponse)) { if (_instance.OnAddonGetGoogleResultEvent != null) { _instance.OnAddonGetGoogleResultEvent((AddonModels.GetGoogleResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetKongregateResponse)) { if (_instance.OnAddonGetKongregateResultEvent != null) { _instance.OnAddonGetKongregateResultEvent((AddonModels.GetKongregateResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetNintendoResponse)) { if (_instance.OnAddonGetNintendoResultEvent != null) { _instance.OnAddonGetNintendoResultEvent((AddonModels.GetNintendoResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetPSNResponse)) { if (_instance.OnAddonGetPSNResultEvent != null) { _instance.OnAddonGetPSNResultEvent((AddonModels.GetPSNResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetSteamResponse)) { if (_instance.OnAddonGetSteamResultEvent != null) { _instance.OnAddonGetSteamResultEvent((AddonModels.GetSteamResponse)e.Result); return; } } + if (type == typeof(AddonModels.GetTwitchResponse)) { if (_instance.OnAddonGetTwitchResultEvent != null) { _instance.OnAddonGetTwitchResultEvent((AddonModels.GetTwitchResponse)e.Result); return; } } +#endif + + } + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabEvents.cs.meta b/Assets/PlayFabSDK/Shared/Public/PlayFabEvents.cs.meta new file mode 100644 index 00000000..1eedf00a --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 059603d7e53649849b7f08d3b99af79c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabLogger.cs b/Assets/PlayFabSDK/Shared/Public/PlayFabLogger.cs new file mode 100644 index 00000000..d0d23f0e --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabLogger.cs @@ -0,0 +1,270 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Net; +using System.Text; +using System.Threading; +using PlayFab.Internal; +using UnityEngine; + +namespace PlayFab.Public +{ +#if !UNITY_WSA && !UNITY_WP8 && !NETFX_CORE + public interface IPlayFabLogger + { + IPAddress ip { get; set; } + int port { get; set; } + string url { get; set; } + + // Unity MonoBehaviour callbacks + void OnEnable(); + void OnDisable(); + void OnDestroy(); + } + + /// + /// This is some unity-log capturing logic, and threading tools that allow logging to be caught and processed on another thread + /// + public abstract class PlayFabLoggerBase : IPlayFabLogger + { + private static readonly StringBuilder Sb = new StringBuilder(); + private readonly Queue LogMessageQueue = new Queue(); + private const int LOG_CACHE_INTERVAL_MS = 10000; + + private Thread _writeLogThread; + private readonly object _threadLock = new object(); + private static readonly TimeSpan _threadKillTimeout = TimeSpan.FromSeconds(60); + private DateTime _threadKillTime = DateTime.UtcNow + _threadKillTimeout; // Kill the thread after 1 minute of inactivity + private bool _isApplicationPlaying = true; + private int _pendingLogsCount; + + public IPAddress ip { get; set; } + public int port { get; set; } + public string url { get; set; } + + protected PlayFabLoggerBase() + { + var gatherer = new PlayFabDataGatherer(); + var message = gatherer.GenerateReport(); + lock (LogMessageQueue) + { + LogMessageQueue.Enqueue(message); + } + } + + public virtual void OnEnable() + { + PlayFabHttp.instance.StartCoroutine(RegisterLogger()); // Coroutine helper to set up log-callbacks + } + + private IEnumerator RegisterLogger() + { + yield return new WaitForEndOfFrame(); // Effectively just a short wait before activating this registration + if (!string.IsNullOrEmpty(PlayFabSettings.LoggerHost)) + { +#if UNITY_5 || UNITY_5_3_OR_NEWER + Application.logMessageReceivedThreaded += HandleUnityLog; +#else + Application.RegisterLogCallback(HandleUnityLog); +#endif + } + } + + public virtual void OnDisable() + { + if (!string.IsNullOrEmpty(PlayFabSettings.LoggerHost)) + { +#if UNITY_5 || UNITY_5_3_OR_NEWER + Application.logMessageReceivedThreaded -= HandleUnityLog; +#else + Application.RegisterLogCallback(null); +#endif + } + } + + public virtual void OnDestroy() + { + _isApplicationPlaying = false; + } + + /// + /// Logs are cached and written in bursts + /// BeginUploadLog is called at the begining of each burst + /// + protected abstract void BeginUploadLog(); + /// + /// Logs are cached and written in bursts + /// UploadLog is called for each cached log, between BeginUploadLog and EndUploadLog + /// + protected abstract void UploadLog(string message); + /// + /// Logs are cached and written in bursts + /// EndUploadLog is called at the end of each burst + /// + protected abstract void EndUploadLog(); + + /// + /// Handler to process Unity logs into our logging system + /// + /// + /// + /// + private void HandleUnityLog(string message, string stacktrace, LogType type) + { + if (!PlayFabSettings.EnableRealTimeLogging) + return; + + Sb.Length = 0; + if (type == LogType.Log || type == LogType.Warning) + { + Sb.Append(type).Append(": ").Append(message); + message = Sb.ToString(); + lock (LogMessageQueue) + { + LogMessageQueue.Enqueue(message); + } + } + else if (type == LogType.Error || type == LogType.Exception) + { + Sb.Append(type).Append(": ").Append(message).Append("\n").Append(stacktrace).Append(StackTraceUtility.ExtractStackTrace()); + message = Sb.ToString(); + lock (LogMessageQueue) + { + LogMessageQueue.Enqueue(message); + } + } + ActivateThreadWorker(); + } + + private void ActivateThreadWorker() + { + lock (_threadLock) + { + if (_writeLogThread != null) + { + return; + } + _writeLogThread = new Thread(WriteLogThreadWorker); + _writeLogThread.Start(); + } + } + + private void WriteLogThreadWorker() + { + try + { + bool active; + lock (_threadLock) + { + // Kill the thread after 1 minute of inactivity + _threadKillTime = DateTime.UtcNow + _threadKillTimeout; + } + + var localLogQueue = new Queue(); + do + { + lock (LogMessageQueue) + { + _pendingLogsCount = LogMessageQueue.Count; + while (LogMessageQueue.Count > 0) // Transfer the messages to the local queue + localLogQueue.Enqueue(LogMessageQueue.Dequeue()); + } + + BeginUploadLog(); + while (localLogQueue.Count > 0) // Transfer the messages to the local queue + UploadLog(localLogQueue.Dequeue()); + EndUploadLog(); + + #region Expire Thread. + // Check if we've been inactive + lock (_threadLock) + { + var now = DateTime.UtcNow; + if (_pendingLogsCount > 0 && _isApplicationPlaying) + { + // Still active, reset the _threadKillTime + _threadKillTime = now + _threadKillTimeout; + } + // Kill the thread after 1 minute of inactivity + active = now <= _threadKillTime; + if (!active) + { + _writeLogThread = null; + } + // This thread will be stopped, so null this now, inside lock (_threadLock) + } + #endregion + + Thread.Sleep(LOG_CACHE_INTERVAL_MS); + } while (active); + + } + catch (Exception e) + { + Debug.LogException(e); + _writeLogThread = null; + } + } + } +#else + public interface IPlayFabLogger + { + string ip { get; set; } + int port { get; set; } + string url { get; set; } + + // Unity MonoBehaviour callbacks + void OnEnable(); + void OnDisable(); + void OnDestroy(); + } + + /// + /// This is just a placeholder. WP8 doesn't support direct threading, but instead makes you use the await command. + /// + public abstract class PlayFabLoggerBase : IPlayFabLogger + { + public string ip { get; set; } + public int port { get; set; } + public string url { get; set; } + + // Unity MonoBehaviour callbacks + public void OnEnable() { } + public void OnDisable() { } + public void OnDestroy() { } + + protected abstract void BeginUploadLog(); + protected abstract void UploadLog(string message); + protected abstract void EndUploadLog(); + } +#endif + + /// + /// This translates the logs up to the PlayFab service via a PlayFab restful API + /// TODO: PLAYFAB - attach these to the PlayFab API + /// + public class PlayFabLogger : PlayFabLoggerBase + { + /// + /// Logs are cached and written in bursts + /// BeginUploadLog is called at the begining of each burst + /// + protected override void BeginUploadLog() + { + } + /// + /// Logs are cached and written in bursts + /// UploadLog is called for each cached log, between BeginUploadLog and EndUploadLog + /// + protected override void UploadLog(string message) + { + } + /// + /// Logs are cached and written in bursts + /// EndUploadLog is called at the end of each burst + /// + protected override void EndUploadLog() + { + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabLogger.cs.meta b/Assets/PlayFabSDK/Shared/Public/PlayFabLogger.cs.meta new file mode 100644 index 00000000..18ec9f00 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabLogger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 65702fe1cdebb8e4783afb157a614161 +timeCreated: 1465847308 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabSettings.cs b/Assets/PlayFabSDK/Shared/Public/PlayFabSettings.cs new file mode 100644 index 00000000..61822a49 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabSettings.cs @@ -0,0 +1,250 @@ +using PlayFab.Internal; +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine; + +namespace PlayFab +{ + public enum WebRequestType + { +#if !UNITY_2018_2_OR_NEWER // Unity has deprecated Www + UnityWww, // High compatability Unity api calls +#endif + UnityWebRequest, // Modern unity HTTP component + HttpWebRequest, // High performance multi-threaded api calls + CustomHttp //If this is used, you must set the Http to an IPlayFabHttp object. + } + + [Flags] + public enum PlayFabLogLevel + { + None = 0, + Debug = 1 << 0, + Info = 1 << 1, + Warning = 1 << 2, + Error = 1 << 3, + All = Debug | Info | Warning | Error, + } + + public static class PlayFabSettings + { + static PlayFabSettings() + { +#if UNITY_GAMECORE || UNITY_GAMECORE_XBOXONE || UNITY_GAMECORE_SCARLETT || MICROSOFT_GAME_CORE + PlatformString = "GDK"; +#else + switch (Application.platform) + { + case RuntimePlatform.WindowsEditor: + case RuntimePlatform.WindowsPlayer: + case RuntimePlatform.WindowsServer: + PlatformString = "Windows"; + break; + + case RuntimePlatform.IPhonePlayer: + PlatformString = "iOS"; + break; + + default: + PlatformString = Application.platform.ToString(); + break; + } +#endif + } + + private static PlayFabSharedSettings _playFabShared = null; + private static PlayFabSharedSettings PlayFabSharedPrivate { get { if (_playFabShared == null) _playFabShared = GetSharedSettingsObjectPrivate(); return _playFabShared; } } + + /// + /// Global settings used by all static API classes, and as the default for all instance API classes + /// + public static readonly PlayFabApiSettings staticSettings = new PlayFabSettingsRedirect(() => { return PlayFabSharedPrivate; }); + /// + /// Global user for all static API classes + /// + public static readonly PlayFabAuthenticationContext staticPlayer = new PlayFabAuthenticationContext(); + + public const string SdkVersion = "2.203.241014"; + public const string BuildIdentifier = "adobuild_unitysdk_167"; + public const string VersionString = "UnitySDK-2.203.241014"; + public static string EngineVersion = UnityEngine.Application.unityVersion; + public static string PlatformString; + + public const string DefaultPlayFabApiUrl = "playfabapi.com"; + + private static PlayFabSharedSettings GetSharedSettingsObjectPrivate() + { + var settingsList = Resources.LoadAll("PlayFabSharedSettings"); + if (settingsList.Length != 1) + { + Debug.LogWarning("The number of PlayFabSharedSettings objects should be 1: " + settingsList.Length); + Debug.LogWarning("If you are upgrading your SDK, you can ignore this warning as PlayFabSharedSettings will be imported soon. If you are not upgrading your SDK and you see this message, you should re-download the latest PlayFab source code."); + } + return settingsList[0]; + } + + public static string DeviceUniqueIdentifier + { + get + { + var deviceId = ""; +#if UNITY_ANDROID && !UNITY_EDITOR + AndroidJavaClass up = new AndroidJavaClass ("com.unity3d.player.UnityPlayer"); + AndroidJavaObject currentActivity = up.GetStatic ("currentActivity"); + AndroidJavaObject contentResolver = currentActivity.Call ("getContentResolver"); + AndroidJavaClass secure = new AndroidJavaClass ("android.provider.Settings$Secure"); + deviceId = secure.CallStatic ("getString", contentResolver, "android_id"); +#else + deviceId = SystemInfo.deviceUniqueIdentifier; +#endif + return deviceId; + } + } + + /// + /// These are variables which can differ from one PlayFab API Instance to another + /// + #region staticSettings Redirects + // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website) + public static string TitleId { get { return staticSettings.TitleId; } set { staticSettings.TitleId = value; } } + + /// The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this + internal static string VerticalName { get { return staticSettings.VerticalName; } set { staticSettings.VerticalName = value; } } +#if ENABLE_PLAYFABSERVER_API || ENABLE_PLAYFABADMIN_API || UNITY_EDITOR || ENABLE_PLAYFAB_SECRETKEY + public static string DeveloperSecretKey { get { return staticSettings.DeveloperSecretKey; } set { staticSettings.DeveloperSecretKey = value; } } +#endif + /// Set this to true to prevent hardware information from leaving the device + public static bool DisableDeviceInfo { get { return staticSettings.DisableDeviceInfo; } set { staticSettings.DisableDeviceInfo = value; } } + /// Set this to true to prevent focus change information from leaving the device + public static bool DisableFocusTimeCollection { get { return staticSettings.DisableFocusTimeCollection; } set { staticSettings.DisableFocusTimeCollection = value; } } + #endregion staticSettings Redirects + + /// + /// These are variables which are always singleton global + /// + #region PlayFabSharedSettings Redirects + [ObsoleteAttribute("LogLevel has been deprecated, please use UnityEngine.Debug.Log for your logging needs.")] + public static PlayFabLogLevel LogLevel { get { return PlayFabSharedPrivate.LogLevel; } set { PlayFabSharedPrivate.LogLevel = value; } } + public static WebRequestType RequestType { get { return PlayFabSharedPrivate.RequestType; } set { PlayFabSharedPrivate.RequestType = value; } } + public static int RequestTimeout { get { return PlayFabSharedPrivate.RequestTimeout; } set { PlayFabSharedPrivate.RequestTimeout = value; } } + public static bool RequestKeepAlive { get { return PlayFabSharedPrivate.RequestKeepAlive; } set { PlayFabSharedPrivate.RequestKeepAlive = value; } } + public static string LoggerHost { get { return PlayFabSharedPrivate.LoggerHost; } set { PlayFabSharedPrivate.LoggerHost = value; } } + public static int LoggerPort { get { return PlayFabSharedPrivate.LoggerPort; } set { PlayFabSharedPrivate.LoggerPort = value; } } + public static bool EnableRealTimeLogging { get { return PlayFabSharedPrivate.EnableRealTimeLogging; } set { PlayFabSharedPrivate.EnableRealTimeLogging = value; } } + public static int LogCapLimit { get { return PlayFabSharedPrivate.LogCapLimit; } set { PlayFabSharedPrivate.LogCapLimit = value; } } + #endregion PlayFabSharedSettings Redirects + + private static string _localApiServer; + public static string LocalApiServer + { + get + { +#if UNITY_2017_1_OR_NEWER + return _localApiServer ?? PlayFabUtil.GetLocalSettingsFileProperty("LocalApiServer"); +#else + return _localApiServer; +#endif + } + + set + { + _localApiServer = value; + } + } + + [ThreadStatic] + private static StringBuilder _cachedStringBuilder; + + private static StringBuilder AcquireStringBuilder() + { + if (_cachedStringBuilder == null) + { + _cachedStringBuilder = new StringBuilder(1000); + } + + _cachedStringBuilder.Clear(); + return _cachedStringBuilder; + } + + public static string GetFullUrl(string apiCall, Dictionary getParams, PlayFabApiSettings apiSettings = null) + { + StringBuilder sb = AcquireStringBuilder(); + + string productionEnvironmentUrl = null, verticalName = null, titleId = null; + + if (apiSettings != null) + { + + if (!string.IsNullOrEmpty(apiSettings.ProductionEnvironmentUrl)) + { + productionEnvironmentUrl = apiSettings.ProductionEnvironmentUrl; + } + if (!string.IsNullOrEmpty(apiSettings.VerticalName)) + { + verticalName = apiSettings.VerticalName; + } + if (!string.IsNullOrEmpty(apiSettings.TitleId)) + { + titleId = apiSettings.TitleId; + } + + } + + + + if (productionEnvironmentUrl == null) + { + productionEnvironmentUrl = !string.IsNullOrEmpty(PlayFabSharedPrivate.ProductionEnvironmentUrl) ? PlayFabSharedPrivate.ProductionEnvironmentUrl : DefaultPlayFabApiUrl; + } + if (verticalName == null && apiSettings != null && !string.IsNullOrEmpty(apiSettings.VerticalName)) + { + verticalName = apiSettings.VerticalName; + } + if (titleId == null) + { + titleId = PlayFabSharedPrivate.TitleId; + } + + var baseUrl = productionEnvironmentUrl; + if (!baseUrl.StartsWith("http")) + { + sb.Append("https://"); + if (!string.IsNullOrEmpty(titleId)) + { + sb.Append(titleId).Append("."); + } + if (!string.IsNullOrEmpty(verticalName)) + { + sb.Append(verticalName).Append("."); + } + } + + sb.Append(baseUrl).Append(apiCall); + + bool firstParam = true; + if (getParams != null) + { + foreach (var paramPair in getParams) + { + if (firstParam) + { + sb.Append("?"); + firstParam = false; + } + else + { + sb.Append("&"); + } + sb.Append(paramPair.Key).Append("=").Append(paramPair.Value); + } + } + + sb.Append(firstParam ? "?" : "&"); + sb.Append("engine=").Append(EngineVersion); + sb.Append("&platform=").Append(PlatformString); + + return sb.ToString(); + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PlayFabSettings.cs.meta b/Assets/PlayFabSDK/Shared/Public/PlayFabSettings.cs.meta new file mode 100644 index 00000000..96dbc65f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PlayFabSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aa223f24327e645d39b48f0ca9615e68 +timeCreated: 1462682372 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PluginContract.cs b/Assets/PlayFabSDK/Shared/Public/PluginContract.cs new file mode 100644 index 00000000..f961c82b --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PluginContract.cs @@ -0,0 +1,8 @@ +namespace PlayFab +{ + public enum PluginContract + { + PlayFab_Serializer, + PlayFab_Transport + } +} \ No newline at end of file diff --git a/Assets/PlayFabSDK/Shared/Public/PluginContract.cs.meta b/Assets/PlayFabSDK/Shared/Public/PluginContract.cs.meta new file mode 100644 index 00000000..db1d69db --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PluginContract.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2e25ec8533eb4fe4fa7d39cc8dcda24c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PluginContractKey.cs b/Assets/PlayFabSDK/Shared/Public/PluginContractKey.cs new file mode 100644 index 00000000..70e2892e --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PluginContractKey.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; + +namespace PlayFab +{ + public struct PluginContractKey + { + public PluginContract _pluginContract; + public string _pluginName; + } + + public class PluginContractKeyComparator : EqualityComparer + { + public override bool Equals(PluginContractKey x, PluginContractKey y) + { + return x._pluginContract == y._pluginContract && x._pluginName.Equals(y._pluginName); + } + + public override int GetHashCode(PluginContractKey obj) + { + return (int)obj._pluginContract + obj._pluginName.GetHashCode(); + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PluginContractKey.cs.meta b/Assets/PlayFabSDK/Shared/Public/PluginContractKey.cs.meta new file mode 100644 index 00000000..7b4f3419 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PluginContractKey.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c74eb9de26e70e7489002fb92b96af0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/PluginManager.cs b/Assets/PlayFabSDK/Shared/Public/PluginManager.cs new file mode 100644 index 00000000..94ba346b --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PluginManager.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Concurrent; +using PlayFab.Internal; + +namespace PlayFab +{ + public class PluginManager + { + private ConcurrentDictionary plugins = new ConcurrentDictionary(new PluginContractKeyComparator()); + + /// + /// The singleton instance of plugin manager. + /// + private static readonly PluginManager Instance = new PluginManager(); + + private PluginManager() + { + } + + /// + /// Gets a plugin. + /// If a plugin with specified contract and optional instance name does not exist, it will create a new one. + /// + /// The plugin contract. + /// The optional plugin instance name. Instance names allow to have mulptiple plugins with the same contract. + /// The plugin instance. + public static T GetPlugin(PluginContract contract, string instanceName = "") where T : IPlayFabPlugin + { + return (T)Instance.GetPluginInternal(contract, instanceName); + } + + /// + /// Sets a custom plugin. + /// If a plugin with specified contract and optional instance name already exists, it will be replaced with specified instance. + /// + /// The plugin instance. + /// The app contract of plugin. + /// The optional plugin instance name. Instance names allow to have mulptiple plugins with the same contract. + public static void SetPlugin(IPlayFabPlugin plugin, PluginContract contract, string instanceName = "") + { + Instance.SetPluginInternal(plugin, contract, instanceName); + } + + private IPlayFabPlugin GetPluginInternal(PluginContract contract, string instanceName) + { + var key = new PluginContractKey { _pluginContract = contract, _pluginName = instanceName }; + IPlayFabPlugin plugin; + if (!this.plugins.TryGetValue(key, out plugin)) + { + // Requested plugin is not in the cache, create the default one + switch (contract) + { + case PluginContract.PlayFab_Serializer: + plugin = this.CreatePlugin(); + break; + case PluginContract.PlayFab_Transport: + plugin = this.CreatePlayFabTransportPlugin(); + break; + default: + throw new ArgumentException("This contract is not supported", "contract"); + } + + this.plugins[key] = plugin; + } + + return plugin; + } + + private void SetPluginInternal(IPlayFabPlugin plugin, PluginContract contract, string instanceName) + { + if (plugin == null) + { + throw new ArgumentNullException("plugin", "Plugin instance cannot be null"); + } + + var key = new PluginContractKey { _pluginContract = contract, _pluginName = instanceName }; + this.plugins[key] = plugin; + } + + private IPlayFabPlugin CreatePlugin() where T : IPlayFabPlugin, new() + { + return (IPlayFabPlugin)System.Activator.CreateInstance(typeof(T)); + } + + private ITransportPlugin CreatePlayFabTransportPlugin() + { + ITransportPlugin transport = null; +#if !UNITY_WSA && !UNITY_WP8 + if (PlayFabSettings.RequestType == WebRequestType.HttpWebRequest) + transport = new PlayFabWebRequest(); +#endif + +#if UNITY_2018_2_OR_NEWER // PlayFabWww will throw warnings as Unity has deprecated Www + if (transport == null) + transport = new PlayFabUnityHttp(); +#elif UNITY_2017_2_OR_NEWER + if (PlayFabSettings.RequestType == WebRequestType.UnityWww) + transport = new PlayFabWww(); + + if (transport == null) + transport = new PlayFabUnityHttp(); +#else + if (transport == null) + transport = new PlayFabWww(); +#endif + + return transport; + } + } +} diff --git a/Assets/PlayFabSDK/Shared/Public/PluginManager.cs.meta b/Assets/PlayFabSDK/Shared/Public/PluginManager.cs.meta new file mode 100644 index 00000000..3a175b54 --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/PluginManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 408cd48212db9ae46b9100b1d3fef3b1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/Resources.meta b/Assets/PlayFabSDK/Shared/Public/Resources.meta new file mode 100644 index 00000000..ae16aefd --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c770a70afd8f88f40bb0f25e3b0dbb55 +folderAsset: yes +timeCreated: 1468086149 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/Shared/Public/Resources/PlayFabSharedSettings.asset b/Assets/PlayFabSDK/Shared/Public/Resources/PlayFabSharedSettings.asset new file mode 100644 index 00000000..9e9891ad --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/Resources/PlayFabSharedSettings.asset @@ -0,0 +1,29 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 093286084a3d1994a9c28281a1c38b1d, type: 3} + m_Name: PlayFabSharedSettings + m_EditorClassIdentifier: + TitleId: + DeveloperSecretKey: + ProductionEnvironmentUrl: + RequestType: 2 + DisableDeviceInfo: 0 + DisableFocusTimeCollection: 0 + RequestTimeout: 2000 + RequestKeepAlive: 1 + CompressResponses: 0 + DecompressWithDownloadHandler: 1 + LogLevel: 12 + LoggerHost: + LoggerPort: 0 + EnableRealTimeLogging: 0 + LogCapLimit: 30 diff --git a/Assets/PlayFabSDK/Shared/Public/Resources/PlayFabSharedSettings.asset.meta b/Assets/PlayFabSDK/Shared/Public/Resources/PlayFabSharedSettings.asset.meta new file mode 100644 index 00000000..9c2c024f --- /dev/null +++ b/Assets/PlayFabSDK/Shared/Public/Resources/PlayFabSharedSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 698b2db098268c640929a7b8090a31eb +timeCreated: 1532637394 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayFabSDK/link.xml b/Assets/PlayFabSDK/link.xml new file mode 100644 index 00000000..765c16cf --- /dev/null +++ b/Assets/PlayFabSDK/link.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Assets/PlayFabSDK/link.xml.meta b/Assets/PlayFabSDK/link.xml.meta new file mode 100644 index 00000000..cd55d60f --- /dev/null +++ b/Assets/PlayFabSDK/link.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc2c3070dc174cc45a4aaf1a5e38263d +timeCreated: 1468524880 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Dev/PlayFabInit.cs b/Assets/Scripts/Dev/PlayFabInit.cs new file mode 100644 index 00000000..39a8d728 --- /dev/null +++ b/Assets/Scripts/Dev/PlayFabInit.cs @@ -0,0 +1,39 @@ +using System.Collections; +using System.Collections.Generic; +using PlayFab; +using PlayFab.ClientModels; +using UnityEngine; + +public class PlayFabInit : MonoBehaviour +{ + public string playFabTitleId; // Replace with your PlayFab Title ID + + void Start() + { + if (string.IsNullOrEmpty(PlayFabSettings.TitleId)) + { + PlayFabSettings.TitleId = playFabTitleId; + } + Login(); + } + + void Login() + { + var request = new LoginWithCustomIDRequest + { + CustomId = SystemInfo.deviceUniqueIdentifier, + CreateAccount = true + }; + PlayFabClientAPI.LoginWithCustomID(request, OnLoginSuccess, OnLoginFailure); + } + + private void OnLoginSuccess(LoginResult result) + { + Debug.Log("Login successful!"); + } + + private void OnLoginFailure(PlayFabError error) + { + Debug.LogError("Login failed: " + error.GenerateErrorReport()); + } +} diff --git a/Assets/Scripts/Dev/PlayFabInit.cs.meta b/Assets/Scripts/Dev/PlayFabInit.cs.meta new file mode 100644 index 00000000..7964b0b7 --- /dev/null +++ b/Assets/Scripts/Dev/PlayFabInit.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90da569ce88767e4b924f823046b79de +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: