Add Unity Pipeline package support

This commit is contained in:
ud18010
2026-07-31 17:34:04 +08:00
parent d1a526094e
commit 786b7ffff9
590 changed files with 51995 additions and 2 deletions
@@ -0,0 +1,49 @@
using System;
using Newtonsoft.Json;
namespace Unity.Pipeline.Models
{
/// <summary>
/// Base class for all responses. Serve also as the base class for all errors.
/// </summary>
[Serializable]
public class BaseResponse
{
/// <summary>
/// Response message if no error
/// </summary>
[JsonProperty("message")]
public string Message { get; set; }
/// <summary>
/// Error message if the command failed.
/// </summary>
[JsonProperty("error")]
public string Error { get; set; }
/// <summary>
/// Additional error details for debugging.
/// </summary>
[JsonProperty("errorDetails")]
public string ErrorDetails { get; set; }
/// <summary>
/// When was the response created.
/// </summary>
[JsonProperty("executedAt")]
public DateTime ExecutedAt { get; set; }
/// <summary>
/// Create a failed execution response.
/// </summary>
public static BaseResponse Failure(string error, string errorDetails)
{
return new BaseResponse
{
ExecutedAt = DateTime.UtcNow,
Error = error,
ErrorDetails = errorDetails
};
}
}
}