// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Metrics { public class BeginPlayerSessionOptionsAccountId : ISettable { private MetricsAccountIdType m_AccountIdType; private EpicAccountId m_Epic; private string m_External; /// /// Account ID type that is set in the union. /// public MetricsAccountIdType AccountIdType { get { return m_AccountIdType; } private set { m_AccountIdType = value; } } /// /// An Epic Online Services Account ID. Set this field when AccountIdType is set to . /// public EpicAccountId Epic { get { EpicAccountId value; Helper.TryMarshalGet(m_Epic, out value, m_AccountIdType, MetricsAccountIdType.Epic); return value; } set { Helper.TryMarshalSet(ref m_Epic, value, ref m_AccountIdType, MetricsAccountIdType.Epic); } } /// /// An Account ID for another service. Set this field when AccountIdType is set to . /// public string External { get { string value; Helper.TryMarshalGet(m_External, out value, m_AccountIdType, MetricsAccountIdType.External); return value; } set { Helper.TryMarshalSet(ref m_External, value, ref m_AccountIdType, MetricsAccountIdType.External); } } public static implicit operator BeginPlayerSessionOptionsAccountId(EpicAccountId value) { return new BeginPlayerSessionOptionsAccountId() { Epic = value }; } public static implicit operator BeginPlayerSessionOptionsAccountId(string value) { return new BeginPlayerSessionOptionsAccountId() { External = value }; } internal void Set(BeginPlayerSessionOptionsAccountIdInternal? other) { if (other != null) { Epic = other.Value.Epic; External = other.Value.External; } } public void Set(object other) { Set(other as BeginPlayerSessionOptionsAccountIdInternal?); } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit, Pack = 4)] internal struct BeginPlayerSessionOptionsAccountIdInternal : ISettable, System.IDisposable { [System.Runtime.InteropServices.FieldOffset(0)] private MetricsAccountIdType m_AccountIdType; [System.Runtime.InteropServices.FieldOffset(4)] private System.IntPtr m_Epic; [System.Runtime.InteropServices.FieldOffset(4)] private System.IntPtr m_External; public EpicAccountId Epic { get { EpicAccountId value; Helper.TryMarshalGet(m_Epic, out value, m_AccountIdType, MetricsAccountIdType.Epic); return value; } set { Helper.TryMarshalSet(ref m_Epic, value, ref m_AccountIdType, MetricsAccountIdType.Epic, this); } } public string External { get { string value; Helper.TryMarshalGet(m_External, out value, m_AccountIdType, MetricsAccountIdType.External); return value; } set { Helper.TryMarshalSet(ref m_External, value, ref m_AccountIdType, MetricsAccountIdType.External, this); } } public void Set(BeginPlayerSessionOptionsAccountId other) { if (other != null) { Epic = other.Epic; External = other.External; } } public void Set(object other) { Set(other as BeginPlayerSessionOptionsAccountId); } public void Dispose() { Helper.TryMarshalDispose(ref m_Epic); Helper.TryMarshalDispose(ref m_External, m_AccountIdType, MetricsAccountIdType.External); } } }