// 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 unlocked achievement.
///
public struct UnlockedAchievement
{
///
/// Achievement ID that can be used to uniquely identify the unlocked achievement.
///
public Utf8String AchievementId { get; set; }
///
/// If not then this is the POSIX timestamp that the achievement was unlocked.
///
public System.DateTimeOffset? UnlockTime { get; set; }
internal void Set(ref UnlockedAchievementInternal other)
{
AchievementId = other.AchievementId;
UnlockTime = other.UnlockTime;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct UnlockedAchievementInternal : IGettable, ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_AchievementId;
private long m_UnlockTime;
public Utf8String AchievementId
{
get
{
Utf8String value;
Helper.Get(m_AchievementId, out value);
return value;
}
set
{
Helper.Set(value, ref m_AchievementId);
}
}
public System.DateTimeOffset? UnlockTime
{
get
{
System.DateTimeOffset? value;
Helper.Get(m_UnlockTime, out value);
return value;
}
set
{
Helper.Set(value, ref m_UnlockTime);
}
}
public void Set(ref UnlockedAchievement other)
{
m_ApiVersion = AchievementsInterface.UnlockedachievementApiLatest;
AchievementId = other.AchievementId;
UnlockTime = other.UnlockTime;
}
public void Set(ref UnlockedAchievement? other)
{
if (other.HasValue)
{
m_ApiVersion = AchievementsInterface.UnlockedachievementApiLatest;
AchievementId = other.Value.AchievementId;
UnlockTime = other.Value.UnlockTime;
}
}
public void Dispose()
{
Helper.Dispose(ref m_AchievementId);
}
public void Get(out UnlockedAchievement output)
{
output = new UnlockedAchievement();
output.Set(ref this);
}
}
}