diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Facilities/CircuitRatingsResponse.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Facilities/CircuitRatingsResponse.cs
new file mode 100644
index 0000000..0b2bfec
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Facilities/CircuitRatingsResponse.cs
@@ -0,0 +1,22 @@
+namespace HeimdallPower.Api.Client.CapacityMonitoring.Facilities;
+
+public record CircuitRatingsResponse
+{
+ ///
+ /// A human-readable label identifying the rating returned by this endpoint, independent of the quantity parameter.
+ ///
+ /// Circuit rating
+ public required string Metric { get; init; }
+
+ ///
+ /// The unit of the values in the response. Depends on the requested quantity:
+ /// "Ampere" for current (default), "MVA" for apparent_power.
+ ///
+ /// Ampere
+ public required string Unit { get; init; }
+
+ ///
+ /// List of circuit ratings within the requested time range.
+ ///
+ public required List CircuitRatings { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Lines/HeimdallAarsResponse.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Lines/HeimdallAarsResponse.cs
new file mode 100644
index 0000000..5817669
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Lines/HeimdallAarsResponse.cs
@@ -0,0 +1,22 @@
+namespace HeimdallPower.Api.Client.CapacityMonitoring.Lines;
+
+public record HeimdallAarsResponse
+{
+ ///
+ /// A human-readable label identifying the rating returned by this endpoint, independent of the quantity parameter.
+ ///
+ /// Heimdall AAR
+ public required string Metric { get; init; }
+
+ ///
+ /// The unit of the values in the response. Depends on the requested quantity:
+ /// "Ampere" for current (default), "MVA" for apparent_power.
+ ///
+ /// Ampere
+ public required string Unit { get; init; }
+
+ ///
+ /// List of Heimdall AAR values within the requested time range. May be empty if no data exists for the period.
+ ///
+ public required List HeimdallAars { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Lines/HeimdallDlrsResponse.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Lines/HeimdallDlrsResponse.cs
new file mode 100644
index 0000000..3c44bfa
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Lines/HeimdallDlrsResponse.cs
@@ -0,0 +1,22 @@
+namespace HeimdallPower.Api.Client.CapacityMonitoring.Lines;
+
+public record HeimdallDlrsResponse
+{
+ ///
+ /// A human-readable label identifying the rating returned by this endpoint, independent of the quantity parameter.
+ ///
+ /// Heimdall DLR
+ public required string Metric { get; init; }
+
+ ///
+ /// The unit of the values in the response. Depends on the requested quantity:
+ /// "Ampere" for current (default), "MVA" for apparent_power.
+ ///
+ /// Ampere
+ public required string Unit { get; init; }
+
+ ///
+ /// List of Heimdall DLR values within the requested time range. May be empty if no data exists for the period.
+ ///
+ public required List HeimdallDlrs { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Quantity.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Quantity.cs
new file mode 100644
index 0000000..cd2cf64
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/CapacityMonitoring/Quantity.cs
@@ -0,0 +1,27 @@
+namespace HeimdallPower.Api.Client.CapacityMonitoring;
+
+///
+/// Controls which physical quantity is returned by a rating endpoint.
+///
+public enum Quantity
+{
+ ///
+ /// Values in amperes (default).
+ ///
+ Current,
+
+ ///
+ /// Values converted to three-phase apparent power in MVA using S = sqrt(3) * V * I / 1,000,000.
+ /// The line's operational voltage is used when set and positive; otherwise the nominal voltage is used.
+ ///
+ ApparentPower,
+}
+
+internal static class QuantityExtensions
+{
+ public static string ToQueryValue(this Quantity quantity) => quantity switch
+ {
+ Quantity.ApparentPower => "apparent_power",
+ _ => "current",
+ };
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/ApparentPowersResponse.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/ApparentPowersResponse.cs
new file mode 100644
index 0000000..bc8b800
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/ApparentPowersResponse.cs
@@ -0,0 +1,23 @@
+using HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+namespace HeimdallPower.Api.Client.GridInsights.Lines;
+
+public record ApparentPowersResponse
+{
+ ///
+ /// The kind of data this response contains.
+ ///
+ /// Apparent power
+ public required string Metric { get; init; }
+
+ ///
+ /// The unit of the values in the response.
+ ///
+ /// MVA
+ public required string Unit { get; init; }
+
+ ///
+ /// List of apparent power values within the requested time range. May be empty if no data exists for the period.
+ ///
+ public required IReadOnlyCollection ApparentPowers { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/ApparentPowerDto.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/ApparentPowerDto.cs
new file mode 100644
index 0000000..80ea6cd
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/ApparentPowerDto.cs
@@ -0,0 +1,16 @@
+namespace HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+public record ApparentPowerDto
+{
+ ///
+ /// Time (in UTC) when the underlying current was measured.
+ ///
+ /// 2024-07-01T12:00:00.001Z
+ public DateTimeOffset Timestamp { get; init; }
+
+ ///
+ /// The apparent power derived for the line at the given time, in MVA.
+ ///
+ /// 156.7
+ public double Value { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/IcingForecastDataPointDto.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/IcingForecastDataPointDto.cs
new file mode 100644
index 0000000..b8818ee
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/IcingForecastDataPointDto.cs
@@ -0,0 +1,15 @@
+namespace HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+public record IcingForecastDataPointDto
+{
+ ///
+ /// Time (UTC) for this forecast data point.
+ ///
+ /// 2024-01-15T08:33:00Z
+ public DateTimeOffset Timestamp { get; init; }
+
+ ///
+ /// The forecasted ice weight at this time point.
+ ///
+ public required MeasurementResult IceWeight { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/IcingForecastDto.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/IcingForecastDto.cs
new file mode 100644
index 0000000..729c85d
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/IcingForecastDto.cs
@@ -0,0 +1,14 @@
+namespace HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+public record IcingForecastDto
+{
+ ///
+ /// The peak ice weight across all span phases and all forecast time points.
+ ///
+ public required MaxIcingForecastDto Max { get; init; }
+
+ ///
+ /// List of spans on the line with their icing forecast data.
+ ///
+ public required IReadOnlyCollection Spans { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/MaxIcingForecastDto.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/MaxIcingForecastDto.cs
new file mode 100644
index 0000000..d77a7b1
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/MaxIcingForecastDto.cs
@@ -0,0 +1,9 @@
+namespace HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+public record MaxIcingForecastDto
+{
+ ///
+ /// The peak ice weight across all span phases and all forecast time points.
+ ///
+ public required SpanPhaseMeasurementResult IceWeight { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/SpanIcingForecastDto.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/SpanIcingForecastDto.cs
new file mode 100644
index 0000000..edad27b
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/SpanIcingForecastDto.cs
@@ -0,0 +1,15 @@
+namespace HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+public record SpanIcingForecastDto
+{
+ ///
+ /// The id of the span.
+ ///
+ /// 00000000-0000-0000-0000-000000000000
+ public Guid SpanId { get; init; }
+
+ ///
+ /// List of span phases (conductors) within this span with their icing forecast.
+ ///
+ public required IReadOnlyCollection SpanPhases { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/SpanPhaseIcingForecastDto.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/SpanPhaseIcingForecastDto.cs
new file mode 100644
index 0000000..30c245a
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/Dtos/SpanPhaseIcingForecastDto.cs
@@ -0,0 +1,15 @@
+namespace HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+public record SpanPhaseIcingForecastDto
+{
+ ///
+ /// The id of the span phase.
+ ///
+ /// 00000000-0000-0000-0000-000000000000
+ public Guid SpanPhaseId { get; init; }
+
+ ///
+ /// Forecasted icing data points for this span phase. Covers 72 hours in 30-minute intervals (144 data points).
+ ///
+ public required IReadOnlyCollection Forecast { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/IcingForecastResponse.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/IcingForecastResponse.cs
new file mode 100644
index 0000000..787ca26
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/IcingForecastResponse.cs
@@ -0,0 +1,23 @@
+using HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+namespace HeimdallPower.Api.Client.GridInsights.Lines;
+
+public record IcingForecastResponse
+{
+ ///
+ /// The kind of data this response contains.
+ ///
+ /// Icing forecast
+ public required string Metric { get; init; }
+
+ ///
+ /// The unit of ice weight measurements. kg/m for metric, lb/ft for imperial.
+ ///
+ /// kg/m
+ public required string Unit { get; init; }
+
+ ///
+ /// Icing forecast for the line organized by spans and span phases.
+ ///
+ public required IcingForecastDto Icing { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/LatestApparentPowerResponse.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/LatestApparentPowerResponse.cs
new file mode 100644
index 0000000..44b1d16
--- /dev/null
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/GridInsights/Lines/LatestApparentPowerResponse.cs
@@ -0,0 +1,23 @@
+using HeimdallPower.Api.Client.GridInsights.Lines.Dtos;
+
+namespace HeimdallPower.Api.Client.GridInsights.Lines;
+
+public record LatestApparentPowerResponse
+{
+ ///
+ /// The kind of data this response contains.
+ ///
+ /// Apparent power
+ public required string Metric { get; init; }
+
+ ///
+ /// The unit of the value in the response.
+ ///
+ /// MVA
+ public required string Unit { get; init; }
+
+ ///
+ /// The most recent apparent power measurement for the line.
+ ///
+ public required ApparentPowerDto ApparentPower { get; init; }
+}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/HeimdallApiClient.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/HeimdallApiClient.cs
index b02b92e..68e7459 100644
--- a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/HeimdallApiClient.cs
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/HeimdallApiClient.cs
@@ -1,4 +1,5 @@
using HeimdallPower.Api.Client.Assets;
+using HeimdallPower.Api.Client.CapacityMonitoring;
using HeimdallPower.Api.Client.CapacityMonitoring.Facilities;
using HeimdallPower.Api.Client.CapacityMonitoring.Lines;
using HeimdallPower.Api.Client.CapacityMonitoring.Lines.Forecasts;
@@ -116,6 +117,43 @@ public async Task GetLatestSagAndClearanceAsy
return response.Data;
}
+ ///
+ /// Get icing forecasts for the line. Covers 72 hours in 30-minute intervals.
+ ///
+ /// Id of the line for which to retrieve icing forecasts.
+ /// The unit system for the measurements. "metric" uses kg/m, "imperial" uses lb/ft. Defaults to metric.
+ public async Task GetIcingForecastAsync(Guid lineId, string unitSystem = "metric")
+ {
+ var url = UrlBuilder.BuildIcingForecastUrl(lineId, unitSystem);
+ var response = await _heimdallApiClient.GetAsync>(url);
+ return response.Data;
+ }
+
+ ///
+ /// Get the most recent apparent power measurement for the line.
+ ///
+ /// Id of the line for which to retrieve the latest apparent power.
+ public async Task GetLatestApparentPowerAsync(Guid lineId)
+ {
+ var url = UrlBuilder.BuildLatestApparentPowerUrl(lineId);
+ var response = await _heimdallApiClient.GetAsync>(url);
+ return response.Data;
+ }
+
+ ///
+ /// Get apparent power values for the line within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the line.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ public async Task GetApparentPowersAsync(Guid lineId, DateTimeOffset from, DateTimeOffset to)
+ {
+ var url = UrlBuilder.BuildApparentPowersUrl(lineId, from, to);
+ var response = await _heimdallApiClient.GetAsync>(url);
+ return response.Data;
+ }
+
///
/// Get the most recent Heimdall Dynamic Line Rating (DLR) for the line.
/// Heimdall DLR is calculated according to our own proprietary method, based on the CIGRE TB-601 standard for thermal calculation for OHLs.
@@ -123,9 +161,10 @@ public async Task GetLatestSagAndClearanceAsy
/// Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum ampacity is calculated for each window.
///
/// Id of the line for which to retrieve the latest Heimdall DLR.
- public async Task GetLatestHeimdallDlrAsync(Guid lineId)
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetLatestHeimdallDlrAsync(Guid lineId, Quantity quantity = Quantity.Current)
{
- var url = UrlBuilder.BuildHeimdallDlrUrl(lineId);
+ var url = UrlBuilder.BuildHeimdallDlrUrl(lineId, quantity);
var response = await _heimdallApiClient.GetAsync>(url);
return response.Data;
@@ -138,9 +177,10 @@ public async Task GetLatestHeimdallDlrAsync(Guid line
/// Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum ampacity is calculated for each window.
///
/// Id of the line for which to retrieve the latest Heimdall AAR.
- public async Task GetLatestHeimdallAarAsync(Guid lineId)
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetLatestHeimdallAarAsync(Guid lineId, Quantity quantity = Quantity.Current)
{
- var url = UrlBuilder.BuildHeimdallAarUrl(lineId);
+ var url = UrlBuilder.BuildHeimdallAarUrl(lineId, quantity);
var response = await _heimdallApiClient.GetAsync>(url);
return response.Data;
@@ -153,9 +193,10 @@ public async Task GetLatestHeimdallAarAsync(Guid line
/// For each unique timestamp and confidence level, we pick the value from the span which has the lowest ampacity value as this will be the dimensioning value for the line.
///
/// Id of the line for which to retrieve Heimdall DLR forecasts.
- public async Task GetHeimdallDlrForecastsAsync(Guid lineId)
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetHeimdallDlrForecastsAsync(Guid lineId, Quantity quantity = Quantity.Current)
{
- var url = UrlBuilder.BuildDlrForecastUrl(lineId);
+ var url = UrlBuilder.BuildDlrForecastUrl(lineId, quantity);
var response = await _heimdallApiClient.GetAsync>(url);
return response.Data;
@@ -168,39 +209,88 @@ public async Task GetHeimdallDlrForecastsAsync(Guid
/// For each unique timestamp and confidence level, we pick the value from the span which has the lowest ampacity value as this will be the dimensioning value for the line.
///
/// Id of the line for which to retrieve Heimdall AAR forecasts.
- public async Task GetHeimdallAarForecastsAsync(Guid lineId)
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetHeimdallAarForecastsAsync(Guid lineId, Quantity quantity = Quantity.Current)
{
- var url = UrlBuilder.BuildAarForecastUrl(lineId);
+ var url = UrlBuilder.BuildAarForecastUrl(lineId, quantity);
var response = await _heimdallApiClient.GetAsync>(url);
return response.Data;
}
+ ///
+ /// Get Heimdall Dynamic Line Rating (DLR) values for the line within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the line.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetHeimdallDlrsAsync(Guid lineId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current)
+ {
+ var url = UrlBuilder.BuildHeimdallDlrsUrl(lineId, from, to, quantity);
+ var response = await _heimdallApiClient.GetAsync>(url);
+
+ return response.Data;
+ }
+
+ ///
+ /// Get Heimdall Ambient-Adjusted Rating (AAR) values for the line within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the line.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetHeimdallAarsAsync(Guid lineId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current)
+ {
+ var url = UrlBuilder.BuildHeimdallAarsUrl(lineId, from, to, quantity);
+ var response = await _heimdallApiClient.GetAsync>(url);
+
+ return response.Data;
+ }
+
///
/// Get the most recent circuit rating forecasts for a specified facility.
/// The forecasted hours returned by the endpoint are set to 72 hours
/// and are provided in 1-hour intervals.
///
/// Id of the facility for which to retrieve circuit rating forecasts.
- public async Task GetCircuitRatingForecastsAsync(Guid facilityId)
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetCircuitRatingForecastsAsync(Guid facilityId, Quantity quantity = Quantity.Current)
{
- var url = UrlBuilder.BuildCircuitRatingForecastUrl(facilityId);
+ var url = UrlBuilder.BuildCircuitRatingForecastUrl(facilityId, quantity);
var response = await _heimdallApiClient.GetAsync>(url);
return response.Data;
}
///
- /// Get the most recent circuit rating forecasts for a specified facility.
- /// The forecasted hours returned by the endpoint are set to 72 hours
- /// and are provided in 1-hour intervals.
+ /// Get the most recent circuit rating for a specified facility.
///
- /// Id of the facility for which to retrieve circuit rating forecasts.
- public async Task GetLatestCircuitRatingAsync(Guid facilityId)
+ /// Id of the facility for which to retrieve the latest circuit rating.
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetLatestCircuitRatingAsync(Guid facilityId, Quantity quantity = Quantity.Current)
{
- var url = UrlBuilder.BuildCircuitRatingUrl(facilityId);
+ var url = UrlBuilder.BuildCircuitRatingUrl(facilityId, quantity);
var response = await _heimdallApiClient.GetAsync>(url);
return response.Data;
}
+
+ ///
+ /// Get circuit ratings for a specified facility within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the facility.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ public async Task GetCircuitRatingsAsync(Guid facilityId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current)
+ {
+ var url = UrlBuilder.BuildCircuitRatingsUrl(facilityId, from, to, quantity);
+ var response = await _heimdallApiClient.GetAsync>(url);
+
+ return response.Data;
+ }
}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/IHeimdallApiClient.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/IHeimdallApiClient.cs
index 40cccef..6ddeffb 100644
--- a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/IHeimdallApiClient.cs
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/IHeimdallApiClient.cs
@@ -1,4 +1,5 @@
using HeimdallPower.Api.Client.Assets;
+using HeimdallPower.Api.Client.CapacityMonitoring;
using HeimdallPower.Api.Client.CapacityMonitoring.Facilities;
using HeimdallPower.Api.Client.CapacityMonitoring.Lines;
using HeimdallPower.Api.Client.CapacityMonitoring.Lines.Forecasts;
@@ -56,39 +57,97 @@ public interface IHeimdallApiClient
/// Optional cutoff time (UTC). Only measurements at or after this instant are considered. Older data for a span phase is excluded. If omitted, defaults to 30 min ago.
Task GetLatestSagAndClearanceAsync(Guid lineId, string unitSystem = "metric", DateTimeOffset? since = null);
+ ///
+ /// Get icing forecasts for the line. Covers 72 hours in 30-minute intervals.
+ ///
+ /// Id of the line for which to retrieve icing forecasts.
+ /// The unit system for the measurements. "metric" uses kg/m, "imperial" uses lb/ft. Defaults to metric.
+ Task GetIcingForecastAsync(Guid lineId, string unitSystem = "metric");
+
+ ///
+ /// Get the most recent apparent power measurement for the line.
+ ///
+ /// Id of the line for which to retrieve the latest apparent power.
+ Task GetLatestApparentPowerAsync(Guid lineId);
+
+ ///
+ /// Get apparent power values for the line within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the line.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ Task GetApparentPowersAsync(Guid lineId, DateTimeOffset from, DateTimeOffset to);
+
///
/// Get the most recent Heimdall Dynamic Line Rating (DLR) for the line.
///
/// Id of the line for which to retrieve the latest Heimdall DLR.
- Task GetLatestHeimdallDlrAsync(Guid lineId);
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetLatestHeimdallDlrAsync(Guid lineId, Quantity quantity = Quantity.Current);
///
/// Get the most recent Heimdall Ambient-Adjusted Rating (AAR) for the line.
///
/// Id of the line for which to retrieve the latest Heimdall AAR.
- Task GetLatestHeimdallAarAsync(Guid lineId);
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetLatestHeimdallAarAsync(Guid lineId, Quantity quantity = Quantity.Current);
///
/// Get the most recent Heimdall Dynamic Line Rating (DLR) forecasts for the line.
///
/// Id of the line for which to retrieve Heimdall DLR forecasts.
- Task GetHeimdallDlrForecastsAsync(Guid lineId);
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetHeimdallDlrForecastsAsync(Guid lineId, Quantity quantity = Quantity.Current);
///
/// Get the most recent Heimdall Ambient-Adjusted Rating (AAR) forecasts for the line.
///
/// Id of the line for which to retrieve Heimdall AAR forecasts.
- Task GetHeimdallAarForecastsAsync(Guid lineId);
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetHeimdallAarForecastsAsync(Guid lineId, Quantity quantity = Quantity.Current);
+
+ ///
+ /// Get Heimdall Dynamic Line Rating (DLR) values for the line within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the line.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetHeimdallDlrsAsync(Guid lineId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current);
+
+ ///
+ /// Get Heimdall Ambient-Adjusted Rating (AAR) values for the line within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the line.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetHeimdallAarsAsync(Guid lineId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current);
///
/// Get the most recent circuit rating forecasts for a specified facility.
///
/// Id of the facility for which to retrieve circuit rating forecasts.
- Task GetCircuitRatingForecastsAsync(Guid facilityId);
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetCircuitRatingForecastsAsync(Guid facilityId, Quantity quantity = Quantity.Current);
///
/// Get the most recent circuit rating for a specified facility.
///
/// Id of the facility for which to retrieve the latest circuit rating.
- Task GetLatestCircuitRatingAsync(Guid facilityId);
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetLatestCircuitRatingAsync(Guid facilityId, Quantity quantity = Quantity.Current);
+
+ ///
+ /// Get circuit ratings for a specified facility within a time range.
+ /// The period between from and to must not exceed 30 days.
+ ///
+ /// Id of the facility.
+ /// Start of the time range (inclusive).
+ /// End of the time range (inclusive).
+ /// The quantity to return. Defaults to current (amperes). Use ApparentPower for MVA.
+ Task GetCircuitRatingsAsync(Guid facilityId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current);
}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.Extensions.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.Extensions.cs
index 06bd359..d241f4d 100644
--- a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.Extensions.cs
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.Extensions.cs
@@ -18,4 +18,5 @@ public static NameValueCollection AddQueryParam(this NameValueCollection nameVal
nameValueCollection[key] = value;
return nameValueCollection;
}
+
}
diff --git a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.cs b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.cs
index 949494e..6eb6c0c 100644
--- a/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.cs
+++ b/dotnet/HeimdallPower.Api.Client/HeimdallPower.Api.Client/UrlBuilder.cs
@@ -1,4 +1,5 @@
using System.Collections.Specialized;
+using HeimdallPower.Api.Client.CapacityMonitoring;
namespace HeimdallPower.Api.Client;
@@ -17,15 +18,21 @@ internal static class UrlBuilder
private const string AssetsResource = "assets";
// Endpoints
+ private const string CircuitRatings = "circuit_ratings";
private const string CircuitRatingForecasts = "circuit_ratings/forecasts";
private const string CircuitRatingLatest = "circuit_ratings/latest";
private const string ConductorTemperatures = "conductor_temperatures/latest";
private const string Currents = "currents/latest";
+ private const string HeimdallDlrs = "heimdall_dlrs";
private const string HeimdallDlr = "heimdall_dlrs/latest";
+ private const string HeimdallAars = "heimdall_aars";
private const string HeimdallAar = "heimdall_aars/latest";
private const string HeimdallDlrForecast = "heimdall_dlrs/forecasts";
private const string HeimdallAarForecast = "heimdall_aars/forecasts";
private const string IcingLatest = "icing/latest";
+ private const string IcingForecast = "icing/forecast";
+ private const string ApparentPowerLatest = "apparent_power/latest";
+ private const string ApparentPower = "apparent_power";
private const string SagAndClearanceLatest = "sag_and_clearance/latest";
public static string BuildLatestConductorTemperatureUrl(Guid lineId, string unitSystem)
@@ -39,26 +46,59 @@ public static string BuildLatestConductorTemperatureUrl(Guid lineId, string unit
public static string BuildLatestCurrentsUrl(Guid lineId)
=> GetFullUrl(module: GridInsight, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: Currents);
- public static string BuildHeimdallDlrUrl(Guid lineId)
- => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallDlr);
+ public static string BuildHeimdallDlrUrl(Guid lineId, Quantity quantity = Quantity.Current)
+ => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallDlr,
+ queryParams: new NameValueCollection().AddQueryParam("quantity", quantity.ToQueryValue()));
- public static string BuildHeimdallAarUrl(Guid lineId)
- => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallAar);
+ public static string BuildHeimdallAarUrl(Guid lineId, Quantity quantity = Quantity.Current)
+ => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallAar,
+ queryParams: new NameValueCollection().AddQueryParam("quantity", quantity.ToQueryValue()));
- public static string BuildDlrForecastUrl(Guid lineId)
- => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallDlrForecast);
+ public static string BuildDlrForecastUrl(Guid lineId, Quantity quantity = Quantity.Current)
+ => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallDlrForecast,
+ queryParams: new NameValueCollection().AddQueryParam("quantity", quantity.ToQueryValue()));
- public static string BuildAarForecastUrl(Guid lineId)
- => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallAarForecast);
+ public static string BuildAarForecastUrl(Guid lineId, Quantity quantity = Quantity.Current)
+ => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallAarForecast,
+ queryParams: new NameValueCollection().AddQueryParam("quantity", quantity.ToQueryValue()));
+
+ public static string BuildHeimdallDlrsUrl(Guid lineId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current)
+ {
+ var queryParams = new NameValueCollection()
+ .AddQueryParam("from_timestamp", from.ToUniversalTime().ToString("o"))
+ .AddQueryParam("to_timestamp", to.ToUniversalTime().ToString("o"))
+ .AddQueryParam("quantity", quantity.ToQueryValue());
+ return GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallDlrs, queryParams: queryParams);
+ }
+
+ public static string BuildHeimdallAarsUrl(Guid lineId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current)
+ {
+ var queryParams = new NameValueCollection()
+ .AddQueryParam("from_timestamp", from.ToUniversalTime().ToString("o"))
+ .AddQueryParam("to_timestamp", to.ToUniversalTime().ToString("o"))
+ .AddQueryParam("quantity", quantity.ToQueryValue());
+ return GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: HeimdallAars, queryParams: queryParams);
+ }
public static string BuildAssetsUrl()
=> GetResourceUrl(module: Assets, apiVersion: V1, resource: AssetsResource);
- public static string BuildCircuitRatingForecastUrl(Guid facilityId)
- => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Facilities, resourceId: facilityId.ToString(), endpoint: CircuitRatingForecasts);
+ public static string BuildCircuitRatingForecastUrl(Guid facilityId, Quantity quantity = Quantity.Current)
+ => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Facilities, resourceId: facilityId.ToString(), endpoint: CircuitRatingForecasts,
+ queryParams: new NameValueCollection().AddQueryParam("quantity", quantity.ToQueryValue()));
+
+ public static string BuildCircuitRatingUrl(Guid facilityId, Quantity quantity = Quantity.Current)
+ => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Facilities, resourceId: facilityId.ToString(), endpoint: CircuitRatingLatest,
+ queryParams: new NameValueCollection().AddQueryParam("quantity", quantity.ToQueryValue()));
- public static string BuildCircuitRatingUrl(Guid facilityId)
- => GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Facilities, resourceId: facilityId.ToString(), endpoint: CircuitRatingLatest);
+ public static string BuildCircuitRatingsUrl(Guid facilityId, DateTimeOffset from, DateTimeOffset to, Quantity quantity = Quantity.Current)
+ {
+ var queryParams = new NameValueCollection()
+ .AddQueryParam("from_timestamp", from.ToUniversalTime().ToString("o"))
+ .AddQueryParam("to_timestamp", to.ToUniversalTime().ToString("o"))
+ .AddQueryParam("quantity", quantity.ToQueryValue());
+ return GetFullUrl(module: CapacityMonitoring, apiVersion: V1, resource: Facilities, resourceId: facilityId.ToString(), endpoint: CircuitRatings, queryParams: queryParams);
+ }
public static string BuildLatestIcingUrl(Guid lineId, string unitSystem = "metric", DateTimeOffset? since = null)
{
@@ -71,6 +111,24 @@ public static string BuildLatestIcingUrl(Guid lineId, string unitSystem = "metri
return GetFullUrl(module: GridInsight, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: IcingLatest, queryParams: queryParams);
}
+ public static string BuildIcingForecastUrl(Guid lineId, string unitSystem = "metric")
+ {
+ var queryParams = new NameValueCollection()
+ .AddQueryParam("unit_system", unitSystem);
+ return GetFullUrl(module: GridInsight, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: IcingForecast, queryParams: queryParams);
+ }
+
+ public static string BuildLatestApparentPowerUrl(Guid lineId)
+ => GetFullUrl(module: GridInsight, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: ApparentPowerLatest);
+
+ public static string BuildApparentPowersUrl(Guid lineId, DateTimeOffset from, DateTimeOffset to)
+ {
+ var queryParams = new NameValueCollection()
+ .AddQueryParam("from_timestamp", from.ToUniversalTime().ToString("o"))
+ .AddQueryParam("to_timestamp", to.ToUniversalTime().ToString("o"));
+ return GetFullUrl(module: GridInsight, apiVersion: V1, resource: Lines, resourceId: lineId.ToString(), endpoint: ApparentPower, queryParams: queryParams);
+ }
+
public static string BuildLatestSagAndClearanceUrl(Guid lineId, string unitSystem = "metric", DateTimeOffset? since = null)
{
var queryParams = new NameValueCollection()
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/__init__.py b/python/heimdall_api_client/capacity_monitoring_api_client/__init__.py
index 5613e72..6e88aae 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/__init__.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/__init__.py
@@ -1,5 +1,5 @@
+"""A client library for accessing Capacity Monitoring API"""
-""" A client library for accessing Capacity Monitoring API """
from .client import AuthenticatedClient, Client
__all__ = (
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/__init__.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/__init__.py
index dc035f4..81f9fa2 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/__init__.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/__init__.py
@@ -1 +1 @@
-""" Contains methods for accessing the API """
+"""Contains methods for accessing the API"""
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/__init__.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/__init__.py
index c9921b5..2d7c0b2 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/__init__.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/__init__.py
@@ -1 +1 @@
-""" Contains endpoint functions for accessing the API """
+"""Contains endpoint functions for accessing the API"""
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_circuit_ratings.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_circuit_ratings.py
new file mode 100644
index 0000000..262fe90
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_circuit_ratings.py
@@ -0,0 +1,398 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_facilities_get_circuit_ratings_response_200 import (
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200,
+)
+from ...models.capacity_monitoring_v1_facilities_get_circuit_ratings_x_region import (
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion,
+)
+from ...models.problem_details import ProblemDetails
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ facility_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+
+ params["quantity"] = json_quantity
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/capacity_monitoring/v1/facilities/{facility_id}/circuit_ratings".format(
+ facility_id=quote(str(facility_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ facility_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU,
+) -> Response[Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails]:
+ r"""Get circuit ratings
+
+ This endpoint returns circuit ratings for the facility within a specified time range.
+
+ The circuit rating is defined as the lowest of:
+ - Heimdall DLR
+ - The facility's upper limit
+ - The lowest steady-state rating among all facility components
+
+ The upper limit can be either:
+ - A fixed value
+ - A percentage of the line's steady-state rating
+
+ If the limiting factor is not a specific facility component—such as when the circuit rating is
+ constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
+ be null.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit ratings in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit ratings converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ facility_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion | Unset): Default:
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ facility_id=facility_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ facility_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU,
+) -> Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails | None:
+ r"""Get circuit ratings
+
+ This endpoint returns circuit ratings for the facility within a specified time range.
+
+ The circuit rating is defined as the lowest of:
+ - Heimdall DLR
+ - The facility's upper limit
+ - The lowest steady-state rating among all facility components
+
+ The upper limit can be either:
+ - A fixed value
+ - A percentage of the line's steady-state rating
+
+ If the limiting factor is not a specific facility component—such as when the circuit rating is
+ constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
+ be null.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit ratings in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit ratings converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ facility_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion | Unset): Default:
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ facility_id=facility_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ facility_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU,
+) -> Response[Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails]:
+ r"""Get circuit ratings
+
+ This endpoint returns circuit ratings for the facility within a specified time range.
+
+ The circuit rating is defined as the lowest of:
+ - Heimdall DLR
+ - The facility's upper limit
+ - The lowest steady-state rating among all facility components
+
+ The upper limit can be either:
+ - A fixed value
+ - A percentage of the line's steady-state rating
+
+ If the limiting factor is not a specific facility component—such as when the circuit rating is
+ constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
+ be null.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit ratings in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit ratings converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ facility_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion | Unset): Default:
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ facility_id=facility_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ facility_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU,
+) -> Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails | None:
+ r"""Get circuit ratings
+
+ This endpoint returns circuit ratings for the facility within a specified time range.
+
+ The circuit rating is defined as the lowest of:
+ - Heimdall DLR
+ - The facility's upper limit
+ - The lowest steady-state rating among all facility components
+
+ The upper limit can be either:
+ - A fixed value
+ - A percentage of the line's steady-state rating
+
+ If the limiting factor is not a specific facility component—such as when the circuit rating is
+ constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
+ be null.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit ratings in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit ratings converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ facility_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion | Unset): Default:
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ facility_id=facility_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating.py
index d7258f6..7c8ab58 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating.py
@@ -1,57 +1,68 @@
from http import HTTPStatus
from typing import Any, cast
from urllib.parse import quote
+from uuid import UUID
import httpx
-from ...client import AuthenticatedClient, Client
-from ...types import Response, UNSET
from ... import errors
-
-from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200 import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200
-from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200 import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200,
+)
+from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion,
+)
from ...models.problem_details import ProblemDetails
-from ...types import UNSET, Unset
-from typing import cast
-from uuid import UUID
-
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
def _get_kwargs(
facility_id: UUID,
*,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_region, Unset):
headers["x-region"] = str(x_region)
+ params: dict[str, Any] = {}
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+ params["quantity"] = json_quantity
-
-
-
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
_kwargs: dict[str, Any] = {
"method": "get",
- "url": "/capacity_monitoring/v1/facilities/{facility_id}/circuit_ratings/latest".format(facility_id=quote(str(facility_id), safe=""),),
+ "url": "/capacity_monitoring/v1/facilities/{facility_id}/circuit_ratings/latest".format(
+ facility_id=quote(str(facility_id), safe=""),
+ ),
+ "params": params,
}
-
_kwargs["headers"] = headers
return _kwargs
-
-def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails | None:
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails | None:
if response.status_code == 200:
response_200 = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200.from_dict(response.json())
+ return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
- return response_200
+ return response_400
if response.status_code == 401:
response_401 = cast(Any, None)
@@ -60,8 +71,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 403:
response_403 = ProblemDetails.from_dict(response.json())
-
-
return response_403
if response.status_code == 404:
@@ -71,8 +80,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 500:
response_500 = ProblemDetails.from_dict(response.json())
-
-
return response_500
if client.raise_on_unexpected_status:
@@ -81,7 +88,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return None
-def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails]:
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
@@ -94,10 +103,11 @@ def sync_detailed(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails]:
- """ Get latest circuit rating
+ r"""Get latest circuit rating
This endpoint returns the most recent circuit rating for the facility, including the limiting
facility component.
@@ -119,8 +129,24 @@ def sync_detailed(
constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
be null.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset): Default:
CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU.
@@ -130,13 +156,12 @@ def sync_detailed(
Returns:
Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
facility_id=facility_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
response = client.get_httpx_client().request(
@@ -145,14 +170,16 @@ def sync_detailed(
return _build_response(client=client, response=response)
+
def sync(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails | None:
- """ Get latest circuit rating
+ r"""Get latest circuit rating
This endpoint returns the most recent circuit rating for the facility, including the limiting
facility component.
@@ -174,8 +201,24 @@ def sync(
constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
be null.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset): Default:
CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU.
@@ -185,24 +228,25 @@ def sync(
Returns:
Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails
- """
-
+ """
return sync_detailed(
facility_id=facility_id,
-client=client,
-x_region=x_region,
-
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
).parsed
+
async def asyncio_detailed(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails]:
- """ Get latest circuit rating
+ r"""Get latest circuit rating
This endpoint returns the most recent circuit rating for the facility, including the limiting
facility component.
@@ -224,8 +268,24 @@ async def asyncio_detailed(
constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
be null.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset): Default:
CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU.
@@ -235,29 +295,28 @@ async def asyncio_detailed(
Returns:
Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
facility_id=facility_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
- response = await client.get_async_httpx_client().request(
- **kwargs
- )
+ response = await client.get_async_httpx_client().request(**kwargs)
return _build_response(client=client, response=response)
+
async def asyncio(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU,
) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails | None:
- """ Get latest circuit rating
+ r"""Get latest circuit rating
This endpoint returns the most recent circuit rating for the facility, including the limiting
facility component.
@@ -279,8 +338,24 @@ async def asyncio(
constrained by the line/Heimdall DLR or by the facility upper limit—the limiting component id will
be null.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion | Unset): Default:
CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion.EU.
@@ -290,12 +365,13 @@ async def asyncio(
Returns:
Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200 | ProblemDetails
- """
-
-
- return (await asyncio_detailed(
- facility_id=facility_id,
-client=client,
-x_region=x_region,
-
- )).parsed
+ """
+
+ return (
+ await asyncio_detailed(
+ facility_id=facility_id,
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts.py
index c7dadd4..49d0735 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts.py
@@ -1,57 +1,70 @@
from http import HTTPStatus
from typing import Any, cast
from urllib.parse import quote
+from uuid import UUID
import httpx
-from ...client import AuthenticatedClient, Client
-from ...types import Response, UNSET
from ... import errors
-
-from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200 import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200
-from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200 import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200,
+)
+from ...models.capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion,
+)
from ...models.problem_details import ProblemDetails
-from ...types import UNSET, Unset
-from typing import cast
-from uuid import UUID
-
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
def _get_kwargs(
facility_id: UUID,
*,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_region, Unset):
headers["x-region"] = str(x_region)
+ params: dict[str, Any] = {}
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+ params["quantity"] = json_quantity
-
-
-
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
_kwargs: dict[str, Any] = {
"method": "get",
- "url": "/capacity_monitoring/v1/facilities/{facility_id}/circuit_ratings/forecasts".format(facility_id=quote(str(facility_id), safe=""),),
+ "url": "/capacity_monitoring/v1/facilities/{facility_id}/circuit_ratings/forecasts".format(
+ facility_id=quote(str(facility_id), safe=""),
+ ),
+ "params": params,
}
-
_kwargs["headers"] = headers
return _kwargs
-
-def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails | None:
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails | None:
if response.status_code == 200:
- response_200 = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200.from_dict(response.json())
+ response_200 = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200.from_dict(
+ response.json()
+ )
+ return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
- return response_200
+ return response_400
if response.status_code == 401:
response_401 = cast(Any, None)
@@ -60,8 +73,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 403:
response_403 = ProblemDetails.from_dict(response.json())
-
-
return response_403
if response.status_code == 404:
@@ -71,8 +82,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 500:
response_500 = ProblemDetails.from_dict(response.json())
-
-
return response_500
if client.raise_on_unexpected_status:
@@ -81,7 +90,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return None
-def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails]:
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
@@ -94,10 +105,11 @@ def sync_detailed(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails]:
- """ Get latest circuit rating forecasts
+ r"""Get latest circuit rating forecasts
This endpoint returns the most recent circuit rating forecasts for the facility.
@@ -121,8 +133,24 @@ def sync_detailed(
If the predictions contains no facility component id, then the dimensioning component is the line
itself.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating forecast converted to three-phase apparent power in MVA
+ (`unit: \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset):
Default: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU.
@@ -132,13 +160,12 @@ def sync_detailed(
Returns:
Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
facility_id=facility_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
response = client.get_httpx_client().request(
@@ -147,14 +174,16 @@ def sync_detailed(
return _build_response(client=client, response=response)
+
def sync(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails | None:
- """ Get latest circuit rating forecasts
+ r"""Get latest circuit rating forecasts
This endpoint returns the most recent circuit rating forecasts for the facility.
@@ -178,8 +207,24 @@ def sync(
If the predictions contains no facility component id, then the dimensioning component is the line
itself.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating forecast converted to three-phase apparent power in MVA
+ (`unit: \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset):
Default: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU.
@@ -189,24 +234,25 @@ def sync(
Returns:
Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails
- """
-
+ """
return sync_detailed(
facility_id=facility_id,
-client=client,
-x_region=x_region,
-
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
).parsed
+
async def asyncio_detailed(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
) -> Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails]:
- """ Get latest circuit rating forecasts
+ r"""Get latest circuit rating forecasts
This endpoint returns the most recent circuit rating forecasts for the facility.
@@ -230,8 +276,24 @@ async def asyncio_detailed(
If the predictions contains no facility component id, then the dimensioning component is the line
itself.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating forecast converted to three-phase apparent power in MVA
+ (`unit: \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset):
Default: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU.
@@ -241,29 +303,28 @@ async def asyncio_detailed(
Returns:
Response[Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
facility_id=facility_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
- response = await client.get_async_httpx_client().request(
- **kwargs
- )
+ response = await client.get_async_httpx_client().request(**kwargs)
return _build_response(client=client, response=response)
+
async def asyncio(
facility_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion
+ | Unset = CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU,
) -> Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails | None:
- """ Get latest circuit rating forecasts
+ r"""Get latest circuit rating forecasts
This endpoint returns the most recent circuit rating forecasts for the facility.
@@ -287,8 +348,24 @@ async def asyncio(
If the predictions contains no facility component id, then the dimensioning component is the line
itself.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — circuit rating forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — circuit rating forecast converted to three-phase apparent power in MVA
+ (`unit: \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
facility_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion | Unset):
Default: CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion.EU.
@@ -298,12 +375,13 @@ async def asyncio(
Returns:
Any | CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200 | ProblemDetails
- """
-
-
- return (await asyncio_detailed(
- facility_id=facility_id,
-client=client,
-x_region=x_region,
-
- )).parsed
+ """
+
+ return (
+ await asyncio_detailed(
+ facility_id=facility_id,
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/__init__.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/__init__.py
index c9921b5..2d7c0b2 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/__init__.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/__init__.py
@@ -1 +1 @@
-""" Contains endpoint functions for accessing the API """
+"""Contains endpoint functions for accessing the API"""
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_aars.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_aars.py
new file mode 100644
index 0000000..2b0c8ae
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_aars.py
@@ -0,0 +1,386 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_lines_get_heimdall_aars_response_200 import (
+ CapacityMonitoringV1LinesGetHeimdallAarsResponse200,
+)
+from ...models.capacity_monitoring_v1_lines_get_heimdall_aars_x_region import (
+ CapacityMonitoringV1LinesGetHeimdallAarsXRegion,
+)
+from ...models.problem_details import ProblemDetails
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallAarsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+
+ params["quantity"] = json_quantity
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_aars".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = CapacityMonitoringV1LinesGetHeimdallAarsResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallAarsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU,
+) -> Response[Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails]:
+ r"""Get Heimdall AARs
+
+ This endpoint returns Heimdall Ambient-Adjusted Rating (AAR) for the line within a specified time
+ range.
+
+ Heimdall AAR is calculated according to the CIGRE TB-601 standard for thermal calculation for OHLs.
+ It is purely based on weather data from weather service providers.
+ In this method for rating, both wind speed, wind direction, and solar heating are set to static
+ values chosen by the customer.
+ Therefore, only the Ambient temperature will vary dynamically.
+
+ Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallAarsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallAarsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU,
+) -> Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails | None:
+ r"""Get Heimdall AARs
+
+ This endpoint returns Heimdall Ambient-Adjusted Rating (AAR) for the line within a specified time
+ range.
+
+ Heimdall AAR is calculated according to the CIGRE TB-601 standard for thermal calculation for OHLs.
+ It is purely based on weather data from weather service providers.
+ In this method for rating, both wind speed, wind direction, and solar heating are set to static
+ values chosen by the customer.
+ Therefore, only the Ambient temperature will vary dynamically.
+
+ Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallAarsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallAarsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU,
+) -> Response[Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails]:
+ r"""Get Heimdall AARs
+
+ This endpoint returns Heimdall Ambient-Adjusted Rating (AAR) for the line within a specified time
+ range.
+
+ Heimdall AAR is calculated according to the CIGRE TB-601 standard for thermal calculation for OHLs.
+ It is purely based on weather data from weather service providers.
+ In this method for rating, both wind speed, wind direction, and solar heating are set to static
+ values chosen by the customer.
+ Therefore, only the Ambient temperature will vary dynamically.
+
+ Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallAarsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallAarsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU,
+) -> Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails | None:
+ r"""Get Heimdall AARs
+
+ This endpoint returns Heimdall Ambient-Adjusted Rating (AAR) for the line within a specified time
+ range.
+
+ Heimdall AAR is calculated according to the CIGRE TB-601 standard for thermal calculation for OHLs.
+ It is purely based on weather data from weather service providers.
+ In this method for rating, both wind speed, wind direction, and solar heating are set to static
+ values chosen by the customer.
+ Therefore, only the Ambient temperature will vary dynamically.
+
+ Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallAarsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallAarsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | CapacityMonitoringV1LinesGetHeimdallAarsResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_dlrs.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_dlrs.py
new file mode 100644
index 0000000..310b45b
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_dlrs.py
@@ -0,0 +1,378 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200 import (
+ CapacityMonitoringV1LinesGetHeimdallDlrsResponse200,
+)
+from ...models.capacity_monitoring_v1_lines_get_heimdall_dlrs_x_region import (
+ CapacityMonitoringV1LinesGetHeimdallDlrsXRegion,
+)
+from ...models.problem_details import ProblemDetails
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallDlrsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+
+ params["quantity"] = json_quantity
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_dlrs".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = CapacityMonitoringV1LinesGetHeimdallDlrsResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallDlrsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU,
+) -> Response[Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails]:
+ r"""Get Heimdall DLRs
+
+ This endpoint returns Heimdall Dynamic Line Rating (DLR) for the line within a specified time range.
+
+ Heimdall DLR is calculated according to our own proprietary method, based on the CIGRE TB-601
+ standard for thermal calculation for OHLs.
+ This method also takes the conductor temperature and current into account, and uses these to adjust
+ the weather parameters during calculations.
+
+ Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallDlrsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallDlrsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU,
+) -> Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails | None:
+ r"""Get Heimdall DLRs
+
+ This endpoint returns Heimdall Dynamic Line Rating (DLR) for the line within a specified time range.
+
+ Heimdall DLR is calculated according to our own proprietary method, based on the CIGRE TB-601
+ standard for thermal calculation for OHLs.
+ This method also takes the conductor temperature and current into account, and uses these to adjust
+ the weather parameters during calculations.
+
+ Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallDlrsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallDlrsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU,
+) -> Response[Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails]:
+ r"""Get Heimdall DLRs
+
+ This endpoint returns Heimdall Dynamic Line Rating (DLR) for the line within a specified time range.
+
+ Heimdall DLR is calculated according to our own proprietary method, based on the CIGRE TB-601
+ standard for thermal calculation for OHLs.
+ This method also takes the conductor temperature and current into account, and uses these to adjust
+ the weather parameters during calculations.
+
+ Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallDlrsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetHeimdallDlrsXRegion
+ | Unset = CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU,
+) -> Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails | None:
+ r"""Get Heimdall DLRs
+
+ This endpoint returns Heimdall Dynamic Line Rating (DLR) for the line within a specified time range.
+
+ Heimdall DLR is calculated according to our own proprietary method, based on the CIGRE TB-601
+ standard for thermal calculation for OHLs.
+ This method also takes the conductor temperature and current into account, and uses these to adjust
+ the weather parameters during calculations.
+
+ Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
+ ampacity are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
+ x_region (CapacityMonitoringV1LinesGetHeimdallDlrsXRegion | Unset): Default:
+ CapacityMonitoringV1LinesGetHeimdallDlrsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | CapacityMonitoringV1LinesGetHeimdallDlrsResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar.py
index 19e039f..25b663d 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar.py
@@ -1,57 +1,68 @@
from http import HTTPStatus
from typing import Any, cast
from urllib.parse import quote
+from uuid import UUID
import httpx
-from ...client import AuthenticatedClient, Client
-from ...types import Response, UNSET
from ... import errors
-
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region import CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200,
+)
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion,
+)
from ...models.problem_details import ProblemDetails
-from ...types import UNSET, Unset
-from typing import cast
-from uuid import UUID
-
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
def _get_kwargs(
line_id: UUID,
*,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_region, Unset):
headers["x-region"] = str(x_region)
+ params: dict[str, Any] = {}
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+ params["quantity"] = json_quantity
-
-
-
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
_kwargs: dict[str, Any] = {
"method": "get",
- "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_aars/latest".format(line_id=quote(str(line_id), safe=""),),
+ "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_aars/latest".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
}
-
_kwargs["headers"] = headers
return _kwargs
-
-def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails | None:
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails | None:
if response.status_code == 200:
response_200 = CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200.from_dict(response.json())
+ return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
- return response_200
+ return response_400
if response.status_code == 401:
response_401 = cast(Any, None)
@@ -60,8 +71,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 403:
response_403 = ProblemDetails.from_dict(response.json())
-
-
return response_403
if response.status_code == 404:
@@ -71,8 +80,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 500:
response_500 = ProblemDetails.from_dict(response.json())
-
-
return response_500
if client.raise_on_unexpected_status:
@@ -81,7 +88,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return None
-def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails]:
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
@@ -94,10 +103,11 @@ def sync_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails]:
- """ Get latest Heimdall AAR
+ r"""Get latest Heimdall AAR
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) for the line.
@@ -110,8 +120,24 @@ def sync_detailed(
Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU.
@@ -121,13 +147,12 @@ def sync_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
response = client.get_httpx_client().request(
@@ -136,14 +161,16 @@ def sync_detailed(
return _build_response(client=client, response=response)
+
def sync(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails | None:
- """ Get latest Heimdall AAR
+ r"""Get latest Heimdall AAR
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) for the line.
@@ -156,8 +183,24 @@ def sync(
Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU.
@@ -167,24 +210,25 @@ def sync(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails
- """
-
+ """
return sync_detailed(
line_id=line_id,
-client=client,
-x_region=x_region,
-
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
).parsed
+
async def asyncio_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails]:
- """ Get latest Heimdall AAR
+ r"""Get latest Heimdall AAR
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) for the line.
@@ -197,8 +241,24 @@ async def asyncio_detailed(
Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU.
@@ -208,29 +268,28 @@ async def asyncio_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
- response = await client.get_async_httpx_client().request(
- **kwargs
- )
+ response = await client.get_async_httpx_client().request(**kwargs)
return _build_response(client=client, response=response)
+
async def asyncio(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails | None:
- """ Get latest Heimdall AAR
+ r"""Get latest Heimdall AAR
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) for the line.
@@ -243,8 +302,24 @@ async def asyncio(
Heimdall AAR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion.EU.
@@ -254,12 +329,13 @@ async def asyncio(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200 | ProblemDetails
- """
-
-
- return (await asyncio_detailed(
- line_id=line_id,
-client=client,
-x_region=x_region,
-
- )).parsed
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts.py
index 7badd35..935f824 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts.py
@@ -1,57 +1,68 @@
from http import HTTPStatus
from typing import Any, cast
from urllib.parse import quote
+from uuid import UUID
import httpx
-from ...client import AuthenticatedClient, Client
-from ...types import Response, UNSET
from ... import errors
-
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region import CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200,
+)
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion,
+)
from ...models.problem_details import ProblemDetails
-from ...types import UNSET, Unset
-from typing import cast
-from uuid import UUID
-
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
def _get_kwargs(
line_id: UUID,
*,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_region, Unset):
headers["x-region"] = str(x_region)
+ params: dict[str, Any] = {}
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+ params["quantity"] = json_quantity
-
-
-
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
_kwargs: dict[str, Any] = {
"method": "get",
- "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_aars/forecasts".format(line_id=quote(str(line_id), safe=""),),
+ "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_aars/forecasts".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
}
-
_kwargs["headers"] = headers
return _kwargs
-
-def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails | None:
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails | None:
if response.status_code == 200:
response_200 = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200.from_dict(response.json())
+ return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
- return response_200
+ return response_400
if response.status_code == 401:
response_401 = cast(Any, None)
@@ -60,8 +71,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 403:
response_403 = ProblemDetails.from_dict(response.json())
-
-
return response_403
if response.status_code == 404:
@@ -71,8 +80,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 500:
response_500 = ProblemDetails.from_dict(response.json())
-
-
return response_500
if client.raise_on_unexpected_status:
@@ -81,7 +88,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return None
-def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails]:
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
@@ -94,10 +103,11 @@ def sync_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails]:
- """ Get latest Heimdall AAR forecasts
+ r"""Get latest Heimdall AAR forecasts
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) forecasts for the line.
@@ -110,8 +120,24 @@ def sync_detailed(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU.
@@ -121,13 +147,12 @@ def sync_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
response = client.get_httpx_client().request(
@@ -136,14 +161,16 @@ def sync_detailed(
return _build_response(client=client, response=response)
+
def sync(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails | None:
- """ Get latest Heimdall AAR forecasts
+ r"""Get latest Heimdall AAR forecasts
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) forecasts for the line.
@@ -156,8 +183,24 @@ def sync(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU.
@@ -167,24 +210,25 @@ def sync(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails
- """
-
+ """
return sync_detailed(
line_id=line_id,
-client=client,
-x_region=x_region,
-
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
).parsed
+
async def asyncio_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails]:
- """ Get latest Heimdall AAR forecasts
+ r"""Get latest Heimdall AAR forecasts
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) forecasts for the line.
@@ -197,8 +241,24 @@ async def asyncio_detailed(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU.
@@ -208,29 +268,28 @@ async def asyncio_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
- response = await client.get_async_httpx_client().request(
- **kwargs
- )
+ response = await client.get_async_httpx_client().request(**kwargs)
return _build_response(client=client, response=response)
+
async def asyncio(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails | None:
- """ Get latest Heimdall AAR forecasts
+ r"""Get latest Heimdall AAR forecasts
This endpoint returns the most recent Heimdall Ambient-Adjusted Rating (AAR) forecasts for the line.
@@ -243,8 +302,24 @@ async def asyncio(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall AAR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall AAR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion.EU.
@@ -254,12 +329,13 @@ async def asyncio(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200 | ProblemDetails
- """
-
-
- return (await asyncio_detailed(
- line_id=line_id,
-client=client,
-x_region=x_region,
-
- )).parsed
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr.py
index e633a32..e73c6cb 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr.py
@@ -1,57 +1,68 @@
from http import HTTPStatus
from typing import Any, cast
from urllib.parse import quote
+from uuid import UUID
import httpx
-from ...client import AuthenticatedClient, Client
-from ...types import Response, UNSET
from ... import errors
-
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region import CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200,
+)
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion,
+)
from ...models.problem_details import ProblemDetails
-from ...types import UNSET, Unset
-from typing import cast
-from uuid import UUID
-
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
def _get_kwargs(
line_id: UUID,
*,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_region, Unset):
headers["x-region"] = str(x_region)
+ params: dict[str, Any] = {}
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+ params["quantity"] = json_quantity
-
-
-
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
_kwargs: dict[str, Any] = {
"method": "get",
- "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_dlrs/latest".format(line_id=quote(str(line_id), safe=""),),
+ "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_dlrs/latest".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
}
-
_kwargs["headers"] = headers
return _kwargs
-
-def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails | None:
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails | None:
if response.status_code == 200:
response_200 = CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200.from_dict(response.json())
+ return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
- return response_200
+ return response_400
if response.status_code == 401:
response_401 = cast(Any, None)
@@ -60,8 +71,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 403:
response_403 = ProblemDetails.from_dict(response.json())
-
-
return response_403
if response.status_code == 404:
@@ -71,8 +80,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 500:
response_500 = ProblemDetails.from_dict(response.json())
-
-
return response_500
if client.raise_on_unexpected_status:
@@ -81,7 +88,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return None
-def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails]:
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
@@ -94,10 +103,11 @@ def sync_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails]:
- """ Get latest Heimdall DLR
+ r"""Get latest Heimdall DLR
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) for the line.
@@ -109,8 +119,24 @@ def sync_detailed(
Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU.
@@ -120,13 +146,12 @@ def sync_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
response = client.get_httpx_client().request(
@@ -135,14 +160,16 @@ def sync_detailed(
return _build_response(client=client, response=response)
+
def sync(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails | None:
- """ Get latest Heimdall DLR
+ r"""Get latest Heimdall DLR
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) for the line.
@@ -154,8 +181,24 @@ def sync(
Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU.
@@ -165,24 +208,25 @@ def sync(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails
- """
-
+ """
return sync_detailed(
line_id=line_id,
-client=client,
-x_region=x_region,
-
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
).parsed
+
async def asyncio_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails]:
- """ Get latest Heimdall DLR
+ r"""Get latest Heimdall DLR
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) for the line.
@@ -194,8 +238,24 @@ async def asyncio_detailed(
Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU.
@@ -205,29 +265,28 @@ async def asyncio_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
- response = await client.get_async_httpx_client().request(
- **kwargs
- )
+ response = await client.get_async_httpx_client().request(**kwargs)
return _build_response(client=client, response=response)
+
async def asyncio(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails | None:
- """ Get latest Heimdall DLR
+ r"""Get latest Heimdall DLR
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) for the line.
@@ -239,8 +298,24 @@ async def asyncio(
Heimdall DLR is aggregated over the entire line. Using a 5-minute sliding window, the minimum
ampacity are calculated for each window.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR converted to three-phase apparent power in MVA (`unit: \"MVA\"`)
+ using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion | Unset): Default:
CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion.EU.
@@ -250,12 +325,13 @@ async def asyncio(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200 | ProblemDetails
- """
-
-
- return (await asyncio_detailed(
- line_id=line_id,
-client=client,
-x_region=x_region,
-
- )).parsed
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts.py b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts.py
index dc7b75e..092c7f6 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts.py
@@ -1,57 +1,68 @@
from http import HTTPStatus
from typing import Any, cast
from urllib.parse import quote
+from uuid import UUID
import httpx
-from ...client import AuthenticatedClient, Client
-from ...types import Response, UNSET
from ... import errors
-
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200
-from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region import CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion
+from ...client import AuthenticatedClient, Client
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200,
+)
+from ...models.capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion,
+)
from ...models.problem_details import ProblemDetails
-from ...types import UNSET, Unset
-from typing import cast
-from uuid import UUID
-
+from ...models.quantity import Quantity
+from ...types import UNSET, Response, Unset
def _get_kwargs(
line_id: UUID,
*,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_region, Unset):
headers["x-region"] = str(x_region)
+ params: dict[str, Any] = {}
+ json_quantity: str | Unset = UNSET
+ if not isinstance(quantity, Unset):
+ json_quantity = quantity.value
+ params["quantity"] = json_quantity
-
-
-
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
_kwargs: dict[str, Any] = {
"method": "get",
- "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_dlrs/forecasts".format(line_id=quote(str(line_id), safe=""),),
+ "url": "/capacity_monitoring/v1/lines/{line_id}/heimdall_dlrs/forecasts".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
}
-
_kwargs["headers"] = headers
return _kwargs
-
-def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails | None:
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails | None:
if response.status_code == 200:
response_200 = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200.from_dict(response.json())
+ return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
- return response_200
+ return response_400
if response.status_code == 401:
response_401 = cast(Any, None)
@@ -60,8 +71,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 403:
response_403 = ProblemDetails.from_dict(response.json())
-
-
return response_403
if response.status_code == 404:
@@ -71,8 +80,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
if response.status_code == 500:
response_500 = ProblemDetails.from_dict(response.json())
-
-
return response_500
if client.raise_on_unexpected_status:
@@ -81,7 +88,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return None
-def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails]:
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
@@ -94,10 +103,11 @@ def sync_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails]:
- """ Get latest Heimdall DLR forecasts
+ r"""Get latest Heimdall DLR forecasts
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) forecasts for the line.
@@ -110,8 +120,24 @@ def sync_detailed(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU.
@@ -121,13 +147,12 @@ def sync_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
response = client.get_httpx_client().request(
@@ -136,14 +161,16 @@ def sync_detailed(
return _build_response(client=client, response=response)
+
def sync(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails | None:
- """ Get latest Heimdall DLR forecasts
+ r"""Get latest Heimdall DLR forecasts
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) forecasts for the line.
@@ -156,8 +183,24 @@ def sync(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU.
@@ -167,24 +210,25 @@ def sync(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails
- """
-
+ """
return sync_detailed(
line_id=line_id,
-client=client,
-x_region=x_region,
-
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
).parsed
+
async def asyncio_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
) -> Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails]:
- """ Get latest Heimdall DLR forecasts
+ r"""Get latest Heimdall DLR forecasts
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) forecasts for the line.
@@ -197,8 +241,24 @@ async def asyncio_detailed(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU.
@@ -208,29 +268,28 @@ async def asyncio_detailed(
Returns:
Response[Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails]
- """
-
+ """
kwargs = _get_kwargs(
line_id=line_id,
-x_region=x_region,
-
+ quantity=quantity,
+ x_region=x_region,
)
- response = await client.get_async_httpx_client().request(
- **kwargs
- )
+ response = await client.get_async_httpx_client().request(**kwargs)
return _build_response(client=client, response=response)
+
async def asyncio(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
-
+ quantity: Quantity | Unset = UNSET,
+ x_region: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion
+ | Unset = CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU,
) -> Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails | None:
- """ Get latest Heimdall DLR forecasts
+ r"""Get latest Heimdall DLR forecasts
This endpoint returns the most recent Heimdall Dynamic Line Rating (DLR) forecasts for the line.
@@ -243,8 +302,24 @@ async def asyncio(
For each unique timestamp and confidence level, we pick the value from the span which has the lowest
ampacity value as this will be the dimensioning value for the line.
+ ### Quantity
+ Use the optional `quantity` query parameter to choose the quantity returned:
+ - `current` (default) — Heimdall DLR forecast in amperes (`unit: \"Ampere\"`).
+ - `apparent_power` — Heimdall DLR forecast converted to three-phase apparent power in MVA (`unit:
+ \"MVA\"`) using `S = sqrt(3) * V * I / 1,000,000`.
+
+ ### Voltage selection for `apparent_power`
+ The line's **operational voltage** is used when it is set and positive; otherwise the **nominal
+ voltage** is used.
+ Both voltages are exposed on the facility in the `GET /assets/v1/assets` response so clients can
+ verify which value the calculation would use.
+ If neither voltage is usable, the response is `404`.
+
Args:
line_id (UUID):
+ quantity (Quantity | Unset): Which quantity to return from a rating endpoint:
+ - `current` — value in amperes.
+ - `apparent_power` — value converted to MVA using `S = sqrt(3) * V * I / 1,000,000`.
x_region (CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion | Unset):
Default: CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion.EU.
@@ -254,12 +329,13 @@ async def asyncio(
Returns:
Any | CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200 | ProblemDetails
- """
-
-
- return (await asyncio_detailed(
- line_id=line_id,
-client=client,
-x_region=x_region,
-
- )).parsed
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ quantity=quantity,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/client.py b/python/heimdall_api_client/capacity_monitoring_api_client/client.py
index 5eeb05a..1b7055a 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/client.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/client.py
@@ -1,11 +1,8 @@
import ssl
from typing import Any
-from attrs import define, field, evolve
import httpx
-
-
-
+from attrs import define, evolve, field
@define
@@ -36,6 +33,7 @@ class Client:
status code that was not documented in the source OpenAPI document. Can also be provided as a keyword
argument to the constructor.
"""
+
raise_on_unexpected_status: bool = field(default=False, kw_only=True)
_base_url: str = field(alias="base_url")
_cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
@@ -268,4 +266,3 @@ async def __aenter__(self) -> "AuthenticatedClient":
async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
"""Exit a context manager for underlying httpx.AsyncClient (see httpx docs)"""
await self.get_async_httpx_client().__aexit__(*args, **kwargs)
-
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/errors.py b/python/heimdall_api_client/capacity_monitoring_api_client/errors.py
index b912123..5f92e76 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/errors.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/errors.py
@@ -1,4 +1,5 @@
-""" Contains shared errors types that can be raised from API functions """
+"""Contains shared errors types that can be raised from API functions"""
+
class UnexpectedStatus(Exception):
"""Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True"""
@@ -11,4 +12,5 @@ def __init__(self, status_code: int, content: bytes):
f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}"
)
+
__all__ = ["UnexpectedStatus"]
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/__init__.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/__init__.py
index 9e3489a..c57d335 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/__init__.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/__init__.py
@@ -1,24 +1,65 @@
-""" Contains all the data models used in inputs/outputs """
+"""Contains all the data models used in inputs/outputs"""
from .api_response import ApiResponse
-from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200 import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200
-from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion
-from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200 import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200
-from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region import CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion
-from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200
-from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region import CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion
-from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200
-from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region import CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion
-from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200
-from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region import CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion
-from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200 import CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200
-from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region import CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion
+from .capacity_monitoring_v1_facilities_get_circuit_ratings_response_200 import (
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200,
+)
+from .capacity_monitoring_v1_facilities_get_circuit_ratings_x_region import (
+ CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion,
+)
+from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200 import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200,
+)
+from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion,
+)
+from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200 import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200,
+)
+from .capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region import (
+ CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion,
+)
+from .capacity_monitoring_v1_lines_get_heimdall_aars_response_200 import (
+ CapacityMonitoringV1LinesGetHeimdallAarsResponse200,
+)
+from .capacity_monitoring_v1_lines_get_heimdall_aars_x_region import CapacityMonitoringV1LinesGetHeimdallAarsXRegion
+from .capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200 import (
+ CapacityMonitoringV1LinesGetHeimdallDlrsResponse200,
+)
+from .capacity_monitoring_v1_lines_get_heimdall_dlrs_x_region import CapacityMonitoringV1LinesGetHeimdallDlrsXRegion
+from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200,
+)
+from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion,
+)
+from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200,
+)
+from .capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion,
+)
+from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200,
+)
+from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion,
+)
+from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200 import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200,
+)
+from .capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region import (
+ CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion,
+)
from .circuit_rating import CircuitRating
from .circuit_rating_forecasts import CircuitRatingForecasts
+from .circuit_ratings import CircuitRatings
from .heimdall_aar import HeimdallAar
from .heimdall_aar_forecasts import HeimdallAarForecasts
+from .heimdall_aars import HeimdallAars
from .heimdall_dlr import HeimdallDlr
from .heimdall_dlr_forecasts import HeimdallDlrForecasts
+from .heimdall_dlrs import HeimdallDlrs
from .latest_circuit_rating import LatestCircuitRating
from .latest_heimdall_aar import LatestHeimdallAar
from .latest_heimdall_dlr import LatestHeimdallDlr
@@ -27,13 +68,20 @@
from .probabilistic_circuit_rating_ampacity import ProbabilisticCircuitRatingAmpacity
from .probabilistic_line_ampacity import ProbabilisticLineAmpacity
from .problem_details import ProblemDetails
+from .quantity import Quantity
__all__ = (
"ApiResponse",
+ "CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200",
+ "CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion",
"CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200",
"CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion",
"CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200",
"CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion",
+ "CapacityMonitoringV1LinesGetHeimdallAarsResponse200",
+ "CapacityMonitoringV1LinesGetHeimdallAarsXRegion",
+ "CapacityMonitoringV1LinesGetHeimdallDlrsResponse200",
+ "CapacityMonitoringV1LinesGetHeimdallDlrsXRegion",
"CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200",
"CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion",
"CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200",
@@ -44,10 +92,13 @@
"CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion",
"CircuitRating",
"CircuitRatingForecasts",
+ "CircuitRatings",
"HeimdallAar",
"HeimdallAarForecasts",
+ "HeimdallAars",
"HeimdallDlr",
"HeimdallDlrForecasts",
+ "HeimdallDlrs",
"LatestCircuitRating",
"LatestHeimdallAar",
"LatestHeimdallDlr",
@@ -56,4 +107,5 @@
"ProbabilisticCircuitRatingAmpacity",
"ProbabilisticLineAmpacity",
"ProblemDetails",
+ "Quantity",
)
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/api_response.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/api_response.py
index 0d7687d..ee6a367 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/api_response.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/api_response.py
@@ -1,51 +1,37 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-
-
-
-
-
-
T = TypeVar("T", bound="ApiResponse")
-
@_attrs_define
class ApiResponse:
- """
- Attributes:
- data (Any):
- """
+ """
+ Attributes:
+ data (Any):
+ """
data: Any
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
data = self.data
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "data": data,
- })
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
@@ -55,7 +41,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
data=data,
)
-
api_response.additional_properties = d
return api_response
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_response_200.py
new file mode 100644
index 0000000..eca254a
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.circuit_ratings import CircuitRatings
+
+
+T = TypeVar("T", bound="CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200")
+
+
+@_attrs_define
+class CapacityMonitoringV1FacilitiesGetCircuitRatingsResponse200:
+ """
+ Attributes:
+ data (CircuitRatings):
+ """
+
+ data: CircuitRatings
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.circuit_ratings import CircuitRatings
+
+ d = dict(src_dict)
+ data = CircuitRatings.from_dict(d.pop("data"))
+
+ capacity_monitoring_v1_facilities_get_circuit_ratings_response_200 = cls(
+ data=data,
+ )
+
+ capacity_monitoring_v1_facilities_get_circuit_ratings_response_200.additional_properties = d
+ return capacity_monitoring_v1_facilities_get_circuit_ratings_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_x_region.py
new file mode 100644
index 0000000..f157244
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class CapacityMonitoringV1FacilitiesGetCircuitRatingsXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200.py
index 4a11714..c533281 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200.py
@@ -1,69 +1,52 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.circuit_rating_forecasts import CircuitRatingForecasts
-
-
-
+ from ..models.circuit_rating_forecasts import CircuitRatingForecasts
T = TypeVar("T", bound="CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200")
-
@_attrs_define
class CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsResponse200:
- """
- Attributes:
- data (CircuitRatingForecasts):
- """
+ """
+ Attributes:
+ data (CircuitRatingForecasts):
+ """
data: CircuitRatingForecasts
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.circuit_rating_forecasts import CircuitRatingForecasts
data = self.data.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "data": data,
- })
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.circuit_rating_forecasts import CircuitRatingForecasts
+
d = dict(src_dict)
data = CircuitRatingForecasts.from_dict(d.pop("data"))
-
-
-
capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200 = cls(
data=data,
)
-
capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200.additional_properties = d
return capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region.py
index dc4ef31..4d3f7fa 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region.py
@@ -1,5 +1,6 @@
from enum import Enum
+
class CapacityMonitoringV1FacilitiesGetLatestCircuitRatingForecastsXRegion(str, Enum):
EU = "eu"
US = "us"
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200.py
index d2d2bdb..d7a8178 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200.py
@@ -1,69 +1,52 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.latest_circuit_rating import LatestCircuitRating
-
-
-
+ from ..models.latest_circuit_rating import LatestCircuitRating
T = TypeVar("T", bound="CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200")
-
@_attrs_define
class CapacityMonitoringV1FacilitiesGetLatestCircuitRatingResponse200:
- """
- Attributes:
- data (LatestCircuitRating):
- """
+ """
+ Attributes:
+ data (LatestCircuitRating):
+ """
data: LatestCircuitRating
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.latest_circuit_rating import LatestCircuitRating
data = self.data.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "data": data,
- })
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.latest_circuit_rating import LatestCircuitRating
+
d = dict(src_dict)
data = LatestCircuitRating.from_dict(d.pop("data"))
-
-
-
capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200 = cls(
data=data,
)
-
capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200.additional_properties = d
return capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region.py
index fd49654..48494ab 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region.py
@@ -1,5 +1,6 @@
from enum import Enum
+
class CapacityMonitoringV1FacilitiesGetLatestCircuitRatingXRegion(str, Enum):
EU = "eu"
US = "us"
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_response_200.py
new file mode 100644
index 0000000..db1a0b8
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.heimdall_aars import HeimdallAars
+
+
+T = TypeVar("T", bound="CapacityMonitoringV1LinesGetHeimdallAarsResponse200")
+
+
+@_attrs_define
+class CapacityMonitoringV1LinesGetHeimdallAarsResponse200:
+ """
+ Attributes:
+ data (HeimdallAars):
+ """
+
+ data: HeimdallAars
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.heimdall_aars import HeimdallAars
+
+ d = dict(src_dict)
+ data = HeimdallAars.from_dict(d.pop("data"))
+
+ capacity_monitoring_v1_lines_get_heimdall_aars_response_200 = cls(
+ data=data,
+ )
+
+ capacity_monitoring_v1_lines_get_heimdall_aars_response_200.additional_properties = d
+ return capacity_monitoring_v1_lines_get_heimdall_aars_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_x_region.py
new file mode 100644
index 0000000..c7e5993
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class CapacityMonitoringV1LinesGetHeimdallAarsXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200.py
new file mode 100644
index 0000000..885654c
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.heimdall_dlrs import HeimdallDlrs
+
+
+T = TypeVar("T", bound="CapacityMonitoringV1LinesGetHeimdallDlrsResponse200")
+
+
+@_attrs_define
+class CapacityMonitoringV1LinesGetHeimdallDlrsResponse200:
+ """
+ Attributes:
+ data (HeimdallDlrs):
+ """
+
+ data: HeimdallDlrs
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.heimdall_dlrs import HeimdallDlrs
+
+ d = dict(src_dict)
+ data = HeimdallDlrs.from_dict(d.pop("data"))
+
+ capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200 = cls(
+ data=data,
+ )
+
+ capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200.additional_properties = d
+ return capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_x_region.py
new file mode 100644
index 0000000..bff3252
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class CapacityMonitoringV1LinesGetHeimdallDlrsXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200.py
index c872364..65b5e04 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200.py
@@ -1,69 +1,52 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.heimdall_aar_forecasts import HeimdallAarForecasts
-
-
-
+ from ..models.heimdall_aar_forecasts import HeimdallAarForecasts
T = TypeVar("T", bound="CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200")
-
@_attrs_define
class CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsResponse200:
- """
- Attributes:
- data (HeimdallAarForecasts):
- """
+ """
+ Attributes:
+ data (HeimdallAarForecasts):
+ """
data: HeimdallAarForecasts
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.heimdall_aar_forecasts import HeimdallAarForecasts
data = self.data.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "data": data,
- })
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.heimdall_aar_forecasts import HeimdallAarForecasts
+
d = dict(src_dict)
data = HeimdallAarForecasts.from_dict(d.pop("data"))
-
-
-
capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200 = cls(
data=data,
)
-
capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200.additional_properties = d
return capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region.py
index 6998484..95c1320 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region.py
@@ -1,5 +1,6 @@
from enum import Enum
+
class CapacityMonitoringV1LinesGetLatestHeimdallAarForecastsXRegion(str, Enum):
EU = "eu"
US = "us"
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200.py
index 8a36f41..a3da8e3 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200.py
@@ -1,69 +1,52 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.latest_heimdall_aar import LatestHeimdallAar
-
-
-
+ from ..models.latest_heimdall_aar import LatestHeimdallAar
T = TypeVar("T", bound="CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200")
-
@_attrs_define
class CapacityMonitoringV1LinesGetLatestHeimdallAarResponse200:
- """
- Attributes:
- data (LatestHeimdallAar):
- """
+ """
+ Attributes:
+ data (LatestHeimdallAar):
+ """
data: LatestHeimdallAar
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.latest_heimdall_aar import LatestHeimdallAar
data = self.data.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "data": data,
- })
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.latest_heimdall_aar import LatestHeimdallAar
+
d = dict(src_dict)
data = LatestHeimdallAar.from_dict(d.pop("data"))
-
-
-
capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200 = cls(
data=data,
)
-
capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200.additional_properties = d
return capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region.py
index 60abba9..225425b 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region.py
@@ -1,5 +1,6 @@
from enum import Enum
+
class CapacityMonitoringV1LinesGetLatestHeimdallAarXRegion(str, Enum):
EU = "eu"
US = "us"
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200.py
index 4c75925..129655d 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200.py
@@ -1,69 +1,52 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.heimdall_dlr_forecasts import HeimdallDlrForecasts
-
-
-
+ from ..models.heimdall_dlr_forecasts import HeimdallDlrForecasts
T = TypeVar("T", bound="CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200")
-
@_attrs_define
class CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsResponse200:
- """
- Attributes:
- data (HeimdallDlrForecasts):
- """
+ """
+ Attributes:
+ data (HeimdallDlrForecasts):
+ """
data: HeimdallDlrForecasts
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.heimdall_dlr_forecasts import HeimdallDlrForecasts
data = self.data.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "data": data,
- })
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.heimdall_dlr_forecasts import HeimdallDlrForecasts
+
d = dict(src_dict)
data = HeimdallDlrForecasts.from_dict(d.pop("data"))
-
-
-
capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200 = cls(
data=data,
)
-
capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200.additional_properties = d
return capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region.py
index 9f3060e..7a79777 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region.py
@@ -1,5 +1,6 @@
from enum import Enum
+
class CapacityMonitoringV1LinesGetLatestHeimdallDlrForecastsXRegion(str, Enum):
EU = "eu"
US = "us"
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200.py
index 946608b..65ad652 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200.py
@@ -1,69 +1,52 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.latest_heimdall_dlr import LatestHeimdallDlr
-
-
-
+ from ..models.latest_heimdall_dlr import LatestHeimdallDlr
T = TypeVar("T", bound="CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200")
-
@_attrs_define
class CapacityMonitoringV1LinesGetLatestHeimdallDlrResponse200:
- """
- Attributes:
- data (LatestHeimdallDlr):
- """
+ """
+ Attributes:
+ data (LatestHeimdallDlr):
+ """
data: LatestHeimdallDlr
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.latest_heimdall_dlr import LatestHeimdallDlr
data = self.data.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "data": data,
- })
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.latest_heimdall_dlr import LatestHeimdallDlr
+
d = dict(src_dict)
data = LatestHeimdallDlr.from_dict(d.pop("data"))
-
-
-
capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200 = cls(
data=data,
)
-
capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200.additional_properties = d
return capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region.py
index 6f7755a..39a60af 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region.py
@@ -1,5 +1,6 @@
from enum import Enum
+
class CapacityMonitoringV1LinesGetLatestHeimdallDlrXRegion(str, Enum):
EU = "eu"
US = "us"
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating.py
index a787dc8..2ba6724 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating.py
@@ -1,41 +1,36 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import Any, TypeVar, cast
+from uuid import UUID
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
-from ..types import UNSET, Unset
from dateutil.parser import isoparse
-from typing import cast
-from uuid import UUID
-import datetime
-
-
-
-
+from ..types import UNSET, Unset
T = TypeVar("T", bound="CircuitRating")
-
@_attrs_define
class CircuitRating:
- """
- Attributes:
- timestamp (datetime.datetime): Time (in UTC) when the circuit rating was calculated. Example: 2024-07-01
- 12:00:00.001000+00:00.
- value (float): The minimum calculated ampacity (in amperes) at the given timestamp. Example: 375.4.
- is_fallback (bool): Indicates whether the circuit rating is a fallback value. Only applies to grid owners opting
- in for this feature.
- at_facility_component_id (None | Unset | UUID): Identifier of the facility component that determines the circuit
- rating at this timestamp. When null, the circuit rating is not limited by a facility component. Example:
- 00000000-0000-0000-0000-000000000000.
- """
+ """
+ Attributes:
+ timestamp (datetime.datetime): Time (in UTC) when the circuit rating was calculated. Example: 2024-07-01
+ 12:00:00.001000+00:00.
+ value (float): The latest circuit rating value at the given timestamp. The unit of this value is given by the
+ sibling `unit` field on the response:
+ - When `quantity=current` (default) → amperes.
+ - When `quantity=apparent_power` → MVA.
+ Example: 375.4.
+ is_fallback (bool): Indicates whether the circuit rating is a fallback value. Only applies to grid owners opting
+ in for this feature.
+ at_facility_component_id (None | Unset | UUID): Identifier of the facility component that determines the circuit
+ rating at this timestamp. When null, the circuit rating is not limited by a facility component. Example:
+ 00000000-0000-0000-0000-000000000000.
+ """
timestamp: datetime.datetime
value: float
@@ -43,10 +38,6 @@ class CircuitRating:
at_facility_component_id: None | Unset | UUID = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
timestamp = self.timestamp.isoformat()
@@ -62,29 +53,25 @@ def to_dict(self) -> dict[str, Any]:
else:
at_facility_component_id = self.at_facility_component_id
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "timestamp": timestamp,
- "value": value,
- "is_fallback": is_fallback,
- })
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "value": value,
+ "is_fallback": is_fallback,
+ }
+ )
if at_facility_component_id is not UNSET:
field_dict["at_facility_component_id"] = at_facility_component_id
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
timestamp = isoparse(d.pop("timestamp"))
-
-
-
value = d.pop("value")
is_fallback = d.pop("is_fallback")
@@ -99,8 +86,6 @@ def _parse_at_facility_component_id(data: object) -> None | Unset | UUID:
raise TypeError()
at_facility_component_id_type_0 = UUID(data)
-
-
return at_facility_component_id_type_0
except (TypeError, ValueError, AttributeError, KeyError):
pass
@@ -108,7 +93,6 @@ def _parse_at_facility_component_id(data: object) -> None | Unset | UUID:
at_facility_component_id = _parse_at_facility_component_id(d.pop("at_facility_component_id", UNSET))
-
circuit_rating = cls(
timestamp=timestamp,
value=value,
@@ -116,7 +100,6 @@ def _parse_at_facility_component_id(data: object) -> None | Unset | UUID:
at_facility_component_id=at_facility_component_id,
)
-
circuit_rating.additional_properties = d
return circuit_rating
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating_forecasts.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating_forecasts.py
index 0ac8006..dd88b6e 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating_forecasts.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating_forecasts.py
@@ -1,39 +1,35 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
from dateutil.parser import isoparse
-from typing import cast
-import datetime
if TYPE_CHECKING:
- from ..models.predicted_circuit_rating_forecast import PredictedCircuitRatingForecast
-
-
-
+ from ..models.predicted_circuit_rating_forecast import PredictedCircuitRatingForecast
T = TypeVar("T", bound="CircuitRatingForecasts")
-
@_attrs_define
class CircuitRatingForecasts:
- """
- Attributes:
- metric (str): What kind of data does this response contain. Example: Circuit rating forecast.
- unit (str): The unit of the values in the response. Example: Ampere.
- updated_timestamp (datetime.datetime): The timestamp when the forecasts were last updated. Example: 2024-07-01
- 12:00:00.001000+00:00.
- circuit_rating_forecasts (list[PredictedCircuitRatingForecast]): The forecasts for a 1 hour interval starting
- from the `updated_timestamp`. The predicted forecasts includes different percentages of confidence.
- """
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Circuit rating forecast.
+ unit (str): The unit of the values in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ updated_timestamp (datetime.datetime): The timestamp when the forecasts were last updated. Example: 2024-07-01
+ 12:00:00.001000+00:00.
+ circuit_rating_forecasts (list[PredictedCircuitRatingForecast]): The forecasts for a 1 hour interval starting
+ from the `updated_timestamp`. The predicted forecasts includes different percentages of confidence.
+ """
metric: str
unit: str
@@ -41,12 +37,7 @@ class CircuitRatingForecasts:
circuit_rating_forecasts: list[PredictedCircuitRatingForecast]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.predicted_circuit_rating_forecast import PredictedCircuitRatingForecast
metric = self.metric
unit = self.unit
@@ -58,25 +49,23 @@ def to_dict(self) -> dict[str, Any]:
circuit_rating_forecasts_item = circuit_rating_forecasts_item_data.to_dict()
circuit_rating_forecasts.append(circuit_rating_forecasts_item)
-
-
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "metric": metric,
- "unit": unit,
- "updated_timestamp": updated_timestamp,
- "circuit_rating_forecasts": circuit_rating_forecasts,
- })
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "updated_timestamp": updated_timestamp,
+ "circuit_rating_forecasts": circuit_rating_forecasts,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.predicted_circuit_rating_forecast import PredictedCircuitRatingForecast
+
d = dict(src_dict)
metric = d.pop("metric")
@@ -84,19 +73,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
updated_timestamp = isoparse(d.pop("updated_timestamp"))
-
-
-
circuit_rating_forecasts = []
_circuit_rating_forecasts = d.pop("circuit_rating_forecasts")
- for circuit_rating_forecasts_item_data in (_circuit_rating_forecasts):
+ for circuit_rating_forecasts_item_data in _circuit_rating_forecasts:
circuit_rating_forecasts_item = PredictedCircuitRatingForecast.from_dict(circuit_rating_forecasts_item_data)
-
-
circuit_rating_forecasts.append(circuit_rating_forecasts_item)
-
circuit_rating_forecasts = cls(
metric=metric,
unit=unit,
@@ -104,7 +87,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
circuit_rating_forecasts=circuit_rating_forecasts,
)
-
circuit_rating_forecasts.additional_properties = d
return circuit_rating_forecasts
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_ratings.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_ratings.py
new file mode 100644
index 0000000..b7585f2
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/circuit_ratings.py
@@ -0,0 +1,95 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.circuit_rating import CircuitRating
+
+
+T = TypeVar("T", bound="CircuitRatings")
+
+
+@_attrs_define
+class CircuitRatings:
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Circuit rating.
+ unit (str): The unit of the values in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ circuit_ratings (list[CircuitRating]): List of circuit ratings within the requested time range.
+ """
+
+ metric: str
+ unit: str
+ circuit_ratings: list[CircuitRating]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ circuit_ratings = []
+ for circuit_ratings_item_data in self.circuit_ratings:
+ circuit_ratings_item = circuit_ratings_item_data.to_dict()
+ circuit_ratings.append(circuit_ratings_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "circuit_ratings": circuit_ratings,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.circuit_rating import CircuitRating
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ circuit_ratings = []
+ _circuit_ratings = d.pop("circuit_ratings")
+ for circuit_ratings_item_data in _circuit_ratings:
+ circuit_ratings_item = CircuitRating.from_dict(circuit_ratings_item_data)
+
+ circuit_ratings.append(circuit_ratings_item)
+
+ circuit_ratings = cls(
+ metric=metric,
+ unit=unit,
+ circuit_ratings=circuit_ratings,
+ )
+
+ circuit_ratings.additional_properties = d
+ return circuit_ratings
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar.py
index e589ce6..4e05a20 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar.py
@@ -1,68 +1,54 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
from dateutil.parser import isoparse
-from typing import cast
-import datetime
-
-
-
-
-
T = TypeVar("T", bound="HeimdallAar")
-
@_attrs_define
class HeimdallAar:
- """
- Attributes:
- timestamp (datetime.datetime): Time (in UTC) when the Heimdall AAR was calculated. Example: 2024-07-01
- 12:00:00.001000+00:00.
- value (float): The minimum calculated ampacity (in amperes) at the given timestamp. Example: 375.4.
- """
+ """
+ Attributes:
+ timestamp (datetime.datetime): Time (in UTC) when the Heimdall AAR was calculated. Example: 2024-07-01
+ 12:00:00.001000+00:00.
+ value (float): The latest Heimdall AAR value at the given timestamp. The unit of this value is given by the
+ sibling `unit` field on the response:
+ - When `quantity=current` (default) → amperes.
+ - When `quantity=apparent_power` → MVA.
+ Example: 375.4.
+ """
timestamp: datetime.datetime
value: float
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
timestamp = self.timestamp.isoformat()
value = self.value
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "timestamp": timestamp,
- "value": value,
- })
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "value": value,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
timestamp = isoparse(d.pop("timestamp"))
-
-
-
value = d.pop("value")
heimdall_aar = cls(
@@ -70,7 +56,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
value=value,
)
-
heimdall_aar.additional_properties = d
return heimdall_aar
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar_forecasts.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar_forecasts.py
index fbaabd2..b422155 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar_forecasts.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar_forecasts.py
@@ -1,39 +1,35 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
from dateutil.parser import isoparse
-from typing import cast
-import datetime
if TYPE_CHECKING:
- from ..models.predicted_forecast import PredictedForecast
-
-
-
+ from ..models.predicted_forecast import PredictedForecast
T = TypeVar("T", bound="HeimdallAarForecasts")
-
@_attrs_define
class HeimdallAarForecasts:
- """
- Attributes:
- metric (str): What kind of data does this response contain. Example: Heimdall AAR forecast.
- unit (str): The unit of the values in the response. Example: Ampere.
- updated_timestamp (datetime.datetime): The timestamp when the forecasts were last updated. Example: 2024-07-01
- 12:00:00.001000+00:00.
- heimdall_aar_forecasts (list[PredictedForecast]): The forecasts for a 1 hour interval starting from the
- `updated_timestamp`. The predicted forecasts includes different percentages of confidence.
- """
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Heimdall AAR forecast.
+ unit (str): The unit of the values in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ updated_timestamp (datetime.datetime): The timestamp when the forecasts were last updated. Example: 2024-07-01
+ 12:00:00.001000+00:00.
+ heimdall_aar_forecasts (list[PredictedForecast]): The forecasts for a 1 hour interval starting from the
+ `updated_timestamp`. The predicted forecasts includes different percentages of confidence.
+ """
metric: str
unit: str
@@ -41,12 +37,7 @@ class HeimdallAarForecasts:
heimdall_aar_forecasts: list[PredictedForecast]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.predicted_forecast import PredictedForecast
metric = self.metric
unit = self.unit
@@ -58,25 +49,23 @@ def to_dict(self) -> dict[str, Any]:
heimdall_aar_forecasts_item = heimdall_aar_forecasts_item_data.to_dict()
heimdall_aar_forecasts.append(heimdall_aar_forecasts_item)
-
-
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "metric": metric,
- "unit": unit,
- "updated_timestamp": updated_timestamp,
- "heimdall_aar_forecasts": heimdall_aar_forecasts,
- })
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "updated_timestamp": updated_timestamp,
+ "heimdall_aar_forecasts": heimdall_aar_forecasts,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.predicted_forecast import PredictedForecast
+
d = dict(src_dict)
metric = d.pop("metric")
@@ -84,19 +73,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
updated_timestamp = isoparse(d.pop("updated_timestamp"))
-
-
-
heimdall_aar_forecasts = []
_heimdall_aar_forecasts = d.pop("heimdall_aar_forecasts")
- for heimdall_aar_forecasts_item_data in (_heimdall_aar_forecasts):
+ for heimdall_aar_forecasts_item_data in _heimdall_aar_forecasts:
heimdall_aar_forecasts_item = PredictedForecast.from_dict(heimdall_aar_forecasts_item_data)
-
-
heimdall_aar_forecasts.append(heimdall_aar_forecasts_item)
-
heimdall_aar_forecasts = cls(
metric=metric,
unit=unit,
@@ -104,7 +87,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
heimdall_aar_forecasts=heimdall_aar_forecasts,
)
-
heimdall_aar_forecasts.additional_properties = d
return heimdall_aar_forecasts
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aars.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aars.py
new file mode 100644
index 0000000..b89d114
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aars.py
@@ -0,0 +1,96 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.heimdall_aar import HeimdallAar
+
+
+T = TypeVar("T", bound="HeimdallAars")
+
+
+@_attrs_define
+class HeimdallAars:
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Heimdall AAR.
+ unit (str): The unit of the values in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ heimdall_aars (list[HeimdallAar]): List of Heimdall AAR values within the requested time range. May be empty if
+ no data exists for the period.
+ """
+
+ metric: str
+ unit: str
+ heimdall_aars: list[HeimdallAar]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ heimdall_aars = []
+ for heimdall_aars_item_data in self.heimdall_aars:
+ heimdall_aars_item = heimdall_aars_item_data.to_dict()
+ heimdall_aars.append(heimdall_aars_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "heimdall_aars": heimdall_aars,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.heimdall_aar import HeimdallAar
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ heimdall_aars = []
+ _heimdall_aars = d.pop("heimdall_aars")
+ for heimdall_aars_item_data in _heimdall_aars:
+ heimdall_aars_item = HeimdallAar.from_dict(heimdall_aars_item_data)
+
+ heimdall_aars.append(heimdall_aars_item)
+
+ heimdall_aars = cls(
+ metric=metric,
+ unit=unit,
+ heimdall_aars=heimdall_aars,
+ )
+
+ heimdall_aars.additional_properties = d
+ return heimdall_aars
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr.py
index 28d0654..c4efcb9 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr.py
@@ -1,85 +1,80 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import Any, TypeVar
+from uuid import UUID
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
from dateutil.parser import isoparse
-from typing import cast
-import datetime
-
-
-
-
-
T = TypeVar("T", bound="HeimdallDlr")
-
@_attrs_define
class HeimdallDlr:
- """
- Attributes:
- timestamp (datetime.datetime): Time (in UTC) when the Heimdall DLR was calculated. Example: 2024-07-01
- 12:00:00.001000+00:00.
- value (float): The minimum calculated ampacity (in amperes) at the given timestamp. Example: 375.4.
- is_fallback (bool): Indicates whether the Heimdall DLR is a fallback value. Only applies to grid owners opting
- in for this feature.
- """
+ """
+ Attributes:
+ timestamp (datetime.datetime): Time (in UTC) when the Heimdall DLR was calculated. Example: 2024-07-01
+ 12:00:00.001000+00:00.
+ value (float): The latest Heimdall DLR value at the given timestamp. The unit of this value is given by the
+ sibling `unit` field on the response:
+ - When `quantity=current` (default) → amperes.
+ - When `quantity=apparent_power` → MVA.
+ Example: 375.4.
+ at_span_id (UUID): Identifier of the span at which the lowest ampacity was calculated. Example:
+ 00000000-0000-0000-0000-000000000000.
+ is_fallback (bool): Indicates whether the Heimdall DLR is a fallback value. Only applies to grid owners opting
+ in for this feature.
+ """
timestamp: datetime.datetime
value: float
+ at_span_id: UUID
is_fallback: bool
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
timestamp = self.timestamp.isoformat()
value = self.value
- is_fallback = self.is_fallback
+ at_span_id = str(self.at_span_id)
+ is_fallback = self.is_fallback
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "timestamp": timestamp,
- "value": value,
- "is_fallback": is_fallback,
- })
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "value": value,
+ "at_span_id": at_span_id,
+ "is_fallback": is_fallback,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
timestamp = isoparse(d.pop("timestamp"))
-
-
-
value = d.pop("value")
+ at_span_id = UUID(d.pop("at_span_id"))
+
is_fallback = d.pop("is_fallback")
heimdall_dlr = cls(
timestamp=timestamp,
value=value,
+ at_span_id=at_span_id,
is_fallback=is_fallback,
)
-
heimdall_dlr.additional_properties = d
return heimdall_dlr
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr_forecasts.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr_forecasts.py
index 53ffcd4..8aa1c15 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr_forecasts.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr_forecasts.py
@@ -1,39 +1,35 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
from dateutil.parser import isoparse
-from typing import cast
-import datetime
if TYPE_CHECKING:
- from ..models.predicted_forecast import PredictedForecast
-
-
-
+ from ..models.predicted_forecast import PredictedForecast
T = TypeVar("T", bound="HeimdallDlrForecasts")
-
@_attrs_define
class HeimdallDlrForecasts:
- """
- Attributes:
- metric (str): What kind of data does this response contain. Example: Heimdall DLR forecast.
- unit (str): The unit of the values in the response. Example: Ampere.
- updated_timestamp (datetime.datetime): The timestamp when the forecasts were last updated. Example: 2024-07-01
- 12:00:00.001000+00:00.
- heimdall_dlr_forecasts (list[PredictedForecast]): The forecasts for a 1 hour interval starting from the
- `updated_timestamp`. The predicted forecasts includes different percentages of confidence.
- """
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Heimdall DLR forecast.
+ unit (str): The unit of the values in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ updated_timestamp (datetime.datetime): The timestamp when the forecasts were last updated. Example: 2024-07-01
+ 12:00:00.001000+00:00.
+ heimdall_dlr_forecasts (list[PredictedForecast]): The forecasts for a 1 hour interval starting from the
+ `updated_timestamp`. The predicted forecasts includes different percentages of confidence.
+ """
metric: str
unit: str
@@ -41,12 +37,7 @@ class HeimdallDlrForecasts:
heimdall_dlr_forecasts: list[PredictedForecast]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.predicted_forecast import PredictedForecast
metric = self.metric
unit = self.unit
@@ -58,25 +49,23 @@ def to_dict(self) -> dict[str, Any]:
heimdall_dlr_forecasts_item = heimdall_dlr_forecasts_item_data.to_dict()
heimdall_dlr_forecasts.append(heimdall_dlr_forecasts_item)
-
-
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "metric": metric,
- "unit": unit,
- "updated_timestamp": updated_timestamp,
- "heimdall_dlr_forecasts": heimdall_dlr_forecasts,
- })
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "updated_timestamp": updated_timestamp,
+ "heimdall_dlr_forecasts": heimdall_dlr_forecasts,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.predicted_forecast import PredictedForecast
+
d = dict(src_dict)
metric = d.pop("metric")
@@ -84,19 +73,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
updated_timestamp = isoparse(d.pop("updated_timestamp"))
-
-
-
heimdall_dlr_forecasts = []
_heimdall_dlr_forecasts = d.pop("heimdall_dlr_forecasts")
- for heimdall_dlr_forecasts_item_data in (_heimdall_dlr_forecasts):
+ for heimdall_dlr_forecasts_item_data in _heimdall_dlr_forecasts:
heimdall_dlr_forecasts_item = PredictedForecast.from_dict(heimdall_dlr_forecasts_item_data)
-
-
heimdall_dlr_forecasts.append(heimdall_dlr_forecasts_item)
-
heimdall_dlr_forecasts = cls(
metric=metric,
unit=unit,
@@ -104,7 +87,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
heimdall_dlr_forecasts=heimdall_dlr_forecasts,
)
-
heimdall_dlr_forecasts.additional_properties = d
return heimdall_dlr_forecasts
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlrs.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlrs.py
new file mode 100644
index 0000000..1b07de4
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlrs.py
@@ -0,0 +1,96 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.heimdall_dlr import HeimdallDlr
+
+
+T = TypeVar("T", bound="HeimdallDlrs")
+
+
+@_attrs_define
+class HeimdallDlrs:
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Heimdall DLR.
+ unit (str): The unit of the values in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ heimdall_dlrs (list[HeimdallDlr]): List of Heimdall DLR values within the requested time range. May be empty if
+ no data exists for the period.
+ """
+
+ metric: str
+ unit: str
+ heimdall_dlrs: list[HeimdallDlr]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ heimdall_dlrs = []
+ for heimdall_dlrs_item_data in self.heimdall_dlrs:
+ heimdall_dlrs_item = heimdall_dlrs_item_data.to_dict()
+ heimdall_dlrs.append(heimdall_dlrs_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "heimdall_dlrs": heimdall_dlrs,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.heimdall_dlr import HeimdallDlr
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ heimdall_dlrs = []
+ _heimdall_dlrs = d.pop("heimdall_dlrs")
+ for heimdall_dlrs_item_data in _heimdall_dlrs:
+ heimdall_dlrs_item = HeimdallDlr.from_dict(heimdall_dlrs_item_data)
+
+ heimdall_dlrs.append(heimdall_dlrs_item)
+
+ heimdall_dlrs = cls(
+ metric=metric,
+ unit=unit,
+ heimdall_dlrs=heimdall_dlrs,
+ )
+
+ heimdall_dlrs.additional_properties = d
+ return heimdall_dlrs
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_circuit_rating.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_circuit_rating.py
index 0e2d2d0..8ebb9cc 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_circuit_rating.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_circuit_rating.py
@@ -1,68 +1,59 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.circuit_rating import CircuitRating
-
-
-
+ from ..models.circuit_rating import CircuitRating
T = TypeVar("T", bound="LatestCircuitRating")
-
@_attrs_define
class LatestCircuitRating:
- """
- Attributes:
- metric (str): What kind of data does this response contain. Example: Circuit rating.
- unit (str): The unit of the value in the response. Example: Ampere.
- circuit_rating (CircuitRating):
- """
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Circuit rating.
+ unit (str): The unit of the value in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ circuit_rating (CircuitRating):
+ """
metric: str
unit: str
circuit_rating: CircuitRating
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.circuit_rating import CircuitRating
metric = self.metric
unit = self.unit
circuit_rating = self.circuit_rating.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "metric": metric,
- "unit": unit,
- "circuit_rating": circuit_rating,
- })
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "circuit_rating": circuit_rating,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.circuit_rating import CircuitRating
+
d = dict(src_dict)
metric = d.pop("metric")
@@ -70,16 +61,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
circuit_rating = CircuitRating.from_dict(d.pop("circuit_rating"))
-
-
-
latest_circuit_rating = cls(
metric=metric,
unit=unit,
circuit_rating=circuit_rating,
)
-
latest_circuit_rating.additional_properties = d
return latest_circuit_rating
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_aar.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_aar.py
index b518d89..a8686db 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_aar.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_aar.py
@@ -1,68 +1,59 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.heimdall_aar import HeimdallAar
-
-
-
+ from ..models.heimdall_aar import HeimdallAar
T = TypeVar("T", bound="LatestHeimdallAar")
-
@_attrs_define
class LatestHeimdallAar:
- """
- Attributes:
- metric (str): What kind of data does this response contain. Example: Heimdall AAR.
- unit (str): The unit of the value in the response. Example: Ampere.
- heimdall_aar (HeimdallAar):
- """
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Heimdall AAR.
+ unit (str): The unit of the value in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ heimdall_aar (HeimdallAar):
+ """
metric: str
unit: str
heimdall_aar: HeimdallAar
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.heimdall_aar import HeimdallAar
metric = self.metric
unit = self.unit
heimdall_aar = self.heimdall_aar.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "metric": metric,
- "unit": unit,
- "heimdall_aar": heimdall_aar,
- })
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "heimdall_aar": heimdall_aar,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.heimdall_aar import HeimdallAar
+
d = dict(src_dict)
metric = d.pop("metric")
@@ -70,16 +61,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
heimdall_aar = HeimdallAar.from_dict(d.pop("heimdall_aar"))
-
-
-
latest_heimdall_aar = cls(
metric=metric,
unit=unit,
heimdall_aar=heimdall_aar,
)
-
latest_heimdall_aar.additional_properties = d
return latest_heimdall_aar
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_dlr.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_dlr.py
index 459344e..e33826a 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_dlr.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_dlr.py
@@ -1,68 +1,59 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from typing import cast
-
if TYPE_CHECKING:
- from ..models.heimdall_dlr import HeimdallDlr
-
-
-
+ from ..models.heimdall_dlr import HeimdallDlr
T = TypeVar("T", bound="LatestHeimdallDlr")
-
@_attrs_define
class LatestHeimdallDlr:
- """
- Attributes:
- metric (str): What kind of data does this response contain. Example: Heimdall DLR.
- unit (str): The unit of the value in the response. Example: Ampere.
- heimdall_dlr (HeimdallDlr):
- """
+ """
+ Attributes:
+ metric (str): A human-readable label identifying the rating returned by this endpoint, independent of the
+ `quantity` query parameter. Example: Heimdall DLR.
+ unit (str): The unit of the value in the response. Depends on the requested `quantity` query parameter:
+ - `current` (default) → `"Ampere"`
+ - `apparent_power` → `"MVA"`
+ Example: Ampere.
+ heimdall_dlr (HeimdallDlr):
+ """
metric: str
unit: str
heimdall_dlr: HeimdallDlr
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.heimdall_dlr import HeimdallDlr
metric = self.metric
unit = self.unit
heimdall_dlr = self.heimdall_dlr.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "metric": metric,
- "unit": unit,
- "heimdall_dlr": heimdall_dlr,
- })
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "heimdall_dlr": heimdall_dlr,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.heimdall_dlr import HeimdallDlr
+
d = dict(src_dict)
metric = d.pop("metric")
@@ -70,16 +61,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
heimdall_dlr = HeimdallDlr.from_dict(d.pop("heimdall_dlr"))
-
-
-
latest_heimdall_dlr = cls(
metric=metric,
unit=unit,
heimdall_dlr=heimdall_dlr,
)
-
latest_heimdall_dlr.additional_properties = d
return latest_heimdall_dlr
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_circuit_rating_forecast.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_circuit_rating_forecast.py
index 860fe1b..a8a9b4b 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_circuit_rating_forecast.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_circuit_rating_forecast.py
@@ -1,39 +1,31 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
from dateutil.parser import isoparse
-from typing import cast
-import datetime
if TYPE_CHECKING:
- from ..models.probabilistic_circuit_rating_ampacity import ProbabilisticCircuitRatingAmpacity
-
-
-
+ from ..models.probabilistic_circuit_rating_ampacity import ProbabilisticCircuitRatingAmpacity
T = TypeVar("T", bound="PredictedCircuitRatingForecast")
-
@_attrs_define
class PredictedCircuitRatingForecast:
- """
- Attributes:
- timestamp (datetime.datetime): Timestamp for the predicted forecast. Example: 2024-07-01 12:00:00.001000+00:00.
- prediction (ProbabilisticCircuitRatingAmpacity):
- p80 (ProbabilisticCircuitRatingAmpacity):
- p90 (ProbabilisticCircuitRatingAmpacity):
- p95 (ProbabilisticCircuitRatingAmpacity):
- p99 (ProbabilisticCircuitRatingAmpacity):
- """
+ """
+ Attributes:
+ timestamp (datetime.datetime): Timestamp for the predicted forecast. Example: 2024-07-01 12:00:00.001000+00:00.
+ prediction (ProbabilisticCircuitRatingAmpacity):
+ p80 (ProbabilisticCircuitRatingAmpacity):
+ p90 (ProbabilisticCircuitRatingAmpacity):
+ p95 (ProbabilisticCircuitRatingAmpacity):
+ p99 (ProbabilisticCircuitRatingAmpacity):
+ """
timestamp: datetime.datetime
prediction: ProbabilisticCircuitRatingAmpacity
@@ -43,12 +35,7 @@ class PredictedCircuitRatingForecast:
p99: ProbabilisticCircuitRatingAmpacity
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.probabilistic_circuit_rating_ampacity import ProbabilisticCircuitRatingAmpacity
timestamp = self.timestamp.isoformat()
prediction = self.prediction.to_dict()
@@ -61,56 +48,38 @@ def to_dict(self) -> dict[str, Any]:
p99 = self.p99.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "timestamp": timestamp,
- "prediction": prediction,
- "p80": p80,
- "p90": p90,
- "p95": p95,
- "p99": p99,
- })
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "prediction": prediction,
+ "p80": p80,
+ "p90": p90,
+ "p95": p95,
+ "p99": p99,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.probabilistic_circuit_rating_ampacity import ProbabilisticCircuitRatingAmpacity
+
d = dict(src_dict)
timestamp = isoparse(d.pop("timestamp"))
-
-
-
prediction = ProbabilisticCircuitRatingAmpacity.from_dict(d.pop("prediction"))
-
-
-
p80 = ProbabilisticCircuitRatingAmpacity.from_dict(d.pop("p80"))
-
-
-
p90 = ProbabilisticCircuitRatingAmpacity.from_dict(d.pop("p90"))
-
-
-
p95 = ProbabilisticCircuitRatingAmpacity.from_dict(d.pop("p95"))
-
-
-
p99 = ProbabilisticCircuitRatingAmpacity.from_dict(d.pop("p99"))
-
-
-
predicted_circuit_rating_forecast = cls(
timestamp=timestamp,
prediction=prediction,
@@ -120,7 +89,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
p99=p99,
)
-
predicted_circuit_rating_forecast.additional_properties = d
return predicted_circuit_rating_forecast
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_forecast.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_forecast.py
index 063145e..207ac59 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_forecast.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/predicted_forecast.py
@@ -1,39 +1,31 @@
from __future__ import annotations
+import datetime
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-
-from ..types import UNSET, Unset
-
from dateutil.parser import isoparse
-from typing import cast
-import datetime
if TYPE_CHECKING:
- from ..models.probabilistic_line_ampacity import ProbabilisticLineAmpacity
-
-
-
+ from ..models.probabilistic_line_ampacity import ProbabilisticLineAmpacity
T = TypeVar("T", bound="PredictedForecast")
-
@_attrs_define
class PredictedForecast:
- """
- Attributes:
- timestamp (datetime.datetime): Timestamp for the predicted forecast. Example: 2024-07-01 12:00:00.001000+00:00.
- prediction (ProbabilisticLineAmpacity):
- p80 (ProbabilisticLineAmpacity):
- p90 (ProbabilisticLineAmpacity):
- p95 (ProbabilisticLineAmpacity):
- p99 (ProbabilisticLineAmpacity):
- """
+ """
+ Attributes:
+ timestamp (datetime.datetime): Timestamp for the predicted forecast. Example: 2024-07-01 12:00:00.001000+00:00.
+ prediction (ProbabilisticLineAmpacity):
+ p80 (ProbabilisticLineAmpacity):
+ p90 (ProbabilisticLineAmpacity):
+ p95 (ProbabilisticLineAmpacity):
+ p99 (ProbabilisticLineAmpacity):
+ """
timestamp: datetime.datetime
prediction: ProbabilisticLineAmpacity
@@ -43,12 +35,7 @@ class PredictedForecast:
p99: ProbabilisticLineAmpacity
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
- from ..models.probabilistic_line_ampacity import ProbabilisticLineAmpacity
timestamp = self.timestamp.isoformat()
prediction = self.prediction.to_dict()
@@ -61,56 +48,38 @@ def to_dict(self) -> dict[str, Any]:
p99 = self.p99.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "timestamp": timestamp,
- "prediction": prediction,
- "p80": p80,
- "p90": p90,
- "p95": p95,
- "p99": p99,
- })
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "prediction": prediction,
+ "p80": p80,
+ "p90": p90,
+ "p95": p95,
+ "p99": p99,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.probabilistic_line_ampacity import ProbabilisticLineAmpacity
+
d = dict(src_dict)
timestamp = isoparse(d.pop("timestamp"))
-
-
-
prediction = ProbabilisticLineAmpacity.from_dict(d.pop("prediction"))
-
-
-
p80 = ProbabilisticLineAmpacity.from_dict(d.pop("p80"))
-
-
-
p90 = ProbabilisticLineAmpacity.from_dict(d.pop("p90"))
-
-
-
p95 = ProbabilisticLineAmpacity.from_dict(d.pop("p95"))
-
-
-
p99 = ProbabilisticLineAmpacity.from_dict(d.pop("p99"))
-
-
-
predicted_forecast = cls(
timestamp=timestamp,
prediction=prediction,
@@ -120,7 +89,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
p99=p99,
)
-
predicted_forecast.additional_properties = d
return predicted_forecast
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_circuit_rating_ampacity.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_circuit_rating_ampacity.py
index 93c56bf..219e1c5 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_circuit_rating_ampacity.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_circuit_rating_ampacity.py
@@ -1,45 +1,36 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import Any, TypeVar, cast
+from uuid import UUID
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from ..types import UNSET, Unset
-from ..types import UNSET, Unset
-from typing import cast
-from uuid import UUID
-
-
-
-
-
-
T = TypeVar("T", bound="ProbabilisticCircuitRatingAmpacity")
-
@_attrs_define
class ProbabilisticCircuitRatingAmpacity:
- """
- Attributes:
- value (float): The ampacity value (in amperes) for the facility component id. Example: 375.4.
- at_facility_component_id (None | Unset | UUID): Identifier of the facility component at which this ampacity
- forecast was calculated. The forecast is computed per facility component and timestamp, and the final
- dimensioning value is determined by selecting the facility component with the lowest ampacity. Example:
- 00000000-0000-0000-0000-000000000000.
- """
+ """
+ Attributes:
+ value (float): The forecast value for the facility component id. The unit of this value is given by the sibling
+ `unit` field on the response:
+ - When `quantity=current` (default) → amperes.
+ - When `quantity=apparent_power` → MVA.
+ Example: 375.4.
+ at_facility_component_id (None | Unset | UUID): Identifier of the facility component at which this ampacity
+ forecast was calculated. The forecast is computed per facility component and timestamp, and the final
+ dimensioning value is determined by selecting the facility component with the lowest ampacity. Example:
+ 00000000-0000-0000-0000-000000000000.
+ """
value: float
at_facility_component_id: None | Unset | UUID = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
value = self.value
@@ -51,19 +42,18 @@ def to_dict(self) -> dict[str, Any]:
else:
at_facility_component_id = self.at_facility_component_id
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "value": value,
- })
+ field_dict.update(
+ {
+ "value": value,
+ }
+ )
if at_facility_component_id is not UNSET:
field_dict["at_facility_component_id"] = at_facility_component_id
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
@@ -79,8 +69,6 @@ def _parse_at_facility_component_id(data: object) -> None | Unset | UUID:
raise TypeError()
at_facility_component_id_type_0 = UUID(data)
-
-
return at_facility_component_id_type_0
except (TypeError, ValueError, AttributeError, KeyError):
pass
@@ -88,13 +76,11 @@ def _parse_at_facility_component_id(data: object) -> None | Unset | UUID:
at_facility_component_id = _parse_at_facility_component_id(d.pop("at_facility_component_id", UNSET))
-
probabilistic_circuit_rating_ampacity = cls(
value=value,
at_facility_component_id=at_facility_component_id,
)
-
probabilistic_circuit_rating_ampacity.additional_properties = d
return probabilistic_circuit_rating_ampacity
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_line_ampacity.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_line_ampacity.py
index 98e2230..54fa2e7 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_line_ampacity.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_line_ampacity.py
@@ -1,59 +1,49 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import Any, TypeVar
+from uuid import UUID
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
-from uuid import UUID
-
-
-
-
-
-
T = TypeVar("T", bound="ProbabilisticLineAmpacity")
-
@_attrs_define
class ProbabilisticLineAmpacity:
- """
- Attributes:
- value (float): The ampacity value (in amperes) for the line. Example: 375.4.
- at_span_id (UUID): Identifier of the span at which this ampacity forecast was calculated. The forecast is
- computed per span and timestamp, and the final dimensioning value is determined by selecting the span with the
- lowest ampacity. Example: 00000000-0000-0000-0000-000000000000.
- """
+ """
+ Attributes:
+ value (float): The forecast value for the line. The unit of this value is given by the sibling `unit` field on
+ the response:
+ - When `quantity=current` (default) → amperes.
+ - When `quantity=apparent_power` → MVA.
+ Example: 375.4.
+ at_span_id (UUID): Identifier of the span at which this ampacity forecast was calculated. The forecast is
+ computed per span and timestamp, and the final dimensioning value is determined by selecting the span with the
+ lowest ampacity. Example: 00000000-0000-0000-0000-000000000000.
+ """
value: float
at_span_id: UUID
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
value = self.value
at_span_id = str(self.at_span_id)
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- "value": value,
- "at_span_id": at_span_id,
- })
+ field_dict.update(
+ {
+ "value": value,
+ "at_span_id": at_span_id,
+ }
+ )
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
@@ -61,15 +51,11 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
at_span_id = UUID(d.pop("at_span_id"))
-
-
-
probabilistic_line_ampacity = cls(
value=value,
at_span_id=at_span_id,
)
-
probabilistic_line_ampacity.additional_properties = d
return probabilistic_line_ampacity
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/problem_details.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/problem_details.py
index 0430dad..2cd62d1 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/models/problem_details.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/problem_details.py
@@ -1,34 +1,26 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
+from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from ..types import UNSET, Unset
-from ..types import UNSET, Unset
-
-
-
-
-
-
T = TypeVar("T", bound="ProblemDetails")
-
@_attrs_define
class ProblemDetails:
- """
- Attributes:
- type_ (str | Unset):
- title (str | Unset):
- status (int | Unset):
- detail (str | Unset):
- instance (str | Unset):
- """
+ """
+ Attributes:
+ type_ (str | Unset):
+ title (str | Unset):
+ status (int | Unset):
+ detail (str | Unset):
+ instance (str | Unset):
+ """
type_: str | Unset = UNSET
title: str | Unset = UNSET
@@ -37,10 +29,6 @@ class ProblemDetails:
instance: str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
-
-
-
-
def to_dict(self) -> dict[str, Any]:
type_ = self.type_
@@ -52,11 +40,9 @@ def to_dict(self) -> dict[str, Any]:
instance = self.instance
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
- field_dict.update({
- })
+ field_dict.update({})
if type_ is not UNSET:
field_dict["type"] = type_
if title is not UNSET:
@@ -70,8 +56,6 @@ def to_dict(self) -> dict[str, Any]:
return field_dict
-
-
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
@@ -93,7 +77,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
instance=instance,
)
-
problem_details.additional_properties = d
return problem_details
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/models/quantity.py b/python/heimdall_api_client/capacity_monitoring_api_client/models/quantity.py
new file mode 100644
index 0000000..edc1570
--- /dev/null
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/models/quantity.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class Quantity(str, Enum):
+ APPARENT_POWER = "apparent_power"
+ CURRENT = "current"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/capacity_monitoring_api_client/types.py b/python/heimdall_api_client/capacity_monitoring_api_client/types.py
index f74db0a..b64af09 100644
--- a/python/heimdall_api_client/capacity_monitoring_api_client/types.py
+++ b/python/heimdall_api_client/capacity_monitoring_api_client/types.py
@@ -1,8 +1,8 @@
-""" Contains some shared types for properties """
+"""Contains some shared types for properties"""
from collections.abc import Mapping, MutableMapping
from http import HTTPStatus
-from typing import BinaryIO, Generic, TypeVar, Literal, IO
+from typing import IO, BinaryIO, Generic, Literal, TypeVar
from attrs import define
@@ -24,16 +24,17 @@ def __bool__(self) -> Literal[False]:
)
RequestFiles = list[tuple[str, FileTypes]]
+
@define
class File:
- """ Contains information for file uploads """
+ """Contains information for file uploads"""
payload: BinaryIO
file_name: str | None = None
mime_type: str | None = None
def to_tuple(self) -> FileTypes:
- """ Return a tuple representation that httpx will accept for multipart/form-data """
+ """Return a tuple representation that httpx will accept for multipart/form-data"""
return self.file_name, self.payload, self.mime_type
@@ -42,7 +43,7 @@ def to_tuple(self) -> FileTypes:
@define
class Response(Generic[T]):
- """ A response from an endpoint """
+ """A response from an endpoint"""
status_code: HTTPStatus
content: bytes
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_apparent_power.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_apparent_power.py
new file mode 100644
index 0000000..17a66fe
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_apparent_power.py
@@ -0,0 +1,283 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.grid_insights_v1_lines_get_apparent_power_response_200 import (
+ GridInsightsV1LinesGetApparentPowerResponse200,
+)
+from ...models.grid_insights_v1_lines_get_apparent_power_x_region import GridInsightsV1LinesGetApparentPowerXRegion
+from ...models.problem_details import ProblemDetails
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetApparentPowerXRegion | Unset = GridInsightsV1LinesGetApparentPowerXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/grid_insights/v1/lines/{line_id}/apparent_power".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = GridInsightsV1LinesGetApparentPowerResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetApparentPowerXRegion | Unset = GridInsightsV1LinesGetApparentPowerXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails]:
+ """Get apparent power
+
+ This endpoint returns apparent power for the line within a specified time range.
+
+ Apparent power is derived from the line's current and its voltage, and is reported in megavolt-
+ amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetApparentPowerXRegion | Unset = GridInsightsV1LinesGetApparentPowerXRegion.EU,
+) -> Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails | None:
+ """Get apparent power
+
+ This endpoint returns apparent power for the line within a specified time range.
+
+ Apparent power is derived from the line's current and its voltage, and is reported in megavolt-
+ amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetApparentPowerXRegion | Unset = GridInsightsV1LinesGetApparentPowerXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails]:
+ """Get apparent power
+
+ This endpoint returns apparent power for the line within a specified time range.
+
+ Apparent power is derived from the line's current and its voltage, and is reported in megavolt-
+ amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetApparentPowerXRegion | Unset = GridInsightsV1LinesGetApparentPowerXRegion.EU,
+) -> Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails | None:
+ """Get apparent power
+
+ This endpoint returns apparent power for the line within a specified time range.
+
+ Apparent power is derived from the line's current and its voltage, and is reported in megavolt-
+ amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetApparentPowerResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_conductor_temperatures.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_conductor_temperatures.py
new file mode 100644
index 0000000..3511c40
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_conductor_temperatures.py
@@ -0,0 +1,310 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.grid_insights_v1_lines_get_conductor_temperatures_response_200 import (
+ GridInsightsV1LinesGetConductorTemperaturesResponse200,
+)
+from ...models.grid_insights_v1_lines_get_conductor_temperatures_x_region import (
+ GridInsightsV1LinesGetConductorTemperaturesXRegion,
+)
+from ...models.problem_details import ProblemDetails
+from ...models.unit_system import UnitSystem
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetConductorTemperaturesXRegion
+ | Unset = GridInsightsV1LinesGetConductorTemperaturesXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ json_unit_system: str | Unset = UNSET
+ if not isinstance(unit_system, Unset):
+ json_unit_system = unit_system.value
+
+ params["unit_system"] = json_unit_system
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/grid_insights/v1/lines/{line_id}/conductor_temperatures".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = GridInsightsV1LinesGetConductorTemperaturesResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetConductorTemperaturesXRegion
+ | Unset = GridInsightsV1LinesGetConductorTemperaturesXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails]:
+ """Get conductor temperatures
+
+ This endpoint returns conductor temperatures for the line within a specified time range.
+
+ Conductor temperature is defined as the maximum and minimum temperature measured on the line at a
+ given timestamp.
+
+ The conductor temperature is aggregated across the entire line using a 5-minute sliding window,
+ where the maximum and minimum values are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetConductorTemperaturesXRegion | Unset): Default:
+ GridInsightsV1LinesGetConductorTemperaturesXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetConductorTemperaturesXRegion
+ | Unset = GridInsightsV1LinesGetConductorTemperaturesXRegion.EU,
+) -> Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails | None:
+ """Get conductor temperatures
+
+ This endpoint returns conductor temperatures for the line within a specified time range.
+
+ Conductor temperature is defined as the maximum and minimum temperature measured on the line at a
+ given timestamp.
+
+ The conductor temperature is aggregated across the entire line using a 5-minute sliding window,
+ where the maximum and minimum values are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetConductorTemperaturesXRegion | Unset): Default:
+ GridInsightsV1LinesGetConductorTemperaturesXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetConductorTemperaturesXRegion
+ | Unset = GridInsightsV1LinesGetConductorTemperaturesXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails]:
+ """Get conductor temperatures
+
+ This endpoint returns conductor temperatures for the line within a specified time range.
+
+ Conductor temperature is defined as the maximum and minimum temperature measured on the line at a
+ given timestamp.
+
+ The conductor temperature is aggregated across the entire line using a 5-minute sliding window,
+ where the maximum and minimum values are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetConductorTemperaturesXRegion | Unset): Default:
+ GridInsightsV1LinesGetConductorTemperaturesXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetConductorTemperaturesXRegion
+ | Unset = GridInsightsV1LinesGetConductorTemperaturesXRegion.EU,
+) -> Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails | None:
+ """Get conductor temperatures
+
+ This endpoint returns conductor temperatures for the line within a specified time range.
+
+ Conductor temperature is defined as the maximum and minimum temperature measured on the line at a
+ given timestamp.
+
+ The conductor temperature is aggregated across the entire line using a 5-minute sliding window,
+ where the maximum and minimum values are calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetConductorTemperaturesXRegion | Unset): Default:
+ GridInsightsV1LinesGetConductorTemperaturesXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetConductorTemperaturesResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_currents.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_currents.py
new file mode 100644
index 0000000..36ef22c
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_currents.py
@@ -0,0 +1,277 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.grid_insights_v1_lines_get_currents_response_200 import GridInsightsV1LinesGetCurrentsResponse200
+from ...models.grid_insights_v1_lines_get_currents_x_region import GridInsightsV1LinesGetCurrentsXRegion
+from ...models.problem_details import ProblemDetails
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetCurrentsXRegion | Unset = GridInsightsV1LinesGetCurrentsXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/grid_insights/v1/lines/{line_id}/currents".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = GridInsightsV1LinesGetCurrentsResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetCurrentsXRegion | Unset = GridInsightsV1LinesGetCurrentsXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails]:
+ """Get currents
+
+ This endpoint returns currents for the line within a specified time range.
+
+ Current is defined as the maximum current, in amperes, measured on the line at a given timestamp.
+
+ The current is aggregated across the entire line using a 5-minute sliding window, where the maximum
+ value is calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetCurrentsXRegion | Unset): Default:
+ GridInsightsV1LinesGetCurrentsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetCurrentsXRegion | Unset = GridInsightsV1LinesGetCurrentsXRegion.EU,
+) -> Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails | None:
+ """Get currents
+
+ This endpoint returns currents for the line within a specified time range.
+
+ Current is defined as the maximum current, in amperes, measured on the line at a given timestamp.
+
+ The current is aggregated across the entire line using a 5-minute sliding window, where the maximum
+ value is calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetCurrentsXRegion | Unset): Default:
+ GridInsightsV1LinesGetCurrentsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetCurrentsXRegion | Unset = GridInsightsV1LinesGetCurrentsXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails]:
+ """Get currents
+
+ This endpoint returns currents for the line within a specified time range.
+
+ Current is defined as the maximum current, in amperes, measured on the line at a given timestamp.
+
+ The current is aggregated across the entire line using a 5-minute sliding window, where the maximum
+ value is calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetCurrentsXRegion | Unset): Default:
+ GridInsightsV1LinesGetCurrentsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ x_region: GridInsightsV1LinesGetCurrentsXRegion | Unset = GridInsightsV1LinesGetCurrentsXRegion.EU,
+) -> Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails | None:
+ """Get currents
+
+ This endpoint returns currents for the line within a specified time range.
+
+ Current is defined as the maximum current, in amperes, measured on the line at a given timestamp.
+
+ The current is aggregated across the entire line using a 5-minute sliding window, where the maximum
+ value is calculated for each window.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ x_region (GridInsightsV1LinesGetCurrentsXRegion | Unset): Default:
+ GridInsightsV1LinesGetCurrentsXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetCurrentsResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing.py
new file mode 100644
index 0000000..0f16a37
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing.py
@@ -0,0 +1,353 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.grid_insights_v1_lines_get_icing_response_200 import GridInsightsV1LinesGetIcingResponse200
+from ...models.grid_insights_v1_lines_get_icing_x_region import GridInsightsV1LinesGetIcingXRegion
+from ...models.problem_details import ProblemDetails
+from ...models.unit_system import UnitSystem
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingXRegion | Unset = GridInsightsV1LinesGetIcingXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ json_unit_system: str | Unset = UNSET
+ if not isinstance(unit_system, Unset):
+ json_unit_system = unit_system.value
+
+ params["unit_system"] = json_unit_system
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/grid_insights/v1/lines/{line_id}/icing".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = GridInsightsV1LinesGetIcingResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingXRegion | Unset = GridInsightsV1LinesGetIcingXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails]:
+ """Get icing
+
+ This endpoint returns icing data for the line within a specified time range.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: Maximum icing measurements, i.e. maximum ice weight, maximum tension and maximum
+ tension percentage of break strength over the requested period, with its associated span phase on
+ the line.
+ - **`spans`**: Icing data grouped by span, with each span listing its span phases and their icing
+ measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`ice_weight`**: The mass of ice accumulated on the conductor.
+ - **`tension`**: The mechanical tension force in the conductor, which increases as ice accumulates.
+ - **`tension_percentage_of_break_strength`**: Safety-critical metric showing how close the conductor
+ is to its breaking point.
+ - **`timestamp`**: Time (UTC) when the icing measurements were calculated for the span phase.
+ Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no icing data is available for the entire line within the period, the endpoint returns `404 Not
+ Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingXRegion | Unset = GridInsightsV1LinesGetIcingXRegion.EU,
+) -> Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails | None:
+ """Get icing
+
+ This endpoint returns icing data for the line within a specified time range.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: Maximum icing measurements, i.e. maximum ice weight, maximum tension and maximum
+ tension percentage of break strength over the requested period, with its associated span phase on
+ the line.
+ - **`spans`**: Icing data grouped by span, with each span listing its span phases and their icing
+ measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`ice_weight`**: The mass of ice accumulated on the conductor.
+ - **`tension`**: The mechanical tension force in the conductor, which increases as ice accumulates.
+ - **`tension_percentage_of_break_strength`**: Safety-critical metric showing how close the conductor
+ is to its breaking point.
+ - **`timestamp`**: Time (UTC) when the icing measurements were calculated for the span phase.
+ Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no icing data is available for the entire line within the period, the endpoint returns `404 Not
+ Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingXRegion | Unset = GridInsightsV1LinesGetIcingXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails]:
+ """Get icing
+
+ This endpoint returns icing data for the line within a specified time range.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: Maximum icing measurements, i.e. maximum ice weight, maximum tension and maximum
+ tension percentage of break strength over the requested period, with its associated span phase on
+ the line.
+ - **`spans`**: Icing data grouped by span, with each span listing its span phases and their icing
+ measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`ice_weight`**: The mass of ice accumulated on the conductor.
+ - **`tension`**: The mechanical tension force in the conductor, which increases as ice accumulates.
+ - **`tension_percentage_of_break_strength`**: Safety-critical metric showing how close the conductor
+ is to its breaking point.
+ - **`timestamp`**: Time (UTC) when the icing measurements were calculated for the span phase.
+ Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no icing data is available for the entire line within the period, the endpoint returns `404 Not
+ Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingXRegion | Unset = GridInsightsV1LinesGetIcingXRegion.EU,
+) -> Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails | None:
+ """Get icing
+
+ This endpoint returns icing data for the line within a specified time range.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: Maximum icing measurements, i.e. maximum ice weight, maximum tension and maximum
+ tension percentage of break strength over the requested period, with its associated span phase on
+ the line.
+ - **`spans`**: Icing data grouped by span, with each span listing its span phases and their icing
+ measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`ice_weight`**: The mass of ice accumulated on the conductor.
+ - **`tension`**: The mechanical tension force in the conductor, which increases as ice accumulates.
+ - **`tension_percentage_of_break_strength`**: Safety-critical metric showing how close the conductor
+ is to its breaking point.
+ - **`timestamp`**: Time (UTC) when the icing measurements were calculated for the span phase.
+ Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no icing data is available for the entire line within the period, the endpoint returns `404 Not
+ Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetIcingResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing_forecast.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing_forecast.py
new file mode 100644
index 0000000..e11f208
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing_forecast.py
@@ -0,0 +1,310 @@
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.grid_insights_v1_lines_get_icing_forecast_response_200 import (
+ GridInsightsV1LinesGetIcingForecastResponse200,
+)
+from ...models.grid_insights_v1_lines_get_icing_forecast_x_region import GridInsightsV1LinesGetIcingForecastXRegion
+from ...models.problem_details import ProblemDetails
+from ...models.unit_system import UnitSystem
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingForecastXRegion | Unset = GridInsightsV1LinesGetIcingForecastXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_unit_system: str | Unset = UNSET
+ if not isinstance(unit_system, Unset):
+ json_unit_system = unit_system.value
+
+ params["unit_system"] = json_unit_system
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/grid_insights/v1/lines/{line_id}/icing/forecast".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = GridInsightsV1LinesGetIcingForecastResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingForecastXRegion | Unset = GridInsightsV1LinesGetIcingForecastXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails]:
+ """Get icing forecast
+
+ This endpoint returns the icing forecast for the line.
+
+ The forecast covers 72 hours in 30-minute intervals.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: The peak forecasted ice weight across all span phases and all forecast time points,
+ with the associated span phase and timestamp.
+ - **`spans`**: Forecast data grouped by span, with each span listing its span phases and their full
+ forecast time series.
+
+ Each forecast data point provides the following data:
+ - **`ice_weight`**: The forecasted mass of ice accumulated on the conductor.
+ - **`timestamp`**: The forecasted time (UTC) for that data point.
+
+ The forecast uses the latest measured current for the line. If no current measurement is available
+ within 20 minutes of the request, the endpoint returns `404 Not Found`.
+
+ If no icing data is available for the line, the endpoint returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingForecastXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingForecastXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingForecastXRegion | Unset = GridInsightsV1LinesGetIcingForecastXRegion.EU,
+) -> Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails | None:
+ """Get icing forecast
+
+ This endpoint returns the icing forecast for the line.
+
+ The forecast covers 72 hours in 30-minute intervals.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: The peak forecasted ice weight across all span phases and all forecast time points,
+ with the associated span phase and timestamp.
+ - **`spans`**: Forecast data grouped by span, with each span listing its span phases and their full
+ forecast time series.
+
+ Each forecast data point provides the following data:
+ - **`ice_weight`**: The forecasted mass of ice accumulated on the conductor.
+ - **`timestamp`**: The forecasted time (UTC) for that data point.
+
+ The forecast uses the latest measured current for the line. If no current measurement is available
+ within 20 minutes of the request, the endpoint returns `404 Not Found`.
+
+ If no icing data is available for the line, the endpoint returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingForecastXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingForecastXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ unit_system=unit_system,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingForecastXRegion | Unset = GridInsightsV1LinesGetIcingForecastXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails]:
+ """Get icing forecast
+
+ This endpoint returns the icing forecast for the line.
+
+ The forecast covers 72 hours in 30-minute intervals.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: The peak forecasted ice weight across all span phases and all forecast time points,
+ with the associated span phase and timestamp.
+ - **`spans`**: Forecast data grouped by span, with each span listing its span phases and their full
+ forecast time series.
+
+ Each forecast data point provides the following data:
+ - **`ice_weight`**: The forecasted mass of ice accumulated on the conductor.
+ - **`timestamp`**: The forecasted time (UTC) for that data point.
+
+ The forecast uses the latest measured current for the line. If no current measurement is available
+ within 20 minutes of the request, the endpoint returns `404 Not Found`.
+
+ If no icing data is available for the line, the endpoint returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingForecastXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingForecastXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetIcingForecastXRegion | Unset = GridInsightsV1LinesGetIcingForecastXRegion.EU,
+) -> Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails | None:
+ """Get icing forecast
+
+ This endpoint returns the icing forecast for the line.
+
+ The forecast covers 72 hours in 30-minute intervals.
+
+ The icing data is divided into two sections:
+
+ - **`max`**: The peak forecasted ice weight across all span phases and all forecast time points,
+ with the associated span phase and timestamp.
+ - **`spans`**: Forecast data grouped by span, with each span listing its span phases and their full
+ forecast time series.
+
+ Each forecast data point provides the following data:
+ - **`ice_weight`**: The forecasted mass of ice accumulated on the conductor.
+ - **`timestamp`**: The forecasted time (UTC) for that data point.
+
+ The forecast uses the latest measured current for the line. If no current measurement is available
+ within 20 minutes of the request, the endpoint returns `404 Not Found`.
+
+ If no icing data is available for the line, the endpoint returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetIcingForecastXRegion | Unset): Default:
+ GridInsightsV1LinesGetIcingForecastXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetIcingForecastResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_apparent_power.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_apparent_power.py
new file mode 100644
index 0000000..4361bbb
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_apparent_power.py
@@ -0,0 +1,244 @@
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.grid_insights_v1_lines_get_latest_apparent_power_response_200 import (
+ GridInsightsV1LinesGetLatestApparentPowerResponse200,
+)
+from ...models.grid_insights_v1_lines_get_latest_apparent_power_x_region import (
+ GridInsightsV1LinesGetLatestApparentPowerXRegion,
+)
+from ...models.problem_details import ProblemDetails
+from ...types import Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ x_region: GridInsightsV1LinesGetLatestApparentPowerXRegion
+ | Unset = GridInsightsV1LinesGetLatestApparentPowerXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/grid_insights/v1/lines/{line_id}/apparent_power/latest".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = GridInsightsV1LinesGetLatestApparentPowerResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ x_region: GridInsightsV1LinesGetLatestApparentPowerXRegion
+ | Unset = GridInsightsV1LinesGetLatestApparentPowerXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails]:
+ """Get latest apparent power
+
+ This endpoint returns the most recent apparent power for the line.
+
+ Apparent power is derived from the line's latest current and its voltage, and is reported in
+ megavolt-amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ Args:
+ line_id (UUID):
+ x_region (GridInsightsV1LinesGetLatestApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetLatestApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ x_region: GridInsightsV1LinesGetLatestApparentPowerXRegion
+ | Unset = GridInsightsV1LinesGetLatestApparentPowerXRegion.EU,
+) -> Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails | None:
+ """Get latest apparent power
+
+ This endpoint returns the most recent apparent power for the line.
+
+ Apparent power is derived from the line's latest current and its voltage, and is reported in
+ megavolt-amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ Args:
+ line_id (UUID):
+ x_region (GridInsightsV1LinesGetLatestApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetLatestApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ x_region: GridInsightsV1LinesGetLatestApparentPowerXRegion
+ | Unset = GridInsightsV1LinesGetLatestApparentPowerXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails]:
+ """Get latest apparent power
+
+ This endpoint returns the most recent apparent power for the line.
+
+ Apparent power is derived from the line's latest current and its voltage, and is reported in
+ megavolt-amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ Args:
+ line_id (UUID):
+ x_region (GridInsightsV1LinesGetLatestApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetLatestApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ x_region: GridInsightsV1LinesGetLatestApparentPowerXRegion
+ | Unset = GridInsightsV1LinesGetLatestApparentPowerXRegion.EU,
+) -> Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails | None:
+ """Get latest apparent power
+
+ This endpoint returns the most recent apparent power for the line.
+
+ Apparent power is derived from the line's latest current and its voltage, and is reported in
+ megavolt-amperes (MVA), calculated as `S = sqrt(3) * V * I / 1,000,000`.
+
+ The line's operational voltage is used when configured and positive; otherwise the nominal voltage
+ is used.
+
+ Args:
+ line_id (UUID):
+ x_region (GridInsightsV1LinesGetLatestApparentPowerXRegion | Unset): Default:
+ GridInsightsV1LinesGetLatestApparentPowerXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetLatestApparentPowerResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_conductor_temperature.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_conductor_temperature.py
index 5e0e3fb..966b67d 100644
--- a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_conductor_temperature.py
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_conductor_temperature.py
@@ -59,6 +59,11 @@ def _parse_response(
return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
if response.status_code == 401:
response_401 = cast(Any, None)
return response_401
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_current.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_current.py
index cb4a173..6d2ab57 100644
--- a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_current.py
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_current.py
@@ -43,6 +43,11 @@ def _parse_response(
return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
if response.status_code == 401:
response_401 = cast(Any, None)
return response_401
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_icing.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_icing.py
index 4de63ec..02b72bc 100644
--- a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_icing.py
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_icing.py
@@ -9,17 +9,16 @@
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.grid_insights_v1_lines_get_latest_icing_response_200 import GridInsightsV1LinesGetLatestIcingResponse200
-from ...models.grid_insights_v1_lines_get_latest_icing_unit_system import GridInsightsV1LinesGetLatestIcingUnitSystem
from ...models.grid_insights_v1_lines_get_latest_icing_x_region import GridInsightsV1LinesGetLatestIcingXRegion
from ...models.problem_details import ProblemDetails
+from ...models.unit_system import UnitSystem
from ...types import UNSET, Response, Unset
def _get_kwargs(
line_id: UUID,
*,
- unit_system: GridInsightsV1LinesGetLatestIcingUnitSystem
- | Unset = GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC,
+ unit_system: UnitSystem | Unset = UNSET,
since: datetime.datetime | Unset = UNSET,
x_region: GridInsightsV1LinesGetLatestIcingXRegion | Unset = GridInsightsV1LinesGetLatestIcingXRegion.EU,
) -> dict[str, Any]:
@@ -62,6 +61,11 @@ def _parse_response(
return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
if response.status_code == 401:
response_401 = cast(Any, None)
return response_401
@@ -101,8 +105,7 @@ def sync_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- unit_system: GridInsightsV1LinesGetLatestIcingUnitSystem
- | Unset = GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC,
+ unit_system: UnitSystem | Unset = UNSET,
since: datetime.datetime | Unset = UNSET,
x_region: GridInsightsV1LinesGetLatestIcingXRegion | Unset = GridInsightsV1LinesGetLatestIcingXRegion.EU,
) -> Response[Any | GridInsightsV1LinesGetLatestIcingResponse200 | ProblemDetails]:
@@ -134,8 +137,7 @@ def sync_detailed(
Args:
line_id (UUID):
- unit_system (GridInsightsV1LinesGetLatestIcingUnitSystem | Unset): Default:
- GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC.
+ unit_system (UnitSystem | Unset):
since (datetime.datetime | Unset): Example: 2024-07-01 12:00:00.001000+00:00.
x_region (GridInsightsV1LinesGetLatestIcingXRegion | Unset): Default:
GridInsightsV1LinesGetLatestIcingXRegion.EU.
@@ -166,8 +168,7 @@ def sync(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- unit_system: GridInsightsV1LinesGetLatestIcingUnitSystem
- | Unset = GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC,
+ unit_system: UnitSystem | Unset = UNSET,
since: datetime.datetime | Unset = UNSET,
x_region: GridInsightsV1LinesGetLatestIcingXRegion | Unset = GridInsightsV1LinesGetLatestIcingXRegion.EU,
) -> Any | GridInsightsV1LinesGetLatestIcingResponse200 | ProblemDetails | None:
@@ -199,8 +200,7 @@ def sync(
Args:
line_id (UUID):
- unit_system (GridInsightsV1LinesGetLatestIcingUnitSystem | Unset): Default:
- GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC.
+ unit_system (UnitSystem | Unset):
since (datetime.datetime | Unset): Example: 2024-07-01 12:00:00.001000+00:00.
x_region (GridInsightsV1LinesGetLatestIcingXRegion | Unset): Default:
GridInsightsV1LinesGetLatestIcingXRegion.EU.
@@ -226,8 +226,7 @@ async def asyncio_detailed(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- unit_system: GridInsightsV1LinesGetLatestIcingUnitSystem
- | Unset = GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC,
+ unit_system: UnitSystem | Unset = UNSET,
since: datetime.datetime | Unset = UNSET,
x_region: GridInsightsV1LinesGetLatestIcingXRegion | Unset = GridInsightsV1LinesGetLatestIcingXRegion.EU,
) -> Response[Any | GridInsightsV1LinesGetLatestIcingResponse200 | ProblemDetails]:
@@ -259,8 +258,7 @@ async def asyncio_detailed(
Args:
line_id (UUID):
- unit_system (GridInsightsV1LinesGetLatestIcingUnitSystem | Unset): Default:
- GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC.
+ unit_system (UnitSystem | Unset):
since (datetime.datetime | Unset): Example: 2024-07-01 12:00:00.001000+00:00.
x_region (GridInsightsV1LinesGetLatestIcingXRegion | Unset): Default:
GridInsightsV1LinesGetLatestIcingXRegion.EU.
@@ -289,8 +287,7 @@ async def asyncio(
line_id: UUID,
*,
client: AuthenticatedClient | Client,
- unit_system: GridInsightsV1LinesGetLatestIcingUnitSystem
- | Unset = GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC,
+ unit_system: UnitSystem | Unset = UNSET,
since: datetime.datetime | Unset = UNSET,
x_region: GridInsightsV1LinesGetLatestIcingXRegion | Unset = GridInsightsV1LinesGetLatestIcingXRegion.EU,
) -> Any | GridInsightsV1LinesGetLatestIcingResponse200 | ProblemDetails | None:
@@ -322,8 +319,7 @@ async def asyncio(
Args:
line_id (UUID):
- unit_system (GridInsightsV1LinesGetLatestIcingUnitSystem | Unset): Default:
- GridInsightsV1LinesGetLatestIcingUnitSystem.METRIC.
+ unit_system (UnitSystem | Unset):
since (datetime.datetime | Unset): Example: 2024-07-01 12:00:00.001000+00:00.
x_region (GridInsightsV1LinesGetLatestIcingXRegion | Unset): Default:
GridInsightsV1LinesGetLatestIcingXRegion.EU.
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_sag_and_clearance.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_sag_and_clearance.py
index 4d24a26..4ebf789 100644
--- a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_sag_and_clearance.py
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_sag_and_clearance.py
@@ -66,6 +66,11 @@ def _parse_response(
return response_200
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
if response.status_code == 401:
response_401 = cast(Any, None)
return response_401
diff --git a/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_sag_and_clearance.py b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_sag_and_clearance.py
new file mode 100644
index 0000000..298ca76
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_sag_and_clearance.py
@@ -0,0 +1,355 @@
+import datetime
+from http import HTTPStatus
+from typing import Any, cast
+from urllib.parse import quote
+from uuid import UUID
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.grid_insights_v1_lines_get_sag_and_clearance_response_200 import (
+ GridInsightsV1LinesGetSagAndClearanceResponse200,
+)
+from ...models.grid_insights_v1_lines_get_sag_and_clearance_x_region import GridInsightsV1LinesGetSagAndClearanceXRegion
+from ...models.problem_details import ProblemDetails
+from ...models.unit_system import UnitSystem
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ line_id: UUID,
+ *,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetSagAndClearanceXRegion | Unset = GridInsightsV1LinesGetSagAndClearanceXRegion.EU,
+) -> dict[str, Any]:
+ headers: dict[str, Any] = {}
+ if not isinstance(x_region, Unset):
+ headers["x-region"] = str(x_region)
+
+ params: dict[str, Any] = {}
+
+ json_from_timestamp = from_timestamp.isoformat()
+ params["from_timestamp"] = json_from_timestamp
+
+ json_to_timestamp = to_timestamp.isoformat()
+ params["to_timestamp"] = json_to_timestamp
+
+ json_unit_system: str | Unset = UNSET
+ if not isinstance(unit_system, Unset):
+ json_unit_system = unit_system.value
+
+ params["unit_system"] = json_unit_system
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/grid_insights/v1/lines/{line_id}/sag_and_clearance".format(
+ line_id=quote(str(line_id), safe=""),
+ ),
+ "params": params,
+ }
+
+ _kwargs["headers"] = headers
+ return _kwargs
+
+
+def _parse_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails | None:
+ if response.status_code == 200:
+ response_200 = GridInsightsV1LinesGetSagAndClearanceResponse200.from_dict(response.json())
+
+ return response_200
+
+ if response.status_code == 400:
+ response_400 = ProblemDetails.from_dict(response.json())
+
+ return response_400
+
+ if response.status_code == 401:
+ response_401 = cast(Any, None)
+ return response_401
+
+ if response.status_code == 403:
+ response_403 = ProblemDetails.from_dict(response.json())
+
+ return response_403
+
+ if response.status_code == 404:
+ response_404 = cast(Any, None)
+ return response_404
+
+ if response.status_code == 500:
+ response_500 = ProblemDetails.from_dict(response.json())
+
+ return response_500
+
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: AuthenticatedClient | Client, response: httpx.Response
+) -> Response[Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetSagAndClearanceXRegion | Unset = GridInsightsV1LinesGetSagAndClearanceXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails]:
+ """Get sag and clearance
+
+ This endpoint returns sag and clearance data for the line within a specified time range.
+
+ The sag and clearance data is divided into three sections:
+
+ - **`max_sag`**: The span phase with the maximum sag across all span phases on the line over the
+ requested period.
+ - **`min_clearance`**: The span phase with the minimum clearance across all span phases on the line
+ over the requested period. Null if no span phase has clearance data.
+ - **`spans`**: Sag and clearance data grouped by span, with each span listing its span phases and
+ their measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`sag`**: The maximum vertical deflection of the conductor from the straight line between its two
+ support points.
+ - **`clearance`**: The vertical distance between the conductor and the ground or objects below.
+ - **`timestamp`**: Time (UTC) when the sag and clearance measurements were calculated for the span
+ phase. Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no sag and clearance data is available for the entire line within the period, the endpoint
+ returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetSagAndClearanceXRegion | Unset): Default:
+ GridInsightsV1LinesGetSagAndClearanceXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetSagAndClearanceXRegion | Unset = GridInsightsV1LinesGetSagAndClearanceXRegion.EU,
+) -> Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails | None:
+ """Get sag and clearance
+
+ This endpoint returns sag and clearance data for the line within a specified time range.
+
+ The sag and clearance data is divided into three sections:
+
+ - **`max_sag`**: The span phase with the maximum sag across all span phases on the line over the
+ requested period.
+ - **`min_clearance`**: The span phase with the minimum clearance across all span phases on the line
+ over the requested period. Null if no span phase has clearance data.
+ - **`spans`**: Sag and clearance data grouped by span, with each span listing its span phases and
+ their measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`sag`**: The maximum vertical deflection of the conductor from the straight line between its two
+ support points.
+ - **`clearance`**: The vertical distance between the conductor and the ground or objects below.
+ - **`timestamp`**: Time (UTC) when the sag and clearance measurements were calculated for the span
+ phase. Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no sag and clearance data is available for the entire line within the period, the endpoint
+ returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetSagAndClearanceXRegion | Unset): Default:
+ GridInsightsV1LinesGetSagAndClearanceXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails
+ """
+
+ return sync_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ ).parsed
+
+
+async def asyncio_detailed(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetSagAndClearanceXRegion | Unset = GridInsightsV1LinesGetSagAndClearanceXRegion.EU,
+) -> Response[Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails]:
+ """Get sag and clearance
+
+ This endpoint returns sag and clearance data for the line within a specified time range.
+
+ The sag and clearance data is divided into three sections:
+
+ - **`max_sag`**: The span phase with the maximum sag across all span phases on the line over the
+ requested period.
+ - **`min_clearance`**: The span phase with the minimum clearance across all span phases on the line
+ over the requested period. Null if no span phase has clearance data.
+ - **`spans`**: Sag and clearance data grouped by span, with each span listing its span phases and
+ their measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`sag`**: The maximum vertical deflection of the conductor from the straight line between its two
+ support points.
+ - **`clearance`**: The vertical distance between the conductor and the ground or objects below.
+ - **`timestamp`**: Time (UTC) when the sag and clearance measurements were calculated for the span
+ phase. Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no sag and clearance data is available for the entire line within the period, the endpoint
+ returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetSagAndClearanceXRegion | Unset): Default:
+ GridInsightsV1LinesGetSagAndClearanceXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails]
+ """
+
+ kwargs = _get_kwargs(
+ line_id=line_id,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ line_id: UUID,
+ *,
+ client: AuthenticatedClient | Client,
+ from_timestamp: datetime.datetime,
+ to_timestamp: datetime.datetime,
+ unit_system: UnitSystem | Unset = UNSET,
+ x_region: GridInsightsV1LinesGetSagAndClearanceXRegion | Unset = GridInsightsV1LinesGetSagAndClearanceXRegion.EU,
+) -> Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails | None:
+ """Get sag and clearance
+
+ This endpoint returns sag and clearance data for the line within a specified time range.
+
+ The sag and clearance data is divided into three sections:
+
+ - **`max_sag`**: The span phase with the maximum sag across all span phases on the line over the
+ requested period.
+ - **`min_clearance`**: The span phase with the minimum clearance across all span phases on the line
+ over the requested period. Null if no span phase has clearance data.
+ - **`spans`**: Sag and clearance data grouped by span, with each span listing its span phases and
+ their measurements over time.
+
+ Each span phase entry provides the following data:
+ - **`sag`**: The maximum vertical deflection of the conductor from the straight line between its two
+ support points.
+ - **`clearance`**: The vertical distance between the conductor and the ground or objects below.
+ - **`timestamp`**: Time (UTC) when the sag and clearance measurements were calculated for the span
+ phase. Timestamps may differ per conductor due to data availability.
+
+ The period between `from_timestamp` and `to_timestamp` must not exceed 30 days.
+
+ If no sag and clearance data is available for the entire line within the period, the endpoint
+ returns `404 Not Found`.
+
+ Args:
+ line_id (UUID):
+ from_timestamp (datetime.datetime): Example: 2024-07-01 00:00:00+00:00.
+ to_timestamp (datetime.datetime): Example: 2024-07-02 00:00:00+00:00.
+ unit_system (UnitSystem | Unset):
+ x_region (GridInsightsV1LinesGetSagAndClearanceXRegion | Unset): Default:
+ GridInsightsV1LinesGetSagAndClearanceXRegion.EU.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Any | GridInsightsV1LinesGetSagAndClearanceResponse200 | ProblemDetails
+ """
+
+ return (
+ await asyncio_detailed(
+ line_id=line_id,
+ client=client,
+ from_timestamp=from_timestamp,
+ to_timestamp=to_timestamp,
+ unit_system=unit_system,
+ x_region=x_region,
+ )
+ ).parsed
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/__init__.py b/python/heimdall_api_client/grid_insights_api_client/models/__init__.py
index 499063c..39a1c56 100644
--- a/python/heimdall_api_client/grid_insights_api_client/models/__init__.py
+++ b/python/heimdall_api_client/grid_insights_api_client/models/__init__.py
@@ -2,6 +2,24 @@
from .api_response import ApiResponse
from .conductor_temperature_values import ConductorTemperatureValues
+from .grid_insights_v1_lines_get_apparent_power_response_200 import GridInsightsV1LinesGetApparentPowerResponse200
+from .grid_insights_v1_lines_get_apparent_power_x_region import GridInsightsV1LinesGetApparentPowerXRegion
+from .grid_insights_v1_lines_get_conductor_temperatures_response_200 import (
+ GridInsightsV1LinesGetConductorTemperaturesResponse200,
+)
+from .grid_insights_v1_lines_get_conductor_temperatures_x_region import (
+ GridInsightsV1LinesGetConductorTemperaturesXRegion,
+)
+from .grid_insights_v1_lines_get_currents_response_200 import GridInsightsV1LinesGetCurrentsResponse200
+from .grid_insights_v1_lines_get_currents_x_region import GridInsightsV1LinesGetCurrentsXRegion
+from .grid_insights_v1_lines_get_icing_forecast_response_200 import GridInsightsV1LinesGetIcingForecastResponse200
+from .grid_insights_v1_lines_get_icing_forecast_x_region import GridInsightsV1LinesGetIcingForecastXRegion
+from .grid_insights_v1_lines_get_icing_response_200 import GridInsightsV1LinesGetIcingResponse200
+from .grid_insights_v1_lines_get_icing_x_region import GridInsightsV1LinesGetIcingXRegion
+from .grid_insights_v1_lines_get_latest_apparent_power_response_200 import (
+ GridInsightsV1LinesGetLatestApparentPowerResponse200,
+)
+from .grid_insights_v1_lines_get_latest_apparent_power_x_region import GridInsightsV1LinesGetLatestApparentPowerXRegion
from .grid_insights_v1_lines_get_latest_conductor_temperature_response_200 import (
GridInsightsV1LinesGetLatestConductorTemperatureResponse200,
)
@@ -11,7 +29,6 @@
from .grid_insights_v1_lines_get_latest_current_response_200 import GridInsightsV1LinesGetLatestCurrentResponse200
from .grid_insights_v1_lines_get_latest_current_x_region import GridInsightsV1LinesGetLatestCurrentXRegion
from .grid_insights_v1_lines_get_latest_icing_response_200 import GridInsightsV1LinesGetLatestIcingResponse200
-from .grid_insights_v1_lines_get_latest_icing_unit_system import GridInsightsV1LinesGetLatestIcingUnitSystem
from .grid_insights_v1_lines_get_latest_icing_x_region import GridInsightsV1LinesGetLatestIcingXRegion
from .grid_insights_v1_lines_get_latest_sag_and_clearance_response_200 import (
GridInsightsV1LinesGetLatestSagAndClearanceResponse200,
@@ -19,7 +36,12 @@
from .grid_insights_v1_lines_get_latest_sag_and_clearance_x_region import (
GridInsightsV1LinesGetLatestSagAndClearanceXRegion,
)
+from .grid_insights_v1_lines_get_sag_and_clearance_response_200 import GridInsightsV1LinesGetSagAndClearanceResponse200
+from .grid_insights_v1_lines_get_sag_and_clearance_x_region import GridInsightsV1LinesGetSagAndClearanceXRegion
+from .icing_forecast_data_point import IcingForecastDataPoint
+from .icing_forecast_data_point_ice_weight import IcingForecastDataPointIceWeight
from .latest_conductor_temperature import LatestConductorTemperature
+from .latest_line_apparent_power import LatestLineApparentPower
from .latest_line_current import LatestLineCurrent
from .latest_line_icing import LatestLineIcing
from .latest_line_icing_icing import LatestLineIcingIcing
@@ -29,15 +51,33 @@
from .latest_line_sag_and_clearance_sag_and_clearance_min_clearance_type_1 import (
LatestLineSagAndClearanceSagAndClearanceMinClearanceType1,
)
+from .line_apparent_power import LineApparentPower
+from .line_apparent_powers import LineApparentPowers
+from .line_conductor_temperatures import LineConductorTemperatures
from .line_current import LineCurrent
+from .line_currents import LineCurrents
+from .line_icing_forecast import LineIcingForecast
+from .line_icing_forecast_icing import LineIcingForecastIcing
+from .line_icings import LineIcings
+from .line_icings_icing import LineIcingsIcing
+from .line_sag_and_clearances import LineSagAndClearances
+from .line_sag_and_clearances_sag_and_clearance import LineSagAndClearancesSagAndClearance
+from .line_sag_and_clearances_sag_and_clearance_max_sag import LineSagAndClearancesSagAndClearanceMaxSag
+from .line_sag_and_clearances_sag_and_clearance_min_clearance_type_1 import (
+ LineSagAndClearancesSagAndClearanceMinClearanceType1,
+)
from .max_icing import MaxIcing
+from .max_icing_forecast import MaxIcingForecast
+from .max_icing_forecast_ice_weight import MaxIcingForecastIceWeight
from .max_icing_ice_weight import MaxIcingIceWeight
from .max_icing_tension import MaxIcingTension
from .max_icing_tension_percentage_of_break_strength import MaxIcingTensionPercentageOfBreakStrength
from .measurement_result import MeasurementResult
from .problem_details import ProblemDetails
from .span_icing import SpanIcing
+from .span_icing_forecast import SpanIcingForecast
from .span_phase_icing import SpanPhaseIcing
+from .span_phase_icing_forecast import SpanPhaseIcingForecast
from .span_phase_icing_ice_weight import SpanPhaseIcingIceWeight
from .span_phase_icing_tension import SpanPhaseIcingTension
from .span_phase_icing_tension_percentage_of_break_strength import SpanPhaseIcingTensionPercentageOfBreakStrength
@@ -51,16 +91,32 @@
__all__ = (
"ApiResponse",
"ConductorTemperatureValues",
+ "GridInsightsV1LinesGetApparentPowerResponse200",
+ "GridInsightsV1LinesGetApparentPowerXRegion",
+ "GridInsightsV1LinesGetConductorTemperaturesResponse200",
+ "GridInsightsV1LinesGetConductorTemperaturesXRegion",
+ "GridInsightsV1LinesGetCurrentsResponse200",
+ "GridInsightsV1LinesGetCurrentsXRegion",
+ "GridInsightsV1LinesGetIcingForecastResponse200",
+ "GridInsightsV1LinesGetIcingForecastXRegion",
+ "GridInsightsV1LinesGetIcingResponse200",
+ "GridInsightsV1LinesGetIcingXRegion",
+ "GridInsightsV1LinesGetLatestApparentPowerResponse200",
+ "GridInsightsV1LinesGetLatestApparentPowerXRegion",
"GridInsightsV1LinesGetLatestConductorTemperatureResponse200",
"GridInsightsV1LinesGetLatestConductorTemperatureXRegion",
"GridInsightsV1LinesGetLatestCurrentResponse200",
"GridInsightsV1LinesGetLatestCurrentXRegion",
"GridInsightsV1LinesGetLatestIcingResponse200",
- "GridInsightsV1LinesGetLatestIcingUnitSystem",
"GridInsightsV1LinesGetLatestIcingXRegion",
"GridInsightsV1LinesGetLatestSagAndClearanceResponse200",
"GridInsightsV1LinesGetLatestSagAndClearanceXRegion",
+ "GridInsightsV1LinesGetSagAndClearanceResponse200",
+ "GridInsightsV1LinesGetSagAndClearanceXRegion",
+ "IcingForecastDataPoint",
+ "IcingForecastDataPointIceWeight",
"LatestConductorTemperature",
+ "LatestLineApparentPower",
"LatestLineCurrent",
"LatestLineIcing",
"LatestLineIcingIcing",
@@ -68,15 +124,31 @@
"LatestLineSagAndClearanceSagAndClearance",
"LatestLineSagAndClearanceSagAndClearanceMaxSag",
"LatestLineSagAndClearanceSagAndClearanceMinClearanceType1",
+ "LineApparentPower",
+ "LineApparentPowers",
+ "LineConductorTemperatures",
"LineCurrent",
+ "LineCurrents",
+ "LineIcingForecast",
+ "LineIcingForecastIcing",
+ "LineIcings",
+ "LineIcingsIcing",
+ "LineSagAndClearances",
+ "LineSagAndClearancesSagAndClearance",
+ "LineSagAndClearancesSagAndClearanceMaxSag",
+ "LineSagAndClearancesSagAndClearanceMinClearanceType1",
"MaxIcing",
+ "MaxIcingForecast",
+ "MaxIcingForecastIceWeight",
"MaxIcingIceWeight",
"MaxIcingTension",
"MaxIcingTensionPercentageOfBreakStrength",
"MeasurementResult",
"ProblemDetails",
"SpanIcing",
+ "SpanIcingForecast",
"SpanPhaseIcing",
+ "SpanPhaseIcingForecast",
"SpanPhaseIcingIceWeight",
"SpanPhaseIcingTension",
"SpanPhaseIcingTensionPercentageOfBreakStrength",
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_response_200.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_response_200.py
new file mode 100644
index 0000000..0878fcd
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_apparent_powers import LineApparentPowers
+
+
+T = TypeVar("T", bound="GridInsightsV1LinesGetApparentPowerResponse200")
+
+
+@_attrs_define
+class GridInsightsV1LinesGetApparentPowerResponse200:
+ """
+ Attributes:
+ data (LineApparentPowers):
+ """
+
+ data: LineApparentPowers
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_apparent_powers import LineApparentPowers
+
+ d = dict(src_dict)
+ data = LineApparentPowers.from_dict(d.pop("data"))
+
+ grid_insights_v1_lines_get_apparent_power_response_200 = cls(
+ data=data,
+ )
+
+ grid_insights_v1_lines_get_apparent_power_response_200.additional_properties = d
+ return grid_insights_v1_lines_get_apparent_power_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_x_region.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_x_region.py
new file mode 100644
index 0000000..a7945a8
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class GridInsightsV1LinesGetApparentPowerXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_response_200.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_response_200.py
new file mode 100644
index 0000000..f12d400
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_conductor_temperatures import LineConductorTemperatures
+
+
+T = TypeVar("T", bound="GridInsightsV1LinesGetConductorTemperaturesResponse200")
+
+
+@_attrs_define
+class GridInsightsV1LinesGetConductorTemperaturesResponse200:
+ """
+ Attributes:
+ data (LineConductorTemperatures):
+ """
+
+ data: LineConductorTemperatures
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_conductor_temperatures import LineConductorTemperatures
+
+ d = dict(src_dict)
+ data = LineConductorTemperatures.from_dict(d.pop("data"))
+
+ grid_insights_v1_lines_get_conductor_temperatures_response_200 = cls(
+ data=data,
+ )
+
+ grid_insights_v1_lines_get_conductor_temperatures_response_200.additional_properties = d
+ return grid_insights_v1_lines_get_conductor_temperatures_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_x_region.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_x_region.py
new file mode 100644
index 0000000..58cd693
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class GridInsightsV1LinesGetConductorTemperaturesXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_response_200.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_response_200.py
new file mode 100644
index 0000000..c7c4366
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_currents import LineCurrents
+
+
+T = TypeVar("T", bound="GridInsightsV1LinesGetCurrentsResponse200")
+
+
+@_attrs_define
+class GridInsightsV1LinesGetCurrentsResponse200:
+ """
+ Attributes:
+ data (LineCurrents):
+ """
+
+ data: LineCurrents
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_currents import LineCurrents
+
+ d = dict(src_dict)
+ data = LineCurrents.from_dict(d.pop("data"))
+
+ grid_insights_v1_lines_get_currents_response_200 = cls(
+ data=data,
+ )
+
+ grid_insights_v1_lines_get_currents_response_200.additional_properties = d
+ return grid_insights_v1_lines_get_currents_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_x_region.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_x_region.py
new file mode 100644
index 0000000..77ac7c9
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class GridInsightsV1LinesGetCurrentsXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_response_200.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_response_200.py
new file mode 100644
index 0000000..6c820a3
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_icing_forecast import LineIcingForecast
+
+
+T = TypeVar("T", bound="GridInsightsV1LinesGetIcingForecastResponse200")
+
+
+@_attrs_define
+class GridInsightsV1LinesGetIcingForecastResponse200:
+ """
+ Attributes:
+ data (LineIcingForecast):
+ """
+
+ data: LineIcingForecast
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_icing_forecast import LineIcingForecast
+
+ d = dict(src_dict)
+ data = LineIcingForecast.from_dict(d.pop("data"))
+
+ grid_insights_v1_lines_get_icing_forecast_response_200 = cls(
+ data=data,
+ )
+
+ grid_insights_v1_lines_get_icing_forecast_response_200.additional_properties = d
+ return grid_insights_v1_lines_get_icing_forecast_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_x_region.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_x_region.py
new file mode 100644
index 0000000..9b383b4
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class GridInsightsV1LinesGetIcingForecastXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_response_200.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_response_200.py
new file mode 100644
index 0000000..c134c0d
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_icings import LineIcings
+
+
+T = TypeVar("T", bound="GridInsightsV1LinesGetIcingResponse200")
+
+
+@_attrs_define
+class GridInsightsV1LinesGetIcingResponse200:
+ """
+ Attributes:
+ data (LineIcings):
+ """
+
+ data: LineIcings
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_icings import LineIcings
+
+ d = dict(src_dict)
+ data = LineIcings.from_dict(d.pop("data"))
+
+ grid_insights_v1_lines_get_icing_response_200 = cls(
+ data=data,
+ )
+
+ grid_insights_v1_lines_get_icing_response_200.additional_properties = d
+ return grid_insights_v1_lines_get_icing_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_x_region.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_x_region.py
new file mode 100644
index 0000000..5bb536d
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class GridInsightsV1LinesGetIcingXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_response_200.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_response_200.py
new file mode 100644
index 0000000..84faf6c
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.latest_line_apparent_power import LatestLineApparentPower
+
+
+T = TypeVar("T", bound="GridInsightsV1LinesGetLatestApparentPowerResponse200")
+
+
+@_attrs_define
+class GridInsightsV1LinesGetLatestApparentPowerResponse200:
+ """
+ Attributes:
+ data (LatestLineApparentPower):
+ """
+
+ data: LatestLineApparentPower
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.latest_line_apparent_power import LatestLineApparentPower
+
+ d = dict(src_dict)
+ data = LatestLineApparentPower.from_dict(d.pop("data"))
+
+ grid_insights_v1_lines_get_latest_apparent_power_response_200 = cls(
+ data=data,
+ )
+
+ grid_insights_v1_lines_get_latest_apparent_power_response_200.additional_properties = d
+ return grid_insights_v1_lines_get_latest_apparent_power_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_x_region.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_x_region.py
new file mode 100644
index 0000000..ef1a5ba
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class GridInsightsV1LinesGetLatestApparentPowerXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_icing_unit_system.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_icing_unit_system.py
deleted file mode 100644
index ea1af11..0000000
--- a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_icing_unit_system.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from enum import Enum
-
-
-class GridInsightsV1LinesGetLatestIcingUnitSystem(str, Enum):
- IMPERIAL = "imperial"
- METRIC = "metric"
-
- def __str__(self) -> str:
- return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_response_200.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_response_200.py
new file mode 100644
index 0000000..084d6e6
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_response_200.py
@@ -0,0 +1,67 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_sag_and_clearances import LineSagAndClearances
+
+
+T = TypeVar("T", bound="GridInsightsV1LinesGetSagAndClearanceResponse200")
+
+
+@_attrs_define
+class GridInsightsV1LinesGetSagAndClearanceResponse200:
+ """
+ Attributes:
+ data (LineSagAndClearances):
+ """
+
+ data: LineSagAndClearances
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ data = self.data.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "data": data,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_sag_and_clearances import LineSagAndClearances
+
+ d = dict(src_dict)
+ data = LineSagAndClearances.from_dict(d.pop("data"))
+
+ grid_insights_v1_lines_get_sag_and_clearance_response_200 = cls(
+ data=data,
+ )
+
+ grid_insights_v1_lines_get_sag_and_clearance_response_200.additional_properties = d
+ return grid_insights_v1_lines_get_sag_and_clearance_response_200
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_x_region.py b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_x_region.py
new file mode 100644
index 0000000..ea9ef5a
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_x_region.py
@@ -0,0 +1,9 @@
+from enum import Enum
+
+
+class GridInsightsV1LinesGetSagAndClearanceXRegion(str, Enum):
+ EU = "eu"
+ US = "us"
+
+ def __str__(self) -> str:
+ return str(self.value)
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point.py b/python/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point.py
new file mode 100644
index 0000000..3256951
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point.py
@@ -0,0 +1,77 @@
+from __future__ import annotations
+
+import datetime
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+from dateutil.parser import isoparse
+
+if TYPE_CHECKING:
+ from ..models.icing_forecast_data_point_ice_weight import IcingForecastDataPointIceWeight
+
+
+T = TypeVar("T", bound="IcingForecastDataPoint")
+
+
+@_attrs_define
+class IcingForecastDataPoint:
+ """
+ Attributes:
+ timestamp (datetime.datetime): Time (UTC) for this forecast data point. Example: 2024-01-15 08:33:00+00:00.
+ ice_weight (IcingForecastDataPointIceWeight):
+ """
+
+ timestamp: datetime.datetime
+ ice_weight: IcingForecastDataPointIceWeight
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ timestamp = self.timestamp.isoformat()
+
+ ice_weight = self.ice_weight.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "ice_weight": ice_weight,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.icing_forecast_data_point_ice_weight import IcingForecastDataPointIceWeight
+
+ d = dict(src_dict)
+ timestamp = isoparse(d.pop("timestamp"))
+
+ ice_weight = IcingForecastDataPointIceWeight.from_dict(d.pop("ice_weight"))
+
+ icing_forecast_data_point = cls(
+ timestamp=timestamp,
+ ice_weight=ice_weight,
+ )
+
+ icing_forecast_data_point.additional_properties = d
+ return icing_forecast_data_point
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point_ice_weight.py b/python/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point_ice_weight.py
new file mode 100644
index 0000000..0138e82
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point_ice_weight.py
@@ -0,0 +1,69 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+T = TypeVar("T", bound="IcingForecastDataPointIceWeight")
+
+
+@_attrs_define
+class IcingForecastDataPointIceWeight:
+ """
+ Attributes:
+ value (float): The numerical value of the measurement.
+ unit (str): The unit of measurement.
+ """
+
+ value: float
+ unit: str
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ value = self.value
+
+ unit = self.unit
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "value": value,
+ "unit": unit,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ d = dict(src_dict)
+ value = d.pop("value")
+
+ unit = d.pop("unit")
+
+ icing_forecast_data_point_ice_weight = cls(
+ value=value,
+ unit=unit,
+ )
+
+ icing_forecast_data_point_ice_weight.additional_properties = d
+ return icing_forecast_data_point_ice_weight
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/latest_line_apparent_power.py b/python/heimdall_api_client/grid_insights_api_client/models/latest_line_apparent_power.py
new file mode 100644
index 0000000..cf04cf4
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/latest_line_apparent_power.py
@@ -0,0 +1,83 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_apparent_power import LineApparentPower
+
+
+T = TypeVar("T", bound="LatestLineApparentPower")
+
+
+@_attrs_define
+class LatestLineApparentPower:
+ """
+ Attributes:
+ metric (str): What kind of data does this response contain. Example: Apparent power.
+ unit (str): The unit of the value in the response. Example: MVA.
+ apparent_power (LineApparentPower):
+ """
+
+ metric: str
+ unit: str
+ apparent_power: LineApparentPower
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ apparent_power = self.apparent_power.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "apparent_power": apparent_power,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_apparent_power import LineApparentPower
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ apparent_power = LineApparentPower.from_dict(d.pop("apparent_power"))
+
+ latest_line_apparent_power = cls(
+ metric=metric,
+ unit=unit,
+ apparent_power=apparent_power,
+ )
+
+ latest_line_apparent_power.additional_properties = d
+ return latest_line_apparent_power
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/latest_line_icing_icing.py b/python/heimdall_api_client/grid_insights_api_client/models/latest_line_icing_icing.py
index 10d4b27..2cbfeaa 100644
--- a/python/heimdall_api_client/grid_insights_api_client/models/latest_line_icing_icing.py
+++ b/python/heimdall_api_client/grid_insights_api_client/models/latest_line_icing_icing.py
@@ -6,8 +6,6 @@
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-from ..types import UNSET, Unset
-
if TYPE_CHECKING:
from ..models.max_icing import MaxIcing
from ..models.span_icing import SpanIcing
@@ -21,33 +19,30 @@ class LatestLineIcingIcing:
"""Icing measurements for the line organized by spans and span phases.
Attributes:
+ max_ (MaxIcing):
spans (list[SpanIcing]): List of spans on the line with their icing data.
- max_ (MaxIcing | Unset):
"""
+ max_: MaxIcing
spans: list[SpanIcing]
- max_: MaxIcing | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
+ max_ = self.max_.to_dict()
+
spans = []
for spans_item_data in self.spans:
spans_item = spans_item_data.to_dict()
spans.append(spans_item)
- max_: dict[str, Any] | Unset = UNSET
- if not isinstance(self.max_, Unset):
- max_ = self.max_.to_dict()
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "max": max_,
"spans": spans,
}
)
- if max_ is not UNSET:
- field_dict["max"] = max_
return field_dict
@@ -57,6 +52,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.span_icing import SpanIcing
d = dict(src_dict)
+ max_ = MaxIcing.from_dict(d.pop("max"))
+
spans = []
_spans = d.pop("spans")
for spans_item_data in _spans:
@@ -64,16 +61,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
spans.append(spans_item)
- _max_ = d.pop("max", UNSET)
- max_: MaxIcing | Unset
- if isinstance(_max_, Unset):
- max_ = UNSET
- else:
- max_ = MaxIcing.from_dict(_max_)
-
latest_line_icing_icing = cls(
- spans=spans,
max_=max_,
+ spans=spans,
)
latest_line_icing_icing.additional_properties = d
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_apparent_power.py b/python/heimdall_api_client/grid_insights_api_client/models/line_apparent_power.py
new file mode 100644
index 0000000..e465a3e
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_apparent_power.py
@@ -0,0 +1,72 @@
+from __future__ import annotations
+
+import datetime
+from collections.abc import Mapping
+from typing import Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+from dateutil.parser import isoparse
+
+T = TypeVar("T", bound="LineApparentPower")
+
+
+@_attrs_define
+class LineApparentPower:
+ """
+ Attributes:
+ timestamp (datetime.datetime): Time (in UTC) when the underlying current was measured. Example: 2024-07-01
+ 12:00:00.001000+00:00.
+ value (float): The apparent power derived for the line at the given time, in MVA. Example: 156.7.
+ """
+
+ timestamp: datetime.datetime
+ value: float
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ timestamp = self.timestamp.isoformat()
+
+ value = self.value
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "value": value,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ d = dict(src_dict)
+ timestamp = isoparse(d.pop("timestamp"))
+
+ value = d.pop("value")
+
+ line_apparent_power = cls(
+ timestamp=timestamp,
+ value=value,
+ )
+
+ line_apparent_power.additional_properties = d
+ return line_apparent_power
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_apparent_powers.py b/python/heimdall_api_client/grid_insights_api_client/models/line_apparent_powers.py
new file mode 100644
index 0000000..0ab4510
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_apparent_powers.py
@@ -0,0 +1,92 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_apparent_power import LineApparentPower
+
+
+T = TypeVar("T", bound="LineApparentPowers")
+
+
+@_attrs_define
+class LineApparentPowers:
+ """
+ Attributes:
+ metric (str): What kind of data does this response contain. Example: Apparent power.
+ unit (str): The unit of the values in the response. Example: MVA.
+ apparent_powers (list[LineApparentPower]): List of apparent power values within the requested time range. May be
+ empty if no data exists for the period.
+ """
+
+ metric: str
+ unit: str
+ apparent_powers: list[LineApparentPower]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ apparent_powers = []
+ for apparent_powers_item_data in self.apparent_powers:
+ apparent_powers_item = apparent_powers_item_data.to_dict()
+ apparent_powers.append(apparent_powers_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "apparent_powers": apparent_powers,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_apparent_power import LineApparentPower
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ apparent_powers = []
+ _apparent_powers = d.pop("apparent_powers")
+ for apparent_powers_item_data in _apparent_powers:
+ apparent_powers_item = LineApparentPower.from_dict(apparent_powers_item_data)
+
+ apparent_powers.append(apparent_powers_item)
+
+ line_apparent_powers = cls(
+ metric=metric,
+ unit=unit,
+ apparent_powers=apparent_powers,
+ )
+
+ line_apparent_powers.additional_properties = d
+ return line_apparent_powers
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_conductor_temperatures.py b/python/heimdall_api_client/grid_insights_api_client/models/line_conductor_temperatures.py
new file mode 100644
index 0000000..a14823e
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_conductor_temperatures.py
@@ -0,0 +1,92 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.conductor_temperature_values import ConductorTemperatureValues
+
+
+T = TypeVar("T", bound="LineConductorTemperatures")
+
+
+@_attrs_define
+class LineConductorTemperatures:
+ """
+ Attributes:
+ metric (str): What kind of data does this response contain. Example: Conductor temperature.
+ unit (str): The unit of the values in the response. Example: C.
+ conductor_temperatures (list[ConductorTemperatureValues]): List of conductor temperature measurements within the
+ requested time range. May be empty if no data exists for the period.
+ """
+
+ metric: str
+ unit: str
+ conductor_temperatures: list[ConductorTemperatureValues]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ conductor_temperatures = []
+ for conductor_temperatures_item_data in self.conductor_temperatures:
+ conductor_temperatures_item = conductor_temperatures_item_data.to_dict()
+ conductor_temperatures.append(conductor_temperatures_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "conductor_temperatures": conductor_temperatures,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.conductor_temperature_values import ConductorTemperatureValues
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ conductor_temperatures = []
+ _conductor_temperatures = d.pop("conductor_temperatures")
+ for conductor_temperatures_item_data in _conductor_temperatures:
+ conductor_temperatures_item = ConductorTemperatureValues.from_dict(conductor_temperatures_item_data)
+
+ conductor_temperatures.append(conductor_temperatures_item)
+
+ line_conductor_temperatures = cls(
+ metric=metric,
+ unit=unit,
+ conductor_temperatures=conductor_temperatures,
+ )
+
+ line_conductor_temperatures.additional_properties = d
+ return line_conductor_temperatures
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_currents.py b/python/heimdall_api_client/grid_insights_api_client/models/line_currents.py
new file mode 100644
index 0000000..5f4b357
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_currents.py
@@ -0,0 +1,92 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_current import LineCurrent
+
+
+T = TypeVar("T", bound="LineCurrents")
+
+
+@_attrs_define
+class LineCurrents:
+ """
+ Attributes:
+ metric (str): What kind of data does this response contain. Example: Current.
+ unit (str): The unit of the values in the response. Example: Ampere.
+ currents (list[LineCurrent]): List of current measurements within the requested time range. May be empty if no
+ data exists for the period.
+ """
+
+ metric: str
+ unit: str
+ currents: list[LineCurrent]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ currents = []
+ for currents_item_data in self.currents:
+ currents_item = currents_item_data.to_dict()
+ currents.append(currents_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "currents": currents,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_current import LineCurrent
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ currents = []
+ _currents = d.pop("currents")
+ for currents_item_data in _currents:
+ currents_item = LineCurrent.from_dict(currents_item_data)
+
+ currents.append(currents_item)
+
+ line_currents = cls(
+ metric=metric,
+ unit=unit,
+ currents=currents,
+ )
+
+ line_currents.additional_properties = d
+ return line_currents
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast.py b/python/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast.py
new file mode 100644
index 0000000..b362dfe
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast.py
@@ -0,0 +1,83 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_icing_forecast_icing import LineIcingForecastIcing
+
+
+T = TypeVar("T", bound="LineIcingForecast")
+
+
+@_attrs_define
+class LineIcingForecast:
+ """
+ Attributes:
+ metric (str): What kind of data does this response contain. Example: Icing forecast.
+ unit (str): The unit of ice weight measurements. `kg/m` for metric, `lb/ft` for imperial. Example: kg/m.
+ icing (LineIcingForecastIcing): Icing forecast for the line organized by spans and span phases.
+ """
+
+ metric: str
+ unit: str
+ icing: LineIcingForecastIcing
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ icing = self.icing.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "icing": icing,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_icing_forecast_icing import LineIcingForecastIcing
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ icing = LineIcingForecastIcing.from_dict(d.pop("icing"))
+
+ line_icing_forecast = cls(
+ metric=metric,
+ unit=unit,
+ icing=icing,
+ )
+
+ line_icing_forecast.additional_properties = d
+ return line_icing_forecast
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast_icing.py b/python/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast_icing.py
new file mode 100644
index 0000000..dc257e2
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast_icing.py
@@ -0,0 +1,86 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.max_icing_forecast import MaxIcingForecast
+ from ..models.span_icing_forecast import SpanIcingForecast
+
+
+T = TypeVar("T", bound="LineIcingForecastIcing")
+
+
+@_attrs_define
+class LineIcingForecastIcing:
+ """Icing forecast for the line organized by spans and span phases.
+
+ Attributes:
+ max_ (MaxIcingForecast): The peak ice weight across all span phases and all forecast time points.
+ spans (list[SpanIcingForecast]): List of spans on the line with their icing forecast data.
+ """
+
+ max_: MaxIcingForecast
+ spans: list[SpanIcingForecast]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ max_ = self.max_.to_dict()
+
+ spans = []
+ for spans_item_data in self.spans:
+ spans_item = spans_item_data.to_dict()
+ spans.append(spans_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "max": max_,
+ "spans": spans,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.max_icing_forecast import MaxIcingForecast
+ from ..models.span_icing_forecast import SpanIcingForecast
+
+ d = dict(src_dict)
+ max_ = MaxIcingForecast.from_dict(d.pop("max"))
+
+ spans = []
+ _spans = d.pop("spans")
+ for spans_item_data in _spans:
+ spans_item = SpanIcingForecast.from_dict(spans_item_data)
+
+ spans.append(spans_item)
+
+ line_icing_forecast_icing = cls(
+ max_=max_,
+ spans=spans,
+ )
+
+ line_icing_forecast_icing.additional_properties = d
+ return line_icing_forecast_icing
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_icings.py b/python/heimdall_api_client/grid_insights_api_client/models/line_icings.py
new file mode 100644
index 0000000..9223d45
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_icings.py
@@ -0,0 +1,84 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_icings_icing import LineIcingsIcing
+
+
+T = TypeVar("T", bound="LineIcings")
+
+
+@_attrs_define
+class LineIcings:
+ """
+ Attributes:
+ metric (str): What kind of data does this response contain. Example: Icing.
+ unit (str): The unit of the values in the response. Example: Multiple (see measurements).
+ icing (LineIcingsIcing): Icing measurements for the line over the requested time range, organized by spans and
+ span phases.
+ """
+
+ metric: str
+ unit: str
+ icing: LineIcingsIcing
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ icing = self.icing.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "icing": icing,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_icings_icing import LineIcingsIcing
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ icing = LineIcingsIcing.from_dict(d.pop("icing"))
+
+ line_icings = cls(
+ metric=metric,
+ unit=unit,
+ icing=icing,
+ )
+
+ line_icings.additional_properties = d
+ return line_icings
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_icings_icing.py b/python/heimdall_api_client/grid_insights_api_client/models/line_icings_icing.py
new file mode 100644
index 0000000..07149ce
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_icings_icing.py
@@ -0,0 +1,87 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.max_icing import MaxIcing
+ from ..models.span_icing import SpanIcing
+
+
+T = TypeVar("T", bound="LineIcingsIcing")
+
+
+@_attrs_define
+class LineIcingsIcing:
+ """Icing measurements for the line over the requested time range, organized by spans and span phases.
+
+ Attributes:
+ max_ (MaxIcing):
+ spans (list[SpanIcing]): List of spans on the line with their icing data over time. Each span phase may contain
+ multiple entries, one per timestamp within the period.
+ """
+
+ max_: MaxIcing
+ spans: list[SpanIcing]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ max_ = self.max_.to_dict()
+
+ spans = []
+ for spans_item_data in self.spans:
+ spans_item = spans_item_data.to_dict()
+ spans.append(spans_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "max": max_,
+ "spans": spans,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.max_icing import MaxIcing
+ from ..models.span_icing import SpanIcing
+
+ d = dict(src_dict)
+ max_ = MaxIcing.from_dict(d.pop("max"))
+
+ spans = []
+ _spans = d.pop("spans")
+ for spans_item_data in _spans:
+ spans_item = SpanIcing.from_dict(spans_item_data)
+
+ spans.append(spans_item)
+
+ line_icings_icing = cls(
+ max_=max_,
+ spans=spans,
+ )
+
+ line_icings_icing.additional_properties = d
+ return line_icings_icing
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances.py b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances.py
new file mode 100644
index 0000000..f69b938
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances.py
@@ -0,0 +1,85 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.line_sag_and_clearances_sag_and_clearance import LineSagAndClearancesSagAndClearance
+
+
+T = TypeVar("T", bound="LineSagAndClearances")
+
+
+@_attrs_define
+class LineSagAndClearances:
+ """
+ Attributes:
+ metric (str): What kind of data does this response contain. Example: SagAndClearance.
+ unit (str): The unit of the values in the response. Example: Multiple (see measurements).
+ sag_and_clearance (LineSagAndClearancesSagAndClearance): Sag and clearance measurements for the line over the
+ requested time range, including the line-level maximum sag and minimum clearance values, as well as detailed
+ measurements organized by spans and span phases.
+ """
+
+ metric: str
+ unit: str
+ sag_and_clearance: LineSagAndClearancesSagAndClearance
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ metric = self.metric
+
+ unit = self.unit
+
+ sag_and_clearance = self.sag_and_clearance.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "metric": metric,
+ "unit": unit,
+ "sag_and_clearance": sag_and_clearance,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_sag_and_clearances_sag_and_clearance import LineSagAndClearancesSagAndClearance
+
+ d = dict(src_dict)
+ metric = d.pop("metric")
+
+ unit = d.pop("unit")
+
+ sag_and_clearance = LineSagAndClearancesSagAndClearance.from_dict(d.pop("sag_and_clearance"))
+
+ line_sag_and_clearances = cls(
+ metric=metric,
+ unit=unit,
+ sag_and_clearance=sag_and_clearance,
+ )
+
+ line_sag_and_clearances.additional_properties = d
+ return line_sag_and_clearances
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance.py b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance.py
new file mode 100644
index 0000000..df00f28
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance.py
@@ -0,0 +1,133 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar, cast
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+from ..types import UNSET, Unset
+
+if TYPE_CHECKING:
+ from ..models.line_sag_and_clearances_sag_and_clearance_max_sag import LineSagAndClearancesSagAndClearanceMaxSag
+ from ..models.line_sag_and_clearances_sag_and_clearance_min_clearance_type_1 import (
+ LineSagAndClearancesSagAndClearanceMinClearanceType1,
+ )
+ from ..models.span_sag_and_clearance import SpanSagAndClearance
+
+
+T = TypeVar("T", bound="LineSagAndClearancesSagAndClearance")
+
+
+@_attrs_define
+class LineSagAndClearancesSagAndClearance:
+ """Sag and clearance measurements for the line over the requested time range, including the line-level maximum sag and
+ minimum clearance values, as well as detailed measurements organized by spans and span phases.
+
+ Attributes:
+ max_sag (LineSagAndClearancesSagAndClearanceMaxSag): The span phase with the maximum sag across all span phases
+ on the line over the requested period.
+ spans (list[SpanSagAndClearance]): List of spans on the line with their sag and clearance data over time. Each
+ span phase may contain multiple entries, one per timestamp within the period.
+ min_clearance (LineSagAndClearancesSagAndClearanceMinClearanceType1 | None | Unset): The span phase with the
+ minimum clearance across all span phases on the line over the requested period. Null if no span phase has
+ clearance data.
+ """
+
+ max_sag: LineSagAndClearancesSagAndClearanceMaxSag
+ spans: list[SpanSagAndClearance]
+ min_clearance: LineSagAndClearancesSagAndClearanceMinClearanceType1 | None | Unset = UNSET
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ from ..models.line_sag_and_clearances_sag_and_clearance_min_clearance_type_1 import (
+ LineSagAndClearancesSagAndClearanceMinClearanceType1,
+ )
+
+ max_sag = self.max_sag.to_dict()
+
+ spans = []
+ for spans_item_data in self.spans:
+ spans_item = spans_item_data.to_dict()
+ spans.append(spans_item)
+
+ min_clearance: dict[str, Any] | None | Unset
+ if isinstance(self.min_clearance, Unset):
+ min_clearance = UNSET
+ elif isinstance(self.min_clearance, LineSagAndClearancesSagAndClearanceMinClearanceType1):
+ min_clearance = self.min_clearance.to_dict()
+ else:
+ min_clearance = self.min_clearance
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "max_sag": max_sag,
+ "spans": spans,
+ }
+ )
+ if min_clearance is not UNSET:
+ field_dict["min_clearance"] = min_clearance
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.line_sag_and_clearances_sag_and_clearance_max_sag import LineSagAndClearancesSagAndClearanceMaxSag
+ from ..models.line_sag_and_clearances_sag_and_clearance_min_clearance_type_1 import (
+ LineSagAndClearancesSagAndClearanceMinClearanceType1,
+ )
+ from ..models.span_sag_and_clearance import SpanSagAndClearance
+
+ d = dict(src_dict)
+ max_sag = LineSagAndClearancesSagAndClearanceMaxSag.from_dict(d.pop("max_sag"))
+
+ spans = []
+ _spans = d.pop("spans")
+ for spans_item_data in _spans:
+ spans_item = SpanSagAndClearance.from_dict(spans_item_data)
+
+ spans.append(spans_item)
+
+ def _parse_min_clearance(data: object) -> LineSagAndClearancesSagAndClearanceMinClearanceType1 | None | Unset:
+ if data is None:
+ return data
+ if isinstance(data, Unset):
+ return data
+ try:
+ if not isinstance(data, dict):
+ raise TypeError()
+ min_clearance_type_1 = LineSagAndClearancesSagAndClearanceMinClearanceType1.from_dict(data)
+
+ return min_clearance_type_1
+ except (TypeError, ValueError, AttributeError, KeyError):
+ pass
+ return cast(LineSagAndClearancesSagAndClearanceMinClearanceType1 | None | Unset, data)
+
+ min_clearance = _parse_min_clearance(d.pop("min_clearance", UNSET))
+
+ line_sag_and_clearances_sag_and_clearance = cls(
+ max_sag=max_sag,
+ spans=spans,
+ min_clearance=min_clearance,
+ )
+
+ line_sag_and_clearances_sag_and_clearance.additional_properties = d
+ return line_sag_and_clearances_sag_and_clearance
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_max_sag.py b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_max_sag.py
new file mode 100644
index 0000000..72198e6
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_max_sag.py
@@ -0,0 +1,89 @@
+from __future__ import annotations
+
+import datetime
+from collections.abc import Mapping
+from typing import Any, TypeVar
+from uuid import UUID
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+from dateutil.parser import isoparse
+
+T = TypeVar("T", bound="LineSagAndClearancesSagAndClearanceMaxSag")
+
+
+@_attrs_define
+class LineSagAndClearancesSagAndClearanceMaxSag:
+ """The span phase with the maximum sag across all span phases on the line over the requested period.
+
+ Attributes:
+ timestamp (datetime.datetime): Time (in UTC) when the measurement was taken. Example: 2024-07-01 12:00:00+00:00.
+ span_phase_id (UUID): The id of the span phase. Example: 00000000-0000-0000-0000-000000000000.
+ value (float): The numerical value of the measurement.
+ unit (str): The unit of measurement.
+ """
+
+ timestamp: datetime.datetime
+ span_phase_id: UUID
+ value: float
+ unit: str
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ timestamp = self.timestamp.isoformat()
+
+ span_phase_id = str(self.span_phase_id)
+
+ value = self.value
+
+ unit = self.unit
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "span_phase_id": span_phase_id,
+ "value": value,
+ "unit": unit,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ d = dict(src_dict)
+ timestamp = isoparse(d.pop("timestamp"))
+
+ span_phase_id = UUID(d.pop("span_phase_id"))
+
+ value = d.pop("value")
+
+ unit = d.pop("unit")
+
+ line_sag_and_clearances_sag_and_clearance_max_sag = cls(
+ timestamp=timestamp,
+ span_phase_id=span_phase_id,
+ value=value,
+ unit=unit,
+ )
+
+ line_sag_and_clearances_sag_and_clearance_max_sag.additional_properties = d
+ return line_sag_and_clearances_sag_and_clearance_max_sag
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_min_clearance_type_1.py b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_min_clearance_type_1.py
new file mode 100644
index 0000000..ea974f1
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_min_clearance_type_1.py
@@ -0,0 +1,88 @@
+from __future__ import annotations
+
+import datetime
+from collections.abc import Mapping
+from typing import Any, TypeVar
+from uuid import UUID
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+from dateutil.parser import isoparse
+
+T = TypeVar("T", bound="LineSagAndClearancesSagAndClearanceMinClearanceType1")
+
+
+@_attrs_define
+class LineSagAndClearancesSagAndClearanceMinClearanceType1:
+ """
+ Attributes:
+ timestamp (datetime.datetime): Time (in UTC) when the measurement was taken. Example: 2024-07-01 12:00:00+00:00.
+ span_phase_id (UUID): The id of the span phase. Example: 00000000-0000-0000-0000-000000000000.
+ value (float): The numerical value of the measurement.
+ unit (str): The unit of measurement.
+ """
+
+ timestamp: datetime.datetime
+ span_phase_id: UUID
+ value: float
+ unit: str
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ timestamp = self.timestamp.isoformat()
+
+ span_phase_id = str(self.span_phase_id)
+
+ value = self.value
+
+ unit = self.unit
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "span_phase_id": span_phase_id,
+ "value": value,
+ "unit": unit,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ d = dict(src_dict)
+ timestamp = isoparse(d.pop("timestamp"))
+
+ span_phase_id = UUID(d.pop("span_phase_id"))
+
+ value = d.pop("value")
+
+ unit = d.pop("unit")
+
+ line_sag_and_clearances_sag_and_clearance_min_clearance_type_1 = cls(
+ timestamp=timestamp,
+ span_phase_id=span_phase_id,
+ value=value,
+ unit=unit,
+ )
+
+ line_sag_and_clearances_sag_and_clearance_min_clearance_type_1.additional_properties = d
+ return line_sag_and_clearances_sag_and_clearance_min_clearance_type_1
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast.py b/python/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast.py
new file mode 100644
index 0000000..ca808f6
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast.py
@@ -0,0 +1,68 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.max_icing_forecast_ice_weight import MaxIcingForecastIceWeight
+
+
+T = TypeVar("T", bound="MaxIcingForecast")
+
+
+@_attrs_define
+class MaxIcingForecast:
+ """The peak ice weight across all span phases and all forecast time points.
+
+ Attributes:
+ ice_weight (MaxIcingForecastIceWeight):
+ """
+
+ ice_weight: MaxIcingForecastIceWeight
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ ice_weight = self.ice_weight.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "ice_weight": ice_weight,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.max_icing_forecast_ice_weight import MaxIcingForecastIceWeight
+
+ d = dict(src_dict)
+ ice_weight = MaxIcingForecastIceWeight.from_dict(d.pop("ice_weight"))
+
+ max_icing_forecast = cls(
+ ice_weight=ice_weight,
+ )
+
+ max_icing_forecast.additional_properties = d
+ return max_icing_forecast
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast_ice_weight.py b/python/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast_ice_weight.py
new file mode 100644
index 0000000..2741596
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast_ice_weight.py
@@ -0,0 +1,88 @@
+from __future__ import annotations
+
+import datetime
+from collections.abc import Mapping
+from typing import Any, TypeVar
+from uuid import UUID
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+from dateutil.parser import isoparse
+
+T = TypeVar("T", bound="MaxIcingForecastIceWeight")
+
+
+@_attrs_define
+class MaxIcingForecastIceWeight:
+ """
+ Attributes:
+ timestamp (datetime.datetime): Time (in UTC) when the measurement was taken. Example: 2024-07-01 12:00:00+00:00.
+ span_phase_id (UUID): The id of the span phase. Example: 00000000-0000-0000-0000-000000000000.
+ value (float): The numerical value of the measurement.
+ unit (str): The unit of measurement.
+ """
+
+ timestamp: datetime.datetime
+ span_phase_id: UUID
+ value: float
+ unit: str
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ timestamp = self.timestamp.isoformat()
+
+ span_phase_id = str(self.span_phase_id)
+
+ value = self.value
+
+ unit = self.unit
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "timestamp": timestamp,
+ "span_phase_id": span_phase_id,
+ "value": value,
+ "unit": unit,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ d = dict(src_dict)
+ timestamp = isoparse(d.pop("timestamp"))
+
+ span_phase_id = UUID(d.pop("span_phase_id"))
+
+ value = d.pop("value")
+
+ unit = d.pop("unit")
+
+ max_icing_forecast_ice_weight = cls(
+ timestamp=timestamp,
+ span_phase_id=span_phase_id,
+ value=value,
+ unit=unit,
+ )
+
+ max_icing_forecast_ice_weight.additional_properties = d
+ return max_icing_forecast_ice_weight
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/span_icing_forecast.py b/python/heimdall_api_client/grid_insights_api_client/models/span_icing_forecast.py
new file mode 100644
index 0000000..1a7da2f
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/span_icing_forecast.py
@@ -0,0 +1,85 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+from uuid import UUID
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.span_phase_icing_forecast import SpanPhaseIcingForecast
+
+
+T = TypeVar("T", bound="SpanIcingForecast")
+
+
+@_attrs_define
+class SpanIcingForecast:
+ """
+ Attributes:
+ span_id (UUID): The id of the span. Example: 00000000-0000-0000-0000-000000000000.
+ span_phases (list[SpanPhaseIcingForecast]): List of span phases (conductors) within this span with their icing
+ forecast.
+ """
+
+ span_id: UUID
+ span_phases: list[SpanPhaseIcingForecast]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ span_id = str(self.span_id)
+
+ span_phases = []
+ for span_phases_item_data in self.span_phases:
+ span_phases_item = span_phases_item_data.to_dict()
+ span_phases.append(span_phases_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "span_id": span_id,
+ "span_phases": span_phases,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.span_phase_icing_forecast import SpanPhaseIcingForecast
+
+ d = dict(src_dict)
+ span_id = UUID(d.pop("span_id"))
+
+ span_phases = []
+ _span_phases = d.pop("span_phases")
+ for span_phases_item_data in _span_phases:
+ span_phases_item = SpanPhaseIcingForecast.from_dict(span_phases_item_data)
+
+ span_phases.append(span_phases_item)
+
+ span_icing_forecast = cls(
+ span_id=span_id,
+ span_phases=span_phases,
+ )
+
+ span_icing_forecast.additional_properties = d
+ return span_icing_forecast
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/python/heimdall_api_client/grid_insights_api_client/models/span_phase_icing_forecast.py b/python/heimdall_api_client/grid_insights_api_client/models/span_phase_icing_forecast.py
new file mode 100644
index 0000000..833858e
--- /dev/null
+++ b/python/heimdall_api_client/grid_insights_api_client/models/span_phase_icing_forecast.py
@@ -0,0 +1,85 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+from uuid import UUID
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.icing_forecast_data_point import IcingForecastDataPoint
+
+
+T = TypeVar("T", bound="SpanPhaseIcingForecast")
+
+
+@_attrs_define
+class SpanPhaseIcingForecast:
+ """
+ Attributes:
+ span_phase_id (UUID): The id of the span phase. Example: 00000000-0000-0000-0000-000000000000.
+ forecast (list[IcingForecastDataPoint]): Forecasted icing data points for this span phase. Covers 72 hours in
+ 30-minute intervals (144 data points).
+ """
+
+ span_phase_id: UUID
+ forecast: list[IcingForecastDataPoint]
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ span_phase_id = str(self.span_phase_id)
+
+ forecast = []
+ for forecast_item_data in self.forecast:
+ forecast_item = forecast_item_data.to_dict()
+ forecast.append(forecast_item)
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "span_phase_id": span_phase_id,
+ "forecast": forecast,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.icing_forecast_data_point import IcingForecastDataPoint
+
+ d = dict(src_dict)
+ span_phase_id = UUID(d.pop("span_phase_id"))
+
+ forecast = []
+ _forecast = d.pop("forecast")
+ for forecast_item_data in _forecast:
+ forecast_item = IcingForecastDataPoint.from_dict(forecast_item_data)
+
+ forecast.append(forecast_item)
+
+ span_phase_icing_forecast = cls(
+ span_phase_id=span_phase_id,
+ forecast=forecast,
+ )
+
+ span_phase_icing_forecast.additional_properties = d
+ return span_phase_icing_forecast
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties