From 9fd987b52bec91ac6e7a441312d160269b0eb80b Mon Sep 17 00:00:00 2001 From: Phil Bastian Date: Tue, 20 Oct 2026 11:17:19 +0800 Subject: [PATCH 1/2] add report section to contain customer amendments made to licensed endpoint details --- .../Report.cs | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/src/Particular.LicensingComponent.Report/Report.cs b/src/Particular.LicensingComponent.Report/Report.cs index f806bfd..5b5da25 100644 --- a/src/Particular.LicensingComponent.Report/Report.cs +++ b/src/Particular.LicensingComponent.Report/Report.cs @@ -94,6 +94,11 @@ public record Report /// public string[] IgnoredQueues { get; init; } + /// + /// Information, supplied by the customer, containing their suggested changes to the licensed endpoints and queue classifications + /// + public LicenseAmendments? CustomerLicenseAmendments { get; init; } + /// /// Information about the environment, ie ServicePulse version, Audit instances versipns etc /// @@ -212,3 +217,113 @@ public record DailyThroughput public record AuditServicesData(Dictionary Versions, Dictionary Transports) { } + +/// +/// Information, supplied by the customer, containing their suggested changes to the licensed endpoints and queue classifications +/// +public record LicenseAmendments +{ + /// + /// Information about amendments made to endpoints that were previously licensed + /// + public LicensedEndpointAmendment[] Endpoints { get; init; } + + /// + /// A list of names for any endpoints that have been removed since the last license renewal + /// + public string[] RemovedEndpointNames { get; init; } + + /// + /// A list of queues that have been marked as infrastructure since the last license renewal + /// + /// + /// This list should only contain amendments on the last renewal, not the complete list of queues + /// + public QueueIdentity[] InfrastructureQueues { get; init; } + + /// + /// A list of queues that have been marked as excluded since the last license renewal + /// + /// + /// This list should only contain amendments on the last renewal, not the complete list of queues + /// + public QueueIdentity[] ExcludedQueues { get; init; } +} + +/// +/// Minimal information required to uniquely identify a queue within a report +/// +public record QueueIdentity +{ + /// + /// A hash of the queue name to support unique identification of queues across reports without exposing potentially sensitive information. + /// + /// + /// This should be a one-way hash of the unmasked queue name. + /// + public string NameHash { get; init; } + + /// + /// A hash of the scope to support unique identification of queues across reports without exposing potentially sensitive information. + /// + /// + /// This should be a one-way hash of the unmasked scope, if it exists. + /// + public string? ScopeHash { get; init; } +} + +/// +/// Information about amendments made to an endpoints that was previously licensed, or information about a newly created endpoint since the last license renewal +/// +public record LicensedEndpointAmendment +{ + /// + /// What this endpoint was named in the previous license renewal, if it existed then + /// + public string? PreviousName { get; init; } + + /// + /// A hash of the previous endpoint name to support unique identification across reports without exposing potentially sensitive information. + /// + /// + /// This should be a one-way hash of the unmasked endpoint name. + /// + public string? PreviousNameHash { get; init; } + + /// + /// What this endpoint has been named by the user. + /// + /// + /// If no change from last license renewal, this will be the same as PreviousName + /// + public string CurrentName { get; init; } + + /// + /// A hash of the endpoint name to support unique identification across reports without exposing potentially sensitive information. + /// + /// + /// This should be a one-way hash of the unmasked endpoint name. + /// + public string CurrentNameHash { get; init; } + + /// + /// What the classification of this endpoint has been set to by the user + /// + public bool IsSendOnly { get; init; } + + /// + /// Any queues that have been added to this endpoint since the last renewal + /// + /// + /// This list should only contain amendments on the last renewal, not the complete list of queues + /// + public QueueIdentity[] AmendedQueues { get; init; } + + /// + /// Any queues that have been removed from this endpoint since the last renewal + /// + /// + /// This list should only contain amendments on the last renewal, not the complete list of queues + /// + public QueueIdentity[] RemovedQueues { get; init; } +} \ No newline at end of file From c0ef9f1ed0091f49630df99cb3f554361f55d1a1 Mon Sep 17 00:00:00 2001 From: Phil Bastian Date: Tue, 20 Oct 2026 11:25:48 +0800 Subject: [PATCH 2/2] update approval test output --- .../ApiApprovals.Approve.approved.txt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/Particular.LicensingComponent.Report.UnitTests/ApprovalFiles/ApiApprovals.Approve.approved.txt b/src/Particular.LicensingComponent.Report.UnitTests/ApprovalFiles/ApiApprovals.Approve.approved.txt index f8e31b4..1f27286 100644 --- a/src/Particular.LicensingComponent.Report.UnitTests/ApprovalFiles/ApiApprovals.Approve.approved.txt +++ b/src/Particular.LicensingComponent.Report.UnitTests/ApprovalFiles/ApiApprovals.Approve.approved.txt @@ -18,10 +18,35 @@ namespace Particular.LicensingComponent.Report public Particular.LicensingComponent.Report.AuditServicesData AuditServicesData { get; set; } public System.Collections.Generic.Dictionary EnvironmentData { get; set; } } + public class LicenseAmendments : System.IEquatable + { + public LicenseAmendments() { } + public Particular.LicensingComponent.Report.LicensedEndpointAmendment[] Endpoints { get; init; } + public Particular.LicensingComponent.Report.QueueIdentity[] ExcludedQueues { get; init; } + public Particular.LicensingComponent.Report.QueueIdentity[] InfrastructureQueues { get; init; } + public string[] RemovedEndpointNames { get; init; } + } + public class LicensedEndpointAmendment : System.IEquatable + { + public LicensedEndpointAmendment() { } + public Particular.LicensingComponent.Report.QueueIdentity[] AmendedQueues { get; init; } + public string CurrentName { get; init; } + public string CurrentNameHash { get; init; } + public bool IsSendOnly { get; init; } + public string? PreviousName { get; init; } + public string? PreviousNameHash { get; init; } + public Particular.LicensingComponent.Report.QueueIdentity[] RemovedQueues { get; init; } + } public class NoPrivateKeyException : System.Exception { public string ReportId { get; } } + public class QueueIdentity : System.IEquatable + { + public QueueIdentity() { } + public string NameHash { get; init; } + public string? ScopeHash { get; init; } + } public class QueueThroughput : System.IEquatable { public QueueThroughput() { } @@ -41,6 +66,7 @@ namespace Particular.LicensingComponent.Report public class Report : System.IEquatable { public Report() { } + public Particular.LicensingComponent.Report.LicenseAmendments? CustomerLicenseAmendments { get; init; } public string CustomerName { get; init; } public System.DateTimeOffset EndTime { get; init; } public Particular.LicensingComponent.Report.EnvironmentInformation EnvironmentInformation { get; set; }