// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Achievements { /// /// Contains information about a single achievement definition with localized text. /// public class DefinitionV2 : ISettable { /// /// Achievement ID that can be used to uniquely identify the achievement. /// public string AchievementId { get; set; } /// /// Localized display name for the achievement when it has been unlocked. /// public string UnlockedDisplayName { get; set; } /// /// Localized description for the achievement when it has been unlocked. /// public string UnlockedDescription { get; set; } /// /// Localized display name for the achievement when it is locked or hidden. /// public string LockedDisplayName { get; set; } /// /// Localized description for the achievement when it is locked or hidden. /// public string LockedDescription { get; set; } /// /// Localized flavor text that can be used by the game in an arbitrary manner. This may be null if there is no data configured in the dev portal. /// public string FlavorText { get; set; } /// /// URL of an icon to display for the achievement when it is unlocked. This may be null if there is no data configured in the dev portal. /// public string UnlockedIconURL { get; set; } /// /// URL of an icon to display for the achievement when it is locked or hidden. This may be null if there is no data configured in the dev portal. /// public string LockedIconURL { get; set; } /// /// true if the achievement is hidden; false otherwise. /// public bool IsHidden { get; set; } /// /// Array of `` that need to be satisfied to unlock this achievement. Consists of Name and Threshold Value. /// public StatThresholds[] StatThresholds { get; set; } internal void Set(DefinitionV2Internal? other) { if (other != null) { AchievementId = other.Value.AchievementId; UnlockedDisplayName = other.Value.UnlockedDisplayName; UnlockedDescription = other.Value.UnlockedDescription; LockedDisplayName = other.Value.LockedDisplayName; LockedDescription = other.Value.LockedDescription; FlavorText = other.Value.FlavorText; UnlockedIconURL = other.Value.UnlockedIconURL; LockedIconURL = other.Value.LockedIconURL; IsHidden = other.Value.IsHidden; StatThresholds = other.Value.StatThresholds; } } public void Set(object other) { Set(other as DefinitionV2Internal?); } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)] internal struct DefinitionV2Internal : ISettable, System.IDisposable { private int m_ApiVersion; private System.IntPtr m_AchievementId; private System.IntPtr m_UnlockedDisplayName; private System.IntPtr m_UnlockedDescription; private System.IntPtr m_LockedDisplayName; private System.IntPtr m_LockedDescription; private System.IntPtr m_FlavorText; private System.IntPtr m_UnlockedIconURL; private System.IntPtr m_LockedIconURL; private int m_IsHidden; private uint m_StatThresholdsCount; private System.IntPtr m_StatThresholds; public string AchievementId { get { string value; Helper.TryMarshalGet(m_AchievementId, out value); return value; } set { Helper.TryMarshalSet(ref m_AchievementId, value); } } public string UnlockedDisplayName { get { string value; Helper.TryMarshalGet(m_UnlockedDisplayName, out value); return value; } set { Helper.TryMarshalSet(ref m_UnlockedDisplayName, value); } } public string UnlockedDescription { get { string value; Helper.TryMarshalGet(m_UnlockedDescription, out value); return value; } set { Helper.TryMarshalSet(ref m_UnlockedDescription, value); } } public string LockedDisplayName { get { string value; Helper.TryMarshalGet(m_LockedDisplayName, out value); return value; } set { Helper.TryMarshalSet(ref m_LockedDisplayName, value); } } public string LockedDescription { get { string value; Helper.TryMarshalGet(m_LockedDescription, out value); return value; } set { Helper.TryMarshalSet(ref m_LockedDescription, value); } } public string FlavorText { get { string value; Helper.TryMarshalGet(m_FlavorText, out value); return value; } set { Helper.TryMarshalSet(ref m_FlavorText, value); } } public string UnlockedIconURL { get { string value; Helper.TryMarshalGet(m_UnlockedIconURL, out value); return value; } set { Helper.TryMarshalSet(ref m_UnlockedIconURL, value); } } public string LockedIconURL { get { string value; Helper.TryMarshalGet(m_LockedIconURL, out value); return value; } set { Helper.TryMarshalSet(ref m_LockedIconURL, value); } } public bool IsHidden { get { bool value; Helper.TryMarshalGet(m_IsHidden, out value); return value; } set { Helper.TryMarshalSet(ref m_IsHidden, value); } } public StatThresholds[] StatThresholds { get { StatThresholds[] value; Helper.TryMarshalGet(m_StatThresholds, out value, m_StatThresholdsCount); return value; } set { Helper.TryMarshalSet(ref m_StatThresholds, value, out m_StatThresholdsCount); } } public void Set(DefinitionV2 other) { if (other != null) { m_ApiVersion = AchievementsInterface.Definitionv2ApiLatest; AchievementId = other.AchievementId; UnlockedDisplayName = other.UnlockedDisplayName; UnlockedDescription = other.UnlockedDescription; LockedDisplayName = other.LockedDisplayName; LockedDescription = other.LockedDescription; FlavorText = other.FlavorText; UnlockedIconURL = other.UnlockedIconURL; LockedIconURL = other.LockedIconURL; IsHidden = other.IsHidden; StatThresholds = other.StatThresholds; } } public void Set(object other) { Set(other as DefinitionV2); } public void Dispose() { Helper.TryMarshalDispose(ref m_AchievementId); Helper.TryMarshalDispose(ref m_UnlockedDisplayName); Helper.TryMarshalDispose(ref m_UnlockedDescription); Helper.TryMarshalDispose(ref m_LockedDisplayName); Helper.TryMarshalDispose(ref m_LockedDescription); Helper.TryMarshalDispose(ref m_FlavorText); Helper.TryMarshalDispose(ref m_UnlockedIconURL); Helper.TryMarshalDispose(ref m_LockedIconURL); Helper.TryMarshalDispose(ref m_StatThresholds); } } }