// Copyright Epic Games, Inc. All Rights Reserved. using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; using EpicGames.Core; using Horde.Build.Acls; using Horde.Build.Agents.Pools; using Horde.Build.Streams; using Horde.Build.Utilities; namespace Horde.Build.Projects { using StreamId = StringId; /// /// Stores configuration for a project /// [JsonSchema("https://unrealengine.com/horde/project")] [JsonSchemaCatalog("Horde Project", "Horde project configuration file", new[] { "*.project.json", "Projects/*.json" })] public class ProjectConfig { /// /// Name for the new project /// [Required] public string Name { get; set; } = null!; /// /// Path to the project logo /// public string? Logo { get; set; } /// /// List of pools for this project /// public List Pools { get; set; } = new List(); /// /// Categories to include in this project /// public List Categories { get; set; } = new List(); /// /// List of streams /// public List Streams { get; set; } = new List(); /// /// Acl entries /// public AclConfig? Acl { get; set; } } /// /// Reference to configuration for a stream /// public class StreamConfigRef { /// /// Unique id for the stream /// [Required] public StreamId Id { get; set; } = StreamId.Empty; /// /// Path to the configuration file /// [Required] public string Path { get; set; } = null!; } /// /// Information about a category to display for a stream /// public class ProjectCategoryConfig { /// /// Name of this category /// [Required] public string Name { get; set; } = String.Empty; /// /// Index of the row to display this category on /// public int Row { get; set; } /// /// Whether to show this category on the nav menu /// public bool ShowOnNavMenu { get; set; } /// /// Patterns for stream names to include /// public List IncludePatterns { get; set; } = new List(); /// /// Patterns for stream names to exclude /// public List ExcludePatterns { get; set; } = new List(); } }