// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Metrics { public struct BeginPlayerSessionOptionsAccountId { private MetricsAccountIdType m_AccountIdType; private EpicAccountId m_Epic; private Utf8String 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 Account ID. Set this field when AccountIdType is set to . /// public EpicAccountId Epic { get { EpicAccountId value; Helper.Get(m_Epic, out value, m_AccountIdType, MetricsAccountIdType.Epic); return value; } set { Helper.Set(value, ref m_Epic, MetricsAccountIdType.Epic, ref m_AccountIdType); } } /// /// An Account ID for another service. Set this field when AccountIdType is set to . /// public Utf8String External { get { Utf8String value; Helper.Get(m_External, out value, m_AccountIdType, MetricsAccountIdType.External); return value; } set { Helper.Set(value, ref m_External, MetricsAccountIdType.External, ref m_AccountIdType); } } public static implicit operator BeginPlayerSessionOptionsAccountId(EpicAccountId value) { return new BeginPlayerSessionOptionsAccountId() { Epic = value }; } public static implicit operator BeginPlayerSessionOptionsAccountId(Utf8String value) { return new BeginPlayerSessionOptionsAccountId() { External = value }; } public static implicit operator BeginPlayerSessionOptionsAccountId(string value) { return new BeginPlayerSessionOptionsAccountId() { External = value }; } internal void Set(ref BeginPlayerSessionOptionsAccountIdInternal other) { Epic = other.Epic; External = other.External; } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit, Pack = 4)] internal struct BeginPlayerSessionOptionsAccountIdInternal : IGettable, 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.Get(m_Epic, out value, m_AccountIdType, MetricsAccountIdType.Epic); return value; } set { Helper.Set(value, ref m_Epic, MetricsAccountIdType.Epic, ref m_AccountIdType, this); } } public Utf8String External { get { Utf8String value; Helper.Get(m_External, out value, m_AccountIdType, MetricsAccountIdType.External); return value; } set { Helper.Set(value, ref m_External, MetricsAccountIdType.External, ref m_AccountIdType, this); } } public void Set(ref BeginPlayerSessionOptionsAccountId other) { Epic = other.Epic; External = other.External; } public void Set(ref BeginPlayerSessionOptionsAccountId? other) { if (other.HasValue) { Epic = other.Value.Epic; External = other.Value.External; } } public void Dispose() { Helper.Dispose(ref m_Epic); Helper.Dispose(ref m_External, m_AccountIdType, MetricsAccountIdType.External); } public void Get(out BeginPlayerSessionOptionsAccountId output) { output = new BeginPlayerSessionOptionsAccountId(); output.Set(ref this); } } }