// Copyright Epic Games, Inc. All Rights Reserved. using System; using System.Collections.Generic; using EpicGames.Horde.Users; #pragma warning disable CA2227 namespace EpicGames.Horde.Commits { /// /// Information about a commit /// public class GetCommitResponse { /// /// The commit id /// public CommitIdWithOrder Id { get => _id ?? CommitIdWithOrder.FromPerforceChange(_number) ?? CommitIdWithOrder.Empty; set => _id = value; } CommitIdWithOrder? _id; /// /// The changelist number /// [Obsolete("Use Id instead")] public int Number { get => _number ?? _id?.TryGetPerforceChange() ?? -1; set => _number = value; } int? _number; /// /// Name of the user that authored this change [DEPRECATED] /// public string Author { get; set; } /// /// Information about the user that authored this change /// public GetThinUserInfoResponse AuthorInfo { get; set; } /// /// The description text /// public string Description { get; set; } /// /// Date/time that change was committed /// public DateTime DateUtc{ get; set; } /// /// Tags for this commit /// public List? Tags { get; set; } /// /// List of files that were modified, relative to the stream base /// public List? Files { get; set; } /// /// Constructor /// public GetCommitResponse(GetThinUserInfoResponse authorInfo, string description, DateTime dateUtc) { Author = authorInfo.Name; AuthorInfo = authorInfo; Description = description; DateUtc = dateUtc; } } }