// Copyright Epic Games, Inc. All Rights Reserved. using System.Collections.Generic; #pragma warning disable CA2227 // Change 'InputDependencies' to be read-only by removing the property setter namespace EpicGames.Horde.Jobs.Graphs { /// /// Information required to create a node /// public class GetNodeResponse { /// /// The name of this node /// public string Name { get; set; } /// /// Inputs for this node /// public List Inputs { get; set; } = new List(); /// /// Output from this node /// public List Outputs { get; set; } = new List(); /// /// Indices of nodes which must have succeeded for this node to run /// public List InputDependencies { get; set; } = new List(); /// /// Indices of nodes which must have completed for this node to run /// public List OrderDependencies { get; set; } = new List(); /// /// The priority of this node /// public Priority Priority { get; set; } /// /// Whether this node can be retried /// public bool AllowRetry { get; set; } /// /// This node can start running early, before dependencies of other nodes in the same group are complete /// public bool RunEarly { get; set; } /// /// Whether to include warnings in diagnostic output /// public bool Warnings { get; set; } /// /// Average time to execute this node based on historical trends /// public float? AverageDuration { get; set; } /// /// Credentials required for this node to run. This dictionary maps from environment variable names to a credential property in the format 'CredentialName.PropertyName'. /// public IReadOnlyDictionary? Credentials { get; set; } /// /// Properties for this node /// public IReadOnlyDictionary? Properties { get; set; } /// /// Annotations for this node /// public IReadOnlyDictionary? Annotations { get; set; } /// /// Constructor /// /// public GetNodeResponse(string name) { Name = name; } } /// /// Information about a group of nodes /// public class GetGroupResponse { /// /// The type of agent to execute this group /// public string AgentType { get; set; } /// /// Nodes in the group /// public List Nodes { get; set; } = new List(); /// /// Constructor /// public GetGroupResponse(string agentType) { AgentType = agentType; } } /// /// Information about an aggregate /// public class GetAggregateResponse { /// /// Name of the aggregate /// public string Name { get; set; } /// /// Nodes which must be part of the job for the aggregate to be shown /// public List Nodes { get; set; } = new List(); /// /// Constructor /// public GetAggregateResponse(string name) { Name = name; } } /// /// Information about a label /// public class GetLabelResponse { /// /// Category of the aggregate /// public string? Category => DashboardCategory; /// /// Label for this aggregate /// public string? Name => DashboardName; /// /// Name to show for this label on the dashboard /// public string? DashboardName { get; set; } /// /// Category to show this label in on the dashboard /// public string? DashboardCategory { get; set; } /// /// Name to show for this label in UGS /// public string? UgsName { get; set; } /// /// Project to display this label for in UGS /// public string? UgsProject { get; set; } /// /// Nodes which must be part of the job for the aggregate to be shown /// public List RequiredNodes { get; set; } = new List(); /// /// Nodes to include in the status of this aggregate, if present in the job /// public List IncludedNodes { get; set; } = new List(); } /// /// Information about a graph /// public class GetGraphResponse { /// /// The hash of the graph /// public string Hash { get; set; } /// /// Array of nodes for this job /// public List? Groups { get; set; } /// /// List of aggregates /// public List? Aggregates { get; set; } /// /// List of labels for the graph /// public List? Labels { get; set; } /// /// Constructor /// public GetGraphResponse(string hash) { Hash = hash; } } }