// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Auth { /// /// A structure that contains an auth token. /// These structures are created by and must be passed to . /// public struct Token { /// /// Name of the app related to the client ID involved with this token /// public Utf8String App { get; set; } /// /// Client ID that requested this token /// public Utf8String ClientId { get; set; } /// /// The Epic Account ID associated with this auth token /// public EpicAccountId AccountId { get; set; } /// /// Access token for the current user login session /// public Utf8String AccessToken { get; set; } /// /// Time before the access token expires, in seconds, relative to the call to /// public double ExpiresIn { get; set; } /// /// Absolute time in UTC before the access token expires, in ISO 8601 format /// public Utf8String ExpiresAt { get; set; } /// /// Type of auth token /// public AuthTokenType AuthType { get; set; } /// /// Refresh token. /// /// public Utf8String RefreshToken { get; set; } /// /// Time before the access token expires, in seconds, relative to the call to /// public double RefreshExpiresIn { get; set; } /// /// Absolute time in UTC before the refresh token expires, in ISO 8601 format /// public Utf8String RefreshExpiresAt { get; set; } internal void Set(ref TokenInternal other) { App = other.App; ClientId = other.ClientId; AccountId = other.AccountId; AccessToken = other.AccessToken; ExpiresIn = other.ExpiresIn; ExpiresAt = other.ExpiresAt; AuthType = other.AuthType; RefreshToken = other.RefreshToken; RefreshExpiresIn = other.RefreshExpiresIn; RefreshExpiresAt = other.RefreshExpiresAt; } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)] internal struct TokenInternal : IGettable, ISettable, System.IDisposable { private int m_ApiVersion; private System.IntPtr m_App; private System.IntPtr m_ClientId; private System.IntPtr m_AccountId; private System.IntPtr m_AccessToken; private double m_ExpiresIn; private System.IntPtr m_ExpiresAt; private AuthTokenType m_AuthType; private System.IntPtr m_RefreshToken; private double m_RefreshExpiresIn; private System.IntPtr m_RefreshExpiresAt; public Utf8String App { get { Utf8String value; Helper.Get(m_App, out value); return value; } set { Helper.Set(value, ref m_App); } } public Utf8String ClientId { get { Utf8String value; Helper.Get(m_ClientId, out value); return value; } set { Helper.Set(value, ref m_ClientId); } } public EpicAccountId AccountId { get { EpicAccountId value; Helper.Get(m_AccountId, out value); return value; } set { Helper.Set(value, ref m_AccountId); } } public Utf8String AccessToken { get { Utf8String value; Helper.Get(m_AccessToken, out value); return value; } set { Helper.Set(value, ref m_AccessToken); } } public double ExpiresIn { get { return m_ExpiresIn; } set { m_ExpiresIn = value; } } public Utf8String ExpiresAt { get { Utf8String value; Helper.Get(m_ExpiresAt, out value); return value; } set { Helper.Set(value, ref m_ExpiresAt); } } public AuthTokenType AuthType { get { return m_AuthType; } set { m_AuthType = value; } } public Utf8String RefreshToken { get { Utf8String value; Helper.Get(m_RefreshToken, out value); return value; } set { Helper.Set(value, ref m_RefreshToken); } } public double RefreshExpiresIn { get { return m_RefreshExpiresIn; } set { m_RefreshExpiresIn = value; } } public Utf8String RefreshExpiresAt { get { Utf8String value; Helper.Get(m_RefreshExpiresAt, out value); return value; } set { Helper.Set(value, ref m_RefreshExpiresAt); } } public void Set(ref Token other) { m_ApiVersion = AuthInterface.TokenApiLatest; App = other.App; ClientId = other.ClientId; AccountId = other.AccountId; AccessToken = other.AccessToken; ExpiresIn = other.ExpiresIn; ExpiresAt = other.ExpiresAt; AuthType = other.AuthType; RefreshToken = other.RefreshToken; RefreshExpiresIn = other.RefreshExpiresIn; RefreshExpiresAt = other.RefreshExpiresAt; } public void Set(ref Token? other) { if (other.HasValue) { m_ApiVersion = AuthInterface.TokenApiLatest; App = other.Value.App; ClientId = other.Value.ClientId; AccountId = other.Value.AccountId; AccessToken = other.Value.AccessToken; ExpiresIn = other.Value.ExpiresIn; ExpiresAt = other.Value.ExpiresAt; AuthType = other.Value.AuthType; RefreshToken = other.Value.RefreshToken; RefreshExpiresIn = other.Value.RefreshExpiresIn; RefreshExpiresAt = other.Value.RefreshExpiresAt; } } public void Dispose() { Helper.Dispose(ref m_App); Helper.Dispose(ref m_ClientId); Helper.Dispose(ref m_AccountId); Helper.Dispose(ref m_AccessToken); Helper.Dispose(ref m_ExpiresAt); Helper.Dispose(ref m_RefreshToken); Helper.Dispose(ref m_RefreshExpiresAt); } public void Get(out Token output) { output = new Token(); output.Set(ref this); } } }