Skip to content

Commit 433d873

Browse files
Updated entities based on latest GraphQL schema (2023-11-18)
1 parent 64f17ba commit 433d873

19 files changed

+668
-0
lines changed

Scr/Sdk4me.GraphQL.Tests/AgileBoardTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public void Get()
1515
.SelectAll())
1616
.SelectDescriptionAttachments(new AttachmentQuery()
1717
.SelectAll())
18+
.SelectCustomerRepresentativeSlas(new ServiceLevelAgreementQuery()
19+
.SelectAll())
1820
).Result;
1921

2022
Assert.IsNotNull(agileBoards);

Scr/Sdk4me.GraphQL.Tests/ServiceLevelAgreementTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public void Get()
2929
.SelectAll())
3030
.SelectSkillPools(new SkillPoolQuery()
3131
.SelectAll())
32+
.SelectCoverageGroups(new SlaCoverageGroupQuery()
33+
.SelectAll())
3234
.SelectStandardServiceRequestActivityIDs(new StandardServiceRequestActivityIDQuery()
3335
.SelectAll())
3436
).Result;

Scr/Sdk4me.GraphQL/Entities/AgileBoard.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ public DataList<AgileBoardColumn>? Columns
3434
[JsonProperty("currentSprint")]
3535
public Sprint? CurrentSprint { get; internal set; }
3636

37+
[JsonProperty("customerRepresentativeSlas")]
38+
internal NodeCollection<ServiceLevelAgreement>? CustomerRepresentativeSlasCollection { get; set; }
39+
40+
/// <summary>
41+
/// Customer representatives of these service level agreements can view this board in Self Service.
42+
/// </summary>
43+
public DataList<ServiceLevelAgreement>? CustomerRepresentativeSlas
44+
{
45+
get => CustomerRepresentativeSlasCollection?.Data;
46+
}
47+
3748
/// <summary>
3849
/// Description of the agile board.
3950
/// </summary>
@@ -97,13 +108,15 @@ internal override HashSet<QueryPageInfo> GetQueryPageInfo(string fieldName, int
97108
{
98109
HashSet<QueryPageInfo> retval = new();
99110
retval.AddRange(ColumnsCollection?.GetQueryPageInfo("columns", depth + 1));
111+
retval.AddRange(CustomerRepresentativeSlasCollection?.GetQueryPageInfo("customerRepresentativeSlas", depth + 1));
100112
retval.AddRange(DescriptionAttachmentsCollection?.GetQueryPageInfo("descriptionAttachments", depth + 1));
101113
return retval;
102114
}
103115

104116
internal override void AddToCollection(object data)
105117
{
106118
Columns?.AddRange((data as AgileBoard)?.Columns);
119+
CustomerRepresentativeSlas?.AddRange((data as AgileBoard)?.CustomerRepresentativeSlas);
107120
DescriptionAttachments?.AddRange((data as AgileBoard)?.DescriptionAttachments);
108121
}
109122
}

Scr/Sdk4me.GraphQL/Entities/AgileBoardCreateInput.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
public class AgileBoardCreateInput : PropertyChangeSet
77
{
88
private string? clientMutationId;
9+
private List<string>? customerRepresentativeSlaIds;
910
private string? description;
1011
private List<AttachmentInput>? descriptionAttachments;
1112
private bool? disabled;
@@ -26,6 +27,16 @@ public string? ClientMutationId
2627
set => clientMutationId = Set("clientMutationId", value);
2728
}
2829

30+
/// <summary>
31+
/// Identifiers of the service level agreements of which the customer representatives can view this board in Self Service.
32+
/// </summary>
33+
[JsonProperty("customerRepresentativeSlaIds")]
34+
public List<string>? CustomerRepresentativeSlaIds
35+
{
36+
get => customerRepresentativeSlaIds;
37+
set => customerRepresentativeSlaIds = Set("customerRepresentativeSlaIds", value);
38+
}
39+
2940
/// <summary>
3041
/// Description of the agile board.
3142
/// </summary>

Scr/Sdk4me.GraphQL/Entities/AgileBoardUpdateInput.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public class AgileBoardUpdateInput : PropertyChangeSet
77
{
88
private string? clientMutationId;
99
private List<string>? columnsToDelete;
10+
private List<string>? customerRepresentativeSlaIds;
1011
private string? description;
1112
private List<AttachmentInput>? descriptionAttachments;
1213
private bool? disabled;
@@ -38,6 +39,16 @@ public List<string>? ColumnsToDelete
3839
set => columnsToDelete = Set("columnsToDelete", value);
3940
}
4041

42+
/// <summary>
43+
/// Identifiers of the service level agreements of which the customer representatives can view this board in Self Service.
44+
/// </summary>
45+
[JsonProperty("customerRepresentativeSlaIds")]
46+
public List<string>? CustomerRepresentativeSlaIds
47+
{
48+
get => customerRepresentativeSlaIds;
49+
set => customerRepresentativeSlaIds = Set("customerRepresentativeSlaIds", value);
50+
}
51+
4152
/// <summary>
4253
/// Description of the agile board.
4354
/// </summary>

Scr/Sdk4me.GraphQL/Entities/ServiceLevelAgreement.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ public class ServiceLevelAgreement : Node
2929
[JsonProperty("coverage")]
3030
public SlaCoverage? Coverage { get; internal set; }
3131

32+
[JsonProperty("coverageGroups")]
33+
internal NodeCollection<SlaCoverageGroup>? CoverageGroupsCollection { get; set; }
34+
35+
/// <summary>
36+
/// Coverage groups of the service level agreement. Only available for service level agreements where the <c>coverage</c> field is set to <c>coverage_groups</c>.
37+
/// </summary>
38+
public DataList<SlaCoverageGroup>? CoverageGroups
39+
{
40+
get => CoverageGroupsCollection?.Data;
41+
}
42+
3243
/// <summary>
3344
/// The date and time at which the record was created.
3445
/// </summary>
@@ -244,6 +255,7 @@ public DataList<StandardServiceRequestActivityID>? StandardServiceRequestActivit
244255
internal override HashSet<QueryPageInfo> GetQueryPageInfo(string fieldName, int depth)
245256
{
246257
HashSet<QueryPageInfo> retval = new();
258+
retval.AddRange(CoverageGroupsCollection?.GetQueryPageInfo("coverageGroups", depth + 1));
247259
retval.AddRange(CustomerRepresentativesCollection?.GetQueryPageInfo("customerRepresentatives", depth + 1));
248260
retval.AddRange(EffortClassRateIDsCollection?.GetQueryPageInfo("effortClassRateIDs", depth + 1));
249261
retval.AddRange(InvoicesCollection?.GetQueryPageInfo("invoices", depth + 1));
@@ -259,6 +271,7 @@ internal override HashSet<QueryPageInfo> GetQueryPageInfo(string fieldName, int
259271

260272
internal override void AddToCollection(object data)
261273
{
274+
CoverageGroups?.AddRange((data as ServiceLevelAgreement)?.CoverageGroups);
262275
CustomerRepresentatives?.AddRange((data as ServiceLevelAgreement)?.CustomerRepresentatives);
263276
EffortClassRateIDs?.AddRange((data as ServiceLevelAgreement)?.EffortClassRateIDs);
264277
Invoices?.AddRange((data as ServiceLevelAgreement)?.Invoices);
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
namespace Sdk4me.GraphQL
2+
{
3+
/// <summary>
4+
/// The <see href="https://developer.4me.com/graphql/object/slacoveragegroup/">SlaCoverageGroup</see> object.
5+
/// </summary>
6+
public class SlaCoverageGroup : Node
7+
{
8+
/// <summary>
9+
/// The account this record belongs to.
10+
/// </summary>
11+
[JsonProperty("account")]
12+
public Account? Account { get; internal set; }
13+
14+
/// <summary>
15+
/// The date and time at which the record was created.
16+
/// </summary>
17+
[JsonProperty("createdAt")]
18+
public DateTime? CreatedAt { get; internal set; }
19+
20+
/// <summary>
21+
/// Any additional information about the SLA coverage group.
22+
/// </summary>
23+
[JsonProperty("description")]
24+
public string? Description { get; internal set; }
25+
26+
[JsonProperty("descriptionAttachments")]
27+
internal NodeCollection<Attachment>? DescriptionAttachmentsCollection { get; set; }
28+
29+
/// <summary>
30+
/// The attachments used in the <c>description</c> field.
31+
/// </summary>
32+
public DataList<Attachment>? DescriptionAttachments
33+
{
34+
get => DescriptionAttachmentsCollection?.Data;
35+
}
36+
37+
/// <summary>
38+
/// Whether the SLA coverage group may no longer be related to other records.
39+
/// </summary>
40+
[JsonProperty("disabled")]
41+
public bool? Disabled { get; internal set; }
42+
43+
/// <summary>
44+
/// The name of the SLA coverage group.
45+
/// </summary>
46+
[JsonProperty("name")]
47+
public string? Name { get; internal set; }
48+
49+
[JsonProperty("people")]
50+
internal NodeCollection<Person>? PeopleCollection { get; set; }
51+
52+
/// <summary>
53+
/// People of the SLA coverage group.
54+
/// </summary>
55+
public DataList<Person>? People
56+
{
57+
get => PeopleCollection?.Data;
58+
}
59+
60+
/// <summary>
61+
/// The phrase used to filter the people.
62+
/// </summary>
63+
[JsonProperty("searchPhrase")]
64+
public string? SearchPhrase { get; internal set; }
65+
66+
[JsonProperty("slas")]
67+
internal NodeCollection<ServiceLevelAgreement>? SlasCollection { get; set; }
68+
69+
/// <summary>
70+
/// Service level agreements linked to the SLA coverage group.
71+
/// </summary>
72+
public DataList<ServiceLevelAgreement>? Slas
73+
{
74+
get => SlasCollection?.Data;
75+
}
76+
77+
/// <summary>
78+
/// An identifier for the client application submitting the resource or the name of an external system.
79+
/// </summary>
80+
[JsonProperty("source")]
81+
public string? Source { get; internal set; }
82+
83+
/// <summary>
84+
/// The unique identifier of the resource in an external system.
85+
/// </summary>
86+
[JsonProperty("sourceID")]
87+
public string? SourceID { get; internal set; }
88+
89+
/// <summary>
90+
/// The date and time of the last update of the record. If the record has no updates it contains the <c>createdAt</c> value.
91+
/// </summary>
92+
[JsonProperty("updatedAt")]
93+
public DateTime? UpdatedAt { get; internal set; }
94+
95+
internal override HashSet<QueryPageInfo> GetQueryPageInfo(string fieldName, int depth)
96+
{
97+
HashSet<QueryPageInfo> retval = new();
98+
retval.AddRange(DescriptionAttachmentsCollection?.GetQueryPageInfo("descriptionAttachments", depth + 1));
99+
retval.AddRange(PeopleCollection?.GetQueryPageInfo("people", depth + 1));
100+
retval.AddRange(SlasCollection?.GetQueryPageInfo("slas", depth + 1));
101+
return retval;
102+
}
103+
104+
internal override void AddToCollection(object data)
105+
{
106+
DescriptionAttachments?.AddRange((data as SlaCoverageGroup)?.DescriptionAttachments);
107+
People?.AddRange((data as SlaCoverageGroup)?.People);
108+
Slas?.AddRange((data as SlaCoverageGroup)?.Slas);
109+
}
110+
}
111+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
namespace Sdk4me.GraphQL
2+
{
3+
/// <summary>
4+
/// The <see href="https://developer.4me.com/graphql/input_object/slacoveragegroupcreateinput/">SlaCoverageGroupCreateInput</see> object.
5+
/// </summary>
6+
public class SlaCoverageGroupCreateInput : PropertyChangeSet
7+
{
8+
private string? clientMutationId;
9+
private string? description;
10+
private List<AttachmentInput>? descriptionAttachments;
11+
private bool? disabled;
12+
private string? name;
13+
private string? searchPhrase;
14+
private string? source;
15+
private string? sourceID;
16+
17+
/// <summary>
18+
/// A unique identifier for the client performing the mutation.
19+
/// </summary>
20+
[JsonProperty("clientMutationId")]
21+
public string? ClientMutationId
22+
{
23+
get => clientMutationId;
24+
set => clientMutationId = Set("clientMutationId", value);
25+
}
26+
27+
/// <summary>
28+
/// Any additional information about the SLA coverage group.
29+
/// </summary>
30+
[JsonProperty("description")]
31+
public string? Description
32+
{
33+
get => description;
34+
set => description = Set("description", value);
35+
}
36+
37+
/// <summary>
38+
/// The attachments used in the <c>description</c> field.
39+
/// </summary>
40+
[JsonProperty("descriptionAttachments")]
41+
public List<AttachmentInput>? DescriptionAttachments
42+
{
43+
get => descriptionAttachments;
44+
set => descriptionAttachments = Set("descriptionAttachments", value);
45+
}
46+
47+
/// <summary>
48+
/// Whether the SLA coverage group may no longer be related to other records.
49+
/// </summary>
50+
[JsonProperty("disabled")]
51+
public bool? Disabled
52+
{
53+
get => disabled;
54+
set => disabled = Set("disabled", value);
55+
}
56+
57+
/// <summary>
58+
/// The name of the SLA coverage group.
59+
/// </summary>
60+
[JsonProperty("name")]
61+
public string? Name
62+
{
63+
get => name;
64+
set => name = Set("name", value);
65+
}
66+
67+
/// <summary>
68+
/// The phrase used to filter the people.
69+
/// </summary>
70+
[JsonProperty("searchPhrase")]
71+
public string? SearchPhrase
72+
{
73+
get => searchPhrase;
74+
set => searchPhrase = Set("searchPhrase", value);
75+
}
76+
77+
/// <summary>
78+
/// An identifier for the client application submitting the resource or the name of an external system.
79+
/// </summary>
80+
[JsonProperty("source")]
81+
public string? Source
82+
{
83+
get => source;
84+
set => source = Set("source", value);
85+
}
86+
87+
/// <summary>
88+
/// The unique identifier of the resource in an external system.
89+
/// </summary>
90+
[JsonProperty("sourceID")]
91+
public string? SourceID
92+
{
93+
get => sourceID;
94+
set => sourceID = Set("sourceID", value);
95+
}
96+
}
97+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace Sdk4me.GraphQL
2+
{
3+
/// <summary>
4+
/// The <see href="https://developer.4me.com/graphql/object/slacoveragegroupcreatepayload/">SlaCoverageGroupCreatePayload</see> object.
5+
/// </summary>
6+
public class SlaCoverageGroupCreatePayload : Payload
7+
{
8+
/// <summary>
9+
/// Record after mutation.
10+
/// </summary>
11+
[JsonProperty("slaCoverageGroup"), Sdk4meField(true)]
12+
public SlaCoverageGroup? SlaCoverageGroup { get; internal set; }
13+
}
14+
}

0 commit comments

Comments
 (0)