// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Connect
{
///
/// A structure that contains an ID token.
/// These structures are created by and must be passed to .
///
public class IdToken : ISettable
{
///
/// The Product User ID described by the ID token.
/// Use to populate this field when validating a received ID token.
///
public ProductUserId ProductUserId { get; set; }
///
/// The ID token as a Json Web Token (JWT) string.
///
public string JsonWebToken { get; set; }
internal void Set(IdTokenInternal? other)
{
if (other != null)
{
ProductUserId = other.Value.ProductUserId;
JsonWebToken = other.Value.JsonWebToken;
}
}
public void Set(object other)
{
Set(other as IdTokenInternal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct IdTokenInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_ProductUserId;
private System.IntPtr m_JsonWebToken;
public ProductUserId ProductUserId
{
get
{
ProductUserId value;
Helper.TryMarshalGet(m_ProductUserId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_ProductUserId, value);
}
}
public string JsonWebToken
{
get
{
string value;
Helper.TryMarshalGet(m_JsonWebToken, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_JsonWebToken, value);
}
}
public void Set(IdToken other)
{
if (other != null)
{
m_ApiVersion = ConnectInterface.IdtokenApiLatest;
ProductUserId = other.ProductUserId;
JsonWebToken = other.JsonWebToken;
}
}
public void Set(object other)
{
Set(other as IdToken);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_ProductUserId);
Helper.TryMarshalDispose(ref m_JsonWebToken);
}
}
}