using System; using System.Runtime.Serialization; using GitHub.Services.WebApi; using Newtonsoft.Json; namespace GitHub.Build.WebApi { /// /// Represents options for running a phase on the server. /// [DataContract] [KnownType(typeof(VariableMultipliersServerExecutionOptions))] [JsonConverter(typeof(ServerTargetExecutionOptionsJsonConverter))] public class ServerTargetExecutionOptions : BaseSecuredObject { public ServerTargetExecutionOptions() : this(ServerTargetExecutionType.Normal) { } protected ServerTargetExecutionOptions(Int32 type) : this(type, null) { } internal ServerTargetExecutionOptions( ISecuredObject securedObject) : this(ServerTargetExecutionType.Normal, securedObject) { } internal ServerTargetExecutionOptions( Int32 type, ISecuredObject securedObject) : base(securedObject) { this.Type = type; } /// /// The type. /// /// /// for supported types. /// [DataMember(EmitDefaultValue = true)] public Int32 Type { get; private set; } } }