Skip to content

Commit 242b90d

Browse files
author
Per Kops
committed
test: update monta client test
1 parent 1e59aaf commit 242b90d

File tree

558 files changed

+21475
-4683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

558 files changed

+21475
-4683
lines changed

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/Monta.yaml

Lines changed: 10857 additions & 4469 deletions
Large diffs are not rendered by default.

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/ChargeAuthToken.verified.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public class ChargeAuthToken
5454
/// </summary>
5555
public string? Name { get; set; }
5656

57+
/// <summary>
58+
/// Operator of this charge auth token.
59+
/// </summary>
5760
public Operator? Operator { get; set; }
5861

5962
/// <summary>

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/CreateChargeAuthToken.verified.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public class CreateChargeAuthToken
3333
[RegularExpression("^(?!VID:)[\\s\\S]*")]
3434
public string Identifier { get; set; }
3535

36+
/// <summary>
37+
/// Type of the charge auth token.
38+
/// </summary>
3639
[Required]
3740
public ChargeAuthenticationType Type { get; set; }
3841

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointIntegrations/ChargePointIntegration.verified.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class ChargePointIntegration
1717
/// </summary>
1818
public long Id { get; set; }
1919

20+
/// <summary>
21+
/// The current state of the charge point integration.
22+
/// </summary>
2023
[Required]
2124
public ChargePointIntegrationStateDto State { get; set; }
2225

@@ -37,6 +40,9 @@ public class ChargePointIntegration
3740
/// </summary>
3841
public int? ConnectorId { get; set; }
3942

43+
/// <summary>
44+
/// The charge point associated to this integration.
45+
/// </summary>
4046
[Required]
4147
public ChargePoint ChargePoint { get; set; }
4248

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointModels/ChargePointModel.verified.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public class ChargePointModel
2929
[Required]
3030
public string Name { get; set; }
3131

32+
/// <summary>
33+
/// The brand of the charge point model.
34+
/// </summary>
3235
[Required]
3336
public ChargePointModelDtoChargePointBrandDto Brand { get; set; }
3437

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
//------------------------------------------------------------------------------
2+
// This code was auto-generated by ApiGenerator x.x.x.x.
3+
//
4+
// Changes to this file may cause incorrect behavior and will be lost if
5+
// the code is regenerated.
6+
//------------------------------------------------------------------------------
7+
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;
8+
9+
/// <summary>
10+
/// ChargePointStatisticsDto.
11+
/// </summary>
12+
[GeneratedCode("ApiGenerator", "x.x.x.x")]
13+
public class ChargePointStatisticsDto
14+
{
15+
/// <summary>
16+
/// Start date of the statistics period.
17+
/// </summary>
18+
[Required]
19+
public DateTimeOffset FromDate { get; set; }
20+
21+
/// <summary>
22+
/// End date of the statistics period.
23+
/// </summary>
24+
[Required]
25+
public DateTimeOffset ToDate { get; set; }
26+
27+
/// <summary>
28+
/// Total energy consumed during the period (in kWh).
29+
/// </summary>
30+
[Required]
31+
public double TotalEnergyConsumed { get; set; }
32+
33+
/// <summary>
34+
/// Total number of charging sessions during the period.
35+
/// </summary>
36+
[Required]
37+
public int TotalSessions { get; set; }
38+
39+
/// <summary>
40+
/// Success rate of charging sessions during the period (as a percentage).
41+
/// </summary>
42+
[Required]
43+
public double SessionSuccessRate { get; set; }
44+
45+
/// <summary>
46+
/// Percentage of uptime for the system during the period.
47+
/// </summary>
48+
public double? SystemUptimePercentage { get; set; }
49+
50+
/// <summary>
51+
/// Detailed state for the period.
52+
/// </summary>
53+
public List<States> States { get; set; } = new List<States>();
54+
55+
/// <summary>
56+
/// Daily statistics for the period.
57+
/// </summary>
58+
public List<TimePeriod> Days { get; set; } = new List<TimePeriod>();
59+
60+
/// <summary>
61+
/// Monthly statistics for the period.
62+
/// </summary>
63+
public List<TimePeriod> Months { get; set; } = new List<TimePeriod>();
64+
65+
/// <inheritdoc />
66+
public override string ToString()
67+
=> $"{nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(TotalEnergyConsumed)}: {TotalEnergyConsumed}, {nameof(TotalSessions)}: {TotalSessions}, {nameof(SessionSuccessRate)}: {SessionSuccessRate}, {nameof(SystemUptimePercentage)}: {SystemUptimePercentage}, {nameof(States)}.Count: {States?.Count ?? 0}, {nameof(Days)}.Count: {Days?.Count ?? 0}, {nameof(Months)}.Count: {Months?.Count ?? 0}";
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//------------------------------------------------------------------------------
2+
// This code was auto-generated by ApiGenerator x.x.x.x.
3+
//
4+
// Changes to this file may cause incorrect behavior and will be lost if
5+
// the code is regenerated.
6+
//------------------------------------------------------------------------------
7+
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;
8+
9+
/// <summary>
10+
/// Performance.
11+
/// </summary>
12+
[GeneratedCode("ApiGenerator", "x.x.x.x")]
13+
public class Performance
14+
{
15+
/// <summary>
16+
/// State of the system or charge point.
17+
/// </summary>
18+
[Required]
19+
public string Status { get; set; }
20+
21+
/// <summary>
22+
/// Percentage of time in this state.
23+
/// </summary>
24+
[Required]
25+
public double UsagePercentage { get; set; }
26+
27+
/// <inheritdoc />
28+
public override string ToString()
29+
=> $"{nameof(Status)}: {Status}, {nameof(UsagePercentage)}: {UsagePercentage}";
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//------------------------------------------------------------------------------
2+
// This code was auto-generated by ApiGenerator x.x.x.x.
3+
//
4+
// Changes to this file may cause incorrect behavior and will be lost if
5+
// the code is regenerated.
6+
//------------------------------------------------------------------------------
7+
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;
8+
9+
/// <summary>
10+
/// Parameters for operation request.
11+
/// Description: Retrieve statistics related to a charge point.
12+
/// Operation: GetChargePointStatistics.
13+
/// </summary>
14+
[GeneratedCode("ApiGenerator", "x.x.x.x")]
15+
public class GetChargePointStatisticsParameters
16+
{
17+
[Required]
18+
[Range(0, 2147483647)]
19+
public long ChargePointId { get; set; }
20+
21+
[Required]
22+
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
23+
public DateTimeOffset FromDate { get; set; }
24+
25+
[Required]
26+
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
27+
public DateTimeOffset ToDate { get; set; }
28+
29+
/// <inheritdoc />
30+
public override string ToString()
31+
=> $"{nameof(ChargePointId)}: {ChargePointId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})";
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//------------------------------------------------------------------------------
2+
// This code was auto-generated by ApiGenerator x.x.x.x.
3+
//
4+
// Changes to this file may cause incorrect behavior and will be lost if
5+
// the code is regenerated.
6+
//------------------------------------------------------------------------------
7+
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;
8+
9+
/// <summary>
10+
/// Parameters for operation request.
11+
/// Description: Retrieve statistics related to a site.
12+
/// Operation: GetSiteStatistics.
13+
/// </summary>
14+
[GeneratedCode("ApiGenerator", "x.x.x.x")]
15+
public class GetSiteStatisticsParameters
16+
{
17+
[Required]
18+
[Range(0, 2147483647)]
19+
public long SiteId { get; set; }
20+
21+
[Required]
22+
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
23+
public DateTimeOffset FromDate { get; set; }
24+
25+
[Required]
26+
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
27+
public DateTimeOffset ToDate { get; set; }
28+
29+
/// <inheritdoc />
30+
public override string ToString()
31+
=> $"{nameof(SiteId)}: {SiteId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})";
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//------------------------------------------------------------------------------
2+
// This code was auto-generated by ApiGenerator x.x.x.x.
3+
//
4+
// Changes to this file may cause incorrect behavior and will be lost if
5+
// the code is regenerated.
6+
//------------------------------------------------------------------------------
7+
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;
8+
9+
/// <summary>
10+
/// States.
11+
/// </summary>
12+
[GeneratedCode("ApiGenerator", "x.x.x.x")]
13+
public class States
14+
{
15+
/// <summary>
16+
/// State of the system or charge point.
17+
/// </summary>
18+
[Required]
19+
public string State { get; set; }
20+
21+
/// <summary>
22+
/// Percentage of the time spent in this state.
23+
/// </summary>
24+
[Required]
25+
public double Percentage { get; set; }
26+
27+
/// <summary>
28+
/// Duration in this state (in seconds).
29+
/// </summary>
30+
[Required]
31+
public long Duration { get; set; }
32+
33+
/// <inheritdoc />
34+
public override string ToString()
35+
=> $"{nameof(State)}: {State}, {nameof(Percentage)}: {Percentage}, {nameof(Duration)}: {Duration}";
36+
}

0 commit comments

Comments
 (0)