// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Ecom { /// /// Contains information about a single entitlement associated with an account. Instances of this structure are /// created by , , or . /// They must be passed to . /// public class Entitlement : ISettable { /// /// Name of the entitlement /// public string EntitlementName { get; set; } /// /// ID of the entitlement owned by an account /// public string EntitlementId { get; set; } /// /// ID of the item associated with the offer which granted this entitlement /// public string CatalogItemId { get; set; } /// /// If queried using pagination then ServerIndex represents the index of the entitlement as it /// exists on the server. If not queried using pagination then ServerIndex will be -1. /// public int ServerIndex { get; set; } /// /// If true then the catalog has this entitlement marked as redeemed /// public bool Redeemed { get; set; } /// /// If not -1 then this is a POSIX timestamp that this entitlement will end /// public long EndTimestamp { get; set; } internal void Set(EntitlementInternal? other) { if (other != null) { EntitlementName = other.Value.EntitlementName; EntitlementId = other.Value.EntitlementId; CatalogItemId = other.Value.CatalogItemId; ServerIndex = other.Value.ServerIndex; Redeemed = other.Value.Redeemed; EndTimestamp = other.Value.EndTimestamp; } } public void Set(object other) { Set(other as EntitlementInternal?); } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)] internal struct EntitlementInternal : ISettable, System.IDisposable { private int m_ApiVersion; private System.IntPtr m_EntitlementName; private System.IntPtr m_EntitlementId; private System.IntPtr m_CatalogItemId; private int m_ServerIndex; private int m_Redeemed; private long m_EndTimestamp; public string EntitlementName { get { string value; Helper.TryMarshalGet(m_EntitlementName, out value); return value; } set { Helper.TryMarshalSet(ref m_EntitlementName, value); } } public string EntitlementId { get { string value; Helper.TryMarshalGet(m_EntitlementId, out value); return value; } set { Helper.TryMarshalSet(ref m_EntitlementId, value); } } public string CatalogItemId { get { string value; Helper.TryMarshalGet(m_CatalogItemId, out value); return value; } set { Helper.TryMarshalSet(ref m_CatalogItemId, value); } } public int ServerIndex { get { return m_ServerIndex; } set { m_ServerIndex = value; } } public bool Redeemed { get { bool value; Helper.TryMarshalGet(m_Redeemed, out value); return value; } set { Helper.TryMarshalSet(ref m_Redeemed, value); } } public long EndTimestamp { get { return m_EndTimestamp; } set { m_EndTimestamp = value; } } public void Set(Entitlement other) { if (other != null) { m_ApiVersion = EcomInterface.EntitlementApiLatest; EntitlementName = other.EntitlementName; EntitlementId = other.EntitlementId; CatalogItemId = other.CatalogItemId; ServerIndex = other.ServerIndex; Redeemed = other.Redeemed; EndTimestamp = other.EndTimestamp; } } public void Set(object other) { Set(other as Entitlement); } public void Dispose() { Helper.TryMarshalDispose(ref m_EntitlementName); Helper.TryMarshalDispose(ref m_EntitlementId); Helper.TryMarshalDispose(ref m_CatalogItemId); } } }