forked from dotnet/arcade
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkItemSummary.cs
More file actions
63 lines (54 loc) · 1.6 KB
/
WorkItemSummary.cs
File metadata and controls
63 lines (54 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Immutable;
using Newtonsoft.Json;
namespace Microsoft.DotNet.Helix.Client.Models
{
public partial class WorkItemSummary
{
public WorkItemSummary(string detailsUrl, string job, string name, string state)
{
DetailsUrl = detailsUrl;
Job = job;
Name = name;
State = state;
}
[JsonProperty("DetailsUrl")]
public string DetailsUrl { get; set; }
[JsonProperty("ExitCode")]
public int? ExitCode { get; set; }
[JsonProperty("ConsoleOutputUri")]
public string ConsoleOutputUri { get; set; }
[JsonProperty("Job")]
public string Job { get; set; }
[JsonProperty("Name")]
public string Name { get; set; }
[JsonProperty("State")]
public string State { get; set; }
[JsonIgnore]
public bool IsValid
{
get
{
if (string.IsNullOrEmpty(DetailsUrl))
{
return false;
}
if (string.IsNullOrEmpty(Job))
{
return false;
}
if (string.IsNullOrEmpty(Name))
{
return false;
}
if (string.IsNullOrEmpty(State))
{
return false;
}
return true;
}
}
}
}