// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BuildAgent.Issues
{
///
/// A diagnostic message produced during the build
///
[DataContract]
[DebuggerDisplay("{Type}: {Message}")]
public class InputDiagnostic
{
[DataMember(IsRequired = true)]
public string Type;
[DataMember(IsRequired = true)]
public string Message;
[DataMember(IsRequired = true)]
public string Url;
}
///
/// Represents the outcome of a build step
///
[DataContract]
[DebuggerDisplay("{Name}")]
public class InputJobStep
{
///
/// Name of the build step. Multiple step results can be submitted for a single build, and can be used to augment a single issue with additional diagnostic information.
///
[DataMember(IsRequired = true)]
public string Name;
///
/// Url of this job step
///
[DataMember(IsRequired = true)]
public string Url;
///
/// Base directory that the build was executed in. Optional. This is used to determine branch-relative file paths for diagnostics.
///
[DataMember]
public string BaseDirectory;
///
/// Output from the build, typically messages which are already designated warnings or errors.
///
[DataMember]
public List Diagnostics = new List();
}
///
/// Class containing input data for a job
///
[DataContract]
[DebuggerDisplay("{Stream}: {Change} - {Name}")]
class InputJob
{
///
/// Project that this build belongs to
///
[DataMember(IsRequired = true)]
public string Project;
///
/// Name of this build. Displayed in the UI.
///
[DataMember(IsRequired = true)]
public string Name;
///
/// Url for this job
///
[DataMember(IsRequired = true)]
public string Url;
///
/// Stream that was built
///
[DataMember(IsRequired = true)]
public string Stream;
///
/// Changelist number that was built
///
[DataMember(IsRequired = true)]
public int Change;
///
/// Steps that are part of this job
///
[DataMember(IsRequired = true)]
public List Steps = new List();
}
///
/// Main class containing input data for the build
///
[DataContract]
class InputData
{
///
/// Information about builds that have completed.
///
[DataMember]
public List Jobs = new List();
}
}