// 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 struct Entitlement { /// /// Name of the entitlement /// public Utf8String EntitlementName { get; set; } /// /// ID of the entitlement owned by an account /// public Utf8String EntitlementId { get; set; } /// /// ID of the item associated with the offer which granted this entitlement /// public Utf8String 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(ref EntitlementInternal other) { EntitlementName = other.EntitlementName; EntitlementId = other.EntitlementId; CatalogItemId = other.CatalogItemId; ServerIndex = other.ServerIndex; Redeemed = other.Redeemed; EndTimestamp = other.EndTimestamp; } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)] internal struct EntitlementInternal : IGettable, 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 Utf8String EntitlementName { get { Utf8String value; Helper.Get(m_EntitlementName, out value); return value; } set { Helper.Set(value, ref m_EntitlementName); } } public Utf8String EntitlementId { get { Utf8String value; Helper.Get(m_EntitlementId, out value); return value; } set { Helper.Set(value, ref m_EntitlementId); } } public Utf8String CatalogItemId { get { Utf8String value; Helper.Get(m_CatalogItemId, out value); return value; } set { Helper.Set(value, ref m_CatalogItemId); } } public int ServerIndex { get { return m_ServerIndex; } set { m_ServerIndex = value; } } public bool Redeemed { get { bool value; Helper.Get(m_Redeemed, out value); return value; } set { Helper.Set(value, ref m_Redeemed); } } public long EndTimestamp { get { return m_EndTimestamp; } set { m_EndTimestamp = value; } } public void Set(ref Entitlement other) { 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(ref Entitlement? other) { if (other.HasValue) { m_ApiVersion = EcomInterface.EntitlementApiLatest; 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 Dispose() { Helper.Dispose(ref m_EntitlementName); Helper.Dispose(ref m_EntitlementId); Helper.Dispose(ref m_CatalogItemId); } public void Get(out Entitlement output) { output = new Entitlement(); output.Set(ref this); } } }