// Copyright Epic Games, Inc. All Rights Reserved. using System.ComponentModel; using EpicGames.Core; namespace EpicGames.Horde.Artifacts { /// /// Name of an artifact /// /// The artifact type [JsonSchemaString] [StringIdConverter(typeof(ArtifactNameConverter))] [TypeConverter(typeof(StringIdTypeConverter))] public readonly record struct ArtifactName(StringId Id) { /// /// Constructor /// /// Identifier for the artifact type public ArtifactName(string id) : this(new StringId(id)) { } /// public override string ToString() => Id.ToString(); } /// /// Converter to and from instances. /// class ArtifactNameConverter : StringIdConverter { /// public override ArtifactName FromStringId(StringId id) => new ArtifactName(id); /// public override StringId ToStringId(ArtifactName value) => value.Id; } }