You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
190 lines
4.3 KiB
190 lines
4.3 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.Ecom
|
|
{
|
|
/// <summary>
|
|
/// Contains information about a single entitlement associated with an account. Instances of this structure are
|
|
/// created by <see cref="EcomInterface.CopyEntitlementByIndex" />, <see cref="EcomInterface.CopyEntitlementByNameAndIndex" />, or <see cref="EcomInterface.CopyEntitlementById" />.
|
|
/// They must be passed to <see cref="EcomInterface.Release" />.
|
|
/// </summary>
|
|
public struct Entitlement
|
|
{
|
|
/// <summary>
|
|
/// Name of the entitlement
|
|
/// </summary>
|
|
public Utf8String EntitlementName { get; set; }
|
|
|
|
/// <summary>
|
|
/// ID of the entitlement owned by an account
|
|
/// </summary>
|
|
public Utf8String EntitlementId { get; set; }
|
|
|
|
/// <summary>
|
|
/// ID of the item associated with the offer which granted this entitlement
|
|
/// </summary>
|
|
public Utf8String CatalogItemId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 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.
|
|
/// </summary>
|
|
public int ServerIndex { get; set; }
|
|
|
|
/// <summary>
|
|
/// If true then the catalog has this entitlement marked as redeemed
|
|
/// </summary>
|
|
public bool Redeemed { get; set; }
|
|
|
|
/// <summary>
|
|
/// If not -1 then this is a POSIX timestamp that this entitlement will end
|
|
/// </summary>
|
|
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<Entitlement>, ISettable<Entitlement>, 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);
|
|
}
|
|
}
|
|
}
|