using System; using System.Runtime.Serialization; using GitHub.Services.WebApi; using Newtonsoft.Json; namespace GitHub.Build.WebApi { /// /// Additional options for running phases against an agent queue. /// [DataContract] [KnownType(typeof(MultipleAgentExecutionOptions))] [KnownType(typeof(VariableMultipliersAgentExecutionOptions))] [JsonConverter(typeof(AgentTargetExecutionOptionsJsonConverter))] public class AgentTargetExecutionOptions : BaseSecuredObject { public AgentTargetExecutionOptions() : this(AgentTargetExecutionType.Normal) { } protected AgentTargetExecutionOptions(Int32 type) : this(type, null) { } internal AgentTargetExecutionOptions( ISecuredObject securedObject) : this(AgentTargetExecutionType.Normal, securedObject) { } internal AgentTargetExecutionOptions( Int32 type, ISecuredObject securedObject) : base(securedObject) { this.Type = type; } /// /// Indicates the type of execution options. /// [DataMember(EmitDefaultValue = true)] public Int32 Type { get; set; } } }