Skip to content

Commit

Permalink
test: update monta client test
Browse files Browse the repository at this point in the history
  • Loading branch information
Per Kops committed Dec 13, 2024
1 parent 1e59aaf commit 242b90d
Show file tree
Hide file tree
Showing 558 changed files with 21,475 additions and 4,683 deletions.
15,326 changes: 10,857 additions & 4,469 deletions test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/Monta.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public class ChargeAuthToken
/// </summary>
public string? Name { get; set; }

/// <summary>
/// Operator of this charge auth token.
/// </summary>
public Operator? Operator { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class CreateChargeAuthToken
[RegularExpression("^(?!VID:)[\\s\\S]*")]
public string Identifier { get; set; }

/// <summary>
/// Type of the charge auth token.
/// </summary>
[Required]
public ChargeAuthenticationType Type { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public class ChargePointIntegration
/// </summary>
public long Id { get; set; }

/// <summary>
/// The current state of the charge point integration.
/// </summary>
[Required]
public ChargePointIntegrationStateDto State { get; set; }

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

/// <summary>
/// The charge point associated to this integration.
/// </summary>
[Required]
public ChargePoint ChargePoint { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public class ChargePointModel
[Required]
public string Name { get; set; }

/// <summary>
/// The brand of the charge point model.
/// </summary>
[Required]
public ChargePointModelDtoChargePointBrandDto Brand { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;

/// <summary>
/// ChargePointStatisticsDto.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class ChargePointStatisticsDto
{
/// <summary>
/// Start date of the statistics period.
/// </summary>
[Required]
public DateTimeOffset FromDate { get; set; }

/// <summary>
/// End date of the statistics period.
/// </summary>
[Required]
public DateTimeOffset ToDate { get; set; }

/// <summary>
/// Total energy consumed during the period (in kWh).
/// </summary>
[Required]
public double TotalEnergyConsumed { get; set; }

/// <summary>
/// Total number of charging sessions during the period.
/// </summary>
[Required]
public int TotalSessions { get; set; }

/// <summary>
/// Success rate of charging sessions during the period (as a percentage).
/// </summary>
[Required]
public double SessionSuccessRate { get; set; }

/// <summary>
/// Percentage of uptime for the system during the period.
/// </summary>
public double? SystemUptimePercentage { get; set; }

/// <summary>
/// Detailed state for the period.
/// </summary>
public List<States> States { get; set; } = new List<States>();

/// <summary>
/// Daily statistics for the period.
/// </summary>
public List<TimePeriod> Days { get; set; } = new List<TimePeriod>();

/// <summary>
/// Monthly statistics for the period.
/// </summary>
public List<TimePeriod> Months { get; set; } = new List<TimePeriod>();

/// <inheritdoc />
public override string ToString()
=> $"{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}";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;

/// <summary>
/// Performance.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class Performance
{
/// <summary>
/// State of the system or charge point.
/// </summary>
[Required]
public string Status { get; set; }

/// <summary>
/// Percentage of time in this state.
/// </summary>
[Required]
public double UsagePercentage { get; set; }

/// <inheritdoc />
public override string ToString()
=> $"{nameof(Status)}: {Status}, {nameof(UsagePercentage)}: {UsagePercentage}";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;

/// <summary>
/// Parameters for operation request.
/// Description: Retrieve statistics related to a charge point.
/// Operation: GetChargePointStatistics.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class GetChargePointStatisticsParameters
{
[Required]
[Range(0, 2147483647)]
public long ChargePointId { get; set; }

[Required]
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
public DateTimeOffset FromDate { get; set; }

[Required]
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
public DateTimeOffset ToDate { get; set; }

/// <inheritdoc />
public override string ToString()
=> $"{nameof(ChargePointId)}: {ChargePointId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;

/// <summary>
/// Parameters for operation request.
/// Description: Retrieve statistics related to a site.
/// Operation: GetSiteStatistics.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class GetSiteStatisticsParameters
{
[Required]
[Range(0, 2147483647)]
public long SiteId { get; set; }

[Required]
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
public DateTimeOffset FromDate { get; set; }

[Required]
[RegularExpression("\\d{4}-\\d{2}-\\d{2}")]
public DateTimeOffset ToDate { get; set; }

/// <inheritdoc />
public override string ToString()
=> $"{nameof(SiteId)}: {SiteId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;

/// <summary>
/// States.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class States
{
/// <summary>
/// State of the system or charge point.
/// </summary>
[Required]
public string State { get; set; }

/// <summary>
/// Percentage of the time spent in this state.
/// </summary>
[Required]
public double Percentage { get; set; }

/// <summary>
/// Duration in this state (in seconds).
/// </summary>
[Required]
public long Duration { get; set; }

/// <inheritdoc />
public override string ToString()
=> $"{nameof(State)}: {State}, {nameof(Percentage)}: {Percentage}, {nameof(Duration)}: {Duration}";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics;

/// <summary>
/// TimePeriod.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class TimePeriod
{
/// <summary>
/// Date for the statistics.
/// </summary>
[Required]
public DateTimeOffset Date { get; set; }

/// <summary>
/// Performance metrics for the day.
/// </summary>
[Required]
public List<Performance> DailyPerformance { get; set; }

/// <inheritdoc />
public override string ToString()
=> $"{nameof(Date)}: ({Date}), {nameof(DailyPerformance)}.Count: {DailyPerformance?.Count ?? 0}";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Monta.ApiClient.Generated.Contracts.ChargePoints;

/// <summary>
/// ChargePointOcppLog.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class ChargePointOcppLog
{
/// <summary>
/// Timestamp of the OCPP log.
/// </summary>
[Required]
public DateTimeOffset Timestamp { get; set; }

/// <summary>
/// Message content of the OCPP log, can be a string or an array of mixed types.
/// </summary>
[Required]
public string Message { get; set; }

/// <inheritdoc />
public override string ToString()
=> $"{nameof(Timestamp)}: ({Timestamp}), {nameof(Message)}: {Message}";
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ public class CreateChargePoint
[Required]
public double MaxKw { get; set; }

/// <summary>
/// Visibility type of the charge point.
/// </summary>
[Required]
public VisibilityType Visibility { get; set; }

/// <summary>
/// Electric current type the charge point support.
/// </summary>
[Required]
public ElectricCurrentType Type { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,21 @@ namespace Monta.ApiClient.Generated.Contracts.ChargePoints;
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class MapResult
{
/// <summary>
/// list of all charge points found in that area.
/// </summary>
[Required]
public List<MapResultChargePoint> ChargePoints { get; set; }

/// <summary>
/// list of all sites found in that area.
/// </summary>
[Required]
public List<MapResultSite> Sites { get; set; }

/// <summary>
/// list of all clusters (of charge points and sites) found in that area.
/// </summary>
[Required]
public List<MapResultCluster> Cluster { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public class MapResultChargePoint
/// </summary>
public string? State { get; set; }

/// <summary>
/// Location information for this charge point.
/// </summary>
[Required]
public Location Location { get; set; }

Expand All @@ -62,6 +65,9 @@ public class MapResultChargePoint
[Required]
public List<ChargePointConnector> Connectors { get; set; }

/// <summary>
/// Deeplinks to open charge screen in Monta app or web.
/// </summary>
[Required]
public ChargePointDeeplinks Deeplinks { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace Monta.ApiClient.Generated.Contracts.ChargePoints;
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class MapResultCluster
{
/// <summary>
/// Coordinates of the cluster.
/// </summary>
[Required]
public Coordinates Coordinates { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public class MapResultSite
/// </summary>
public string? Note { get; set; }

/// <summary>
/// Location information for this site.
/// </summary>
[Required]
public Location Location { get; set; }

Expand Down
Loading

0 comments on commit 242b90d

Please sign in to comment.