using System.Text.Json.Serialization; using Elsa.Workflows.Core.Contracts; namespace Elsa.Http.Models; /// /// A binding between an HTTP status code and an activity. /// public class HttpStatusCodeCase { /// /// Creates a new instance of the class. /// [JsonConstructor] public HttpStatusCodeCase() { } /// /// Creates a new instance of the class. /// public HttpStatusCodeCase(int statusCode, IActivity activity) { StatusCode = statusCode; Activity = activity; } /// /// The HTTP status code to match. /// public int StatusCode { get; set; } /// /// The activity to execute when the HTTP status code matches. /// public IActivity? Activity { get; set; } }