// Copyright Epic Games, Inc. All Rights Reserved.
using System.ComponentModel;
using EpicGames.Core;
namespace EpicGames.Horde.Jobs.Bisect
{
///
/// Identifier for a job
///
/// Id to construct from
[LogValueType]
[JsonSchemaString]
[TypeConverter(typeof(BinaryIdTypeConverter))]
[BinaryIdConverter(typeof(BisectTaskIdConverter))]
public readonly record struct BisectTaskId(BinaryId Id)
{
///
public static BisectTaskId Parse(string text) => new BisectTaskId(BinaryId.Parse(text));
///
public override string ToString() => Id.ToString();
}
///
/// Converter to and from instances.
///
class BisectTaskIdConverter : BinaryIdConverter
{
///
public override BisectTaskId FromBinaryId(BinaryId id) => new BisectTaskId(id);
///
public override BinaryId ToBinaryId(BisectTaskId value) => value.Id;
}
}