From a7aec379f7662496ea849c11bb640bc245036ed4 Mon Sep 17 00:00:00 2001 From: Oleg Sych Date: Mon, 23 Sep 2024 15:23:09 -0700 Subject: [PATCH 1/2] Regenerate NodeLoadMetricInformation with double properties --- .../NodeLoadMetricInformationConverter.cs | 24 +++++++++---------- .../Generated/NodeLoadMetricInformation.cs | 16 ++++++------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Microsoft.ServiceFabric.Client.Http/Generated/Serialization/NodeLoadMetricInformationConverter.cs b/src/Microsoft.ServiceFabric.Client.Http/Generated/Serialization/NodeLoadMetricInformationConverter.cs index b5ed998..7ebd022 100644 --- a/src/Microsoft.ServiceFabric.Client.Http/Generated/Serialization/NodeLoadMetricInformationConverter.cs +++ b/src/Microsoft.ServiceFabric.Client.Http/Generated/Serialization/NodeLoadMetricInformationConverter.cs @@ -40,10 +40,10 @@ internal static NodeLoadMetricInformation GetFromJsonProperties(JsonReader reade var isCapacityViolation = default(bool?); var nodeBufferedCapacity = default(string); var nodeRemainingBufferedCapacity = default(string); - var currentNodeLoad = default(int?); - var nodeCapacityRemaining = default(int?); - var bufferedNodeCapacityRemaining = default(int?); - var plannedNodeLoadRemoval = default(int?); + var currentNodeLoad = default(double?); + var nodeCapacityRemaining = default(double?); + var bufferedNodeCapacityRemaining = default(double?); + var plannedNodeLoadRemoval = default(double?); do { @@ -78,19 +78,19 @@ internal static NodeLoadMetricInformation GetFromJsonProperties(JsonReader reade } else if (string.Compare("CurrentNodeLoad", propName, StringComparison.OrdinalIgnoreCase) == 0) { - currentNodeLoad = reader.ReadValueAsInt(); + currentNodeLoad = reader.ReadValueAsDouble(); } else if (string.Compare("NodeCapacityRemaining", propName, StringComparison.OrdinalIgnoreCase) == 0) { - nodeCapacityRemaining = reader.ReadValueAsInt(); + nodeCapacityRemaining = reader.ReadValueAsDouble(); } else if (string.Compare("BufferedNodeCapacityRemaining", propName, StringComparison.OrdinalIgnoreCase) == 0) { - bufferedNodeCapacityRemaining = reader.ReadValueAsInt(); + bufferedNodeCapacityRemaining = reader.ReadValueAsDouble(); } else if (string.Compare("PlannedNodeLoadRemoval", propName, StringComparison.OrdinalIgnoreCase) == 0) { - plannedNodeLoadRemoval = reader.ReadValueAsInt(); + plannedNodeLoadRemoval = reader.ReadValueAsDouble(); } else { @@ -159,22 +159,22 @@ internal static void Serialize(JsonWriter writer, NodeLoadMetricInformation obj) if (obj.CurrentNodeLoad != null) { - writer.WriteProperty(obj.CurrentNodeLoad, "CurrentNodeLoad", JsonWriterExtensions.WriteIntValue); + writer.WriteProperty(obj.CurrentNodeLoad, "CurrentNodeLoad", JsonWriterExtensions.WriteDoubleValue); } if (obj.NodeCapacityRemaining != null) { - writer.WriteProperty(obj.NodeCapacityRemaining, "NodeCapacityRemaining", JsonWriterExtensions.WriteIntValue); + writer.WriteProperty(obj.NodeCapacityRemaining, "NodeCapacityRemaining", JsonWriterExtensions.WriteDoubleValue); } if (obj.BufferedNodeCapacityRemaining != null) { - writer.WriteProperty(obj.BufferedNodeCapacityRemaining, "BufferedNodeCapacityRemaining", JsonWriterExtensions.WriteIntValue); + writer.WriteProperty(obj.BufferedNodeCapacityRemaining, "BufferedNodeCapacityRemaining", JsonWriterExtensions.WriteDoubleValue); } if (obj.PlannedNodeLoadRemoval != null) { - writer.WriteProperty(obj.PlannedNodeLoadRemoval, "PlannedNodeLoadRemoval", JsonWriterExtensions.WriteIntValue); + writer.WriteProperty(obj.PlannedNodeLoadRemoval, "PlannedNodeLoadRemoval", JsonWriterExtensions.WriteDoubleValue); } writer.WriteEndObject(); diff --git a/src/Microsoft.ServiceFabric.Common/Generated/NodeLoadMetricInformation.cs b/src/Microsoft.ServiceFabric.Common/Generated/NodeLoadMetricInformation.cs index bc40e1b..ac64072 100644 --- a/src/Microsoft.ServiceFabric.Common/Generated/NodeLoadMetricInformation.cs +++ b/src/Microsoft.ServiceFabric.Common/Generated/NodeLoadMetricInformation.cs @@ -44,10 +44,10 @@ public NodeLoadMetricInformation( bool? isCapacityViolation = default(bool?), string nodeBufferedCapacity = default(string), string nodeRemainingBufferedCapacity = default(string), - int? currentNodeLoad = default(int?), - int? nodeCapacityRemaining = default(int?), - int? bufferedNodeCapacityRemaining = default(int?), - int? plannedNodeLoadRemoval = default(int?)) + double? currentNodeLoad = default(double?), + double? nodeCapacityRemaining = default(double?), + double? bufferedNodeCapacityRemaining = default(double?), + double? plannedNodeLoadRemoval = default(double?)) { this.Name = name; this.NodeCapacity = nodeCapacity; @@ -103,23 +103,23 @@ public NodeLoadMetricInformation( /// /// Gets current load on the node for this metric. /// - public int? CurrentNodeLoad { get; } + public double? CurrentNodeLoad { get; } /// /// Gets the remaining capacity on the node for the metric. /// - public int? NodeCapacityRemaining { get; } + public double? NodeCapacityRemaining { get; } /// /// Gets the remaining capacity which is not reserved by NodeBufferPercentage for this metric on the node. /// - public int? BufferedNodeCapacityRemaining { get; } + public double? BufferedNodeCapacityRemaining { get; } /// /// Gets this value represents the load of the replicas that are planned to be removed in the future. /// This kind of load is reported for replicas that are currently being moving to other nodes and for replicas that are /// currently being dropped but still use the load on the source node. /// - public int? PlannedNodeLoadRemoval { get; } + public double? PlannedNodeLoadRemoval { get; } } } From adc968cb29b7989c0cb203bfbf612d93e06edb98 Mon Sep 17 00:00:00 2001 From: Oleg Sych Date: Mon, 23 Sep 2024 15:33:53 -0700 Subject: [PATCH 2/2] Increment version 4.12.0 -> 5.0.0 for property type change --- properties/service_fabric_common.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/properties/service_fabric_common.props b/properties/service_fabric_common.props index 3655503..08b0b00 100644 --- a/properties/service_fabric_common.props +++ b/properties/service_fabric_common.props @@ -22,8 +22,8 @@ - 4 - 12 + 5 + 0 0 0