Spaces:
Build error
Build error
File size: 14,470 Bytes
9373c61 5cfe5c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
package com.dalab.policyengine.dto;
import java.time.Instant;
import java.util.List;
import java.util.Map;
/**
* Comprehensive DTO for policy impact analysis response.
* Contains detailed analysis of what assets would be affected by policy changes.
*/
public class PolicyImpactResponseDTO {
/**
* Unique identifier for this impact analysis.
*/
private String analysisId;
/**
* Timestamp when the analysis was performed.
*/
private Instant analyzedAt;
/**
* Type of analysis performed: FULL, QUICK, or TARGETED.
*/
private String analysisType;
/**
* Overall impact summary with key metrics.
*/
private ImpactSummaryDTO summary;
/**
* Detailed breakdown of affected assets by category.
*/
private List<AssetImpactDTO> affectedAssets;
/**
* Performance impact estimates (if requested).
*/
private PerformanceImpactDTO performanceImpact;
/**
* Cost impact analysis (if requested).
*/
private CostImpactDTO costImpact;
/**
* Compliance impact analysis (if requested).
*/
private ComplianceImpactDTO complianceImpact;
/**
* Risk assessment for implementing this policy.
*/
private RiskAssessmentDTO riskAssessment;
/**
* Recommendations for policy implementation.
*/
private List<String> recommendations;
/**
* Analysis execution metadata.
*/
private AnalysisMetadataDTO metadata;
// Constructors
public PolicyImpactResponseDTO() {}
public PolicyImpactResponseDTO(String analysisId, String analysisType) {
this.analysisId = analysisId;
this.analysisType = analysisType;
this.analyzedAt = Instant.now();
}
// Getters and Setters
public String getAnalysisId() {
return analysisId;
}
public void setAnalysisId(String analysisId) {
this.analysisId = analysisId;
}
public Instant getAnalyzedAt() {
return analyzedAt;
}
public void setAnalyzedAt(Instant analyzedAt) {
this.analyzedAt = analyzedAt;
}
public String getAnalysisType() {
return analysisType;
}
public void setAnalysisType(String analysisType) {
this.analysisType = analysisType;
}
public ImpactSummaryDTO getSummary() {
return summary;
}
public void setSummary(ImpactSummaryDTO summary) {
this.summary = summary;
}
public List<AssetImpactDTO> getAffectedAssets() {
return affectedAssets;
}
public void setAffectedAssets(List<AssetImpactDTO> affectedAssets) {
this.affectedAssets = affectedAssets;
}
public PerformanceImpactDTO getPerformanceImpact() {
return performanceImpact;
}
public void setPerformanceImpact(PerformanceImpactDTO performanceImpact) {
this.performanceImpact = performanceImpact;
}
public CostImpactDTO getCostImpact() {
return costImpact;
}
public void setCostImpact(CostImpactDTO costImpact) {
this.costImpact = costImpact;
}
public ComplianceImpactDTO getComplianceImpact() {
return complianceImpact;
}
public void setComplianceImpact(ComplianceImpactDTO complianceImpact) {
this.complianceImpact = complianceImpact;
}
public RiskAssessmentDTO getRiskAssessment() {
return riskAssessment;
}
public void setRiskAssessment(RiskAssessmentDTO riskAssessment) {
this.riskAssessment = riskAssessment;
}
public List<String> getRecommendations() {
return recommendations;
}
public void setRecommendations(List<String> recommendations) {
this.recommendations = recommendations;
}
public AnalysisMetadataDTO getMetadata() {
return metadata;
}
public void setMetadata(AnalysisMetadataDTO metadata) {
this.metadata = metadata;
}
/**
* Overall impact summary with key metrics.
*/
public static class ImpactSummaryDTO {
private Integer totalAssetsAnalyzed;
private Integer totalAssetsAffected;
private Integer highImpactAssets;
private Integer mediumImpactAssets;
private Integer lowImpactAssets;
private String overallRiskLevel; // LOW, MEDIUM, HIGH, CRITICAL
private Double impactPercentage;
// Constructors, getters, and setters
public ImpactSummaryDTO() {}
public Integer getTotalAssetsAnalyzed() { return totalAssetsAnalyzed; }
public void setTotalAssetsAnalyzed(Integer totalAssetsAnalyzed) { this.totalAssetsAnalyzed = totalAssetsAnalyzed; }
public Integer getTotalAssetsAffected() { return totalAssetsAffected; }
public void setTotalAssetsAffected(Integer totalAssetsAffected) { this.totalAssetsAffected = totalAssetsAffected; }
public Integer getHighImpactAssets() { return highImpactAssets; }
public void setHighImpactAssets(Integer highImpactAssets) { this.highImpactAssets = highImpactAssets; }
public Integer getMediumImpactAssets() { return mediumImpactAssets; }
public void setMediumImpactAssets(Integer mediumImpactAssets) { this.mediumImpactAssets = mediumImpactAssets; }
public Integer getLowImpactAssets() { return lowImpactAssets; }
public void setLowImpactAssets(Integer lowImpactAssets) { this.lowImpactAssets = lowImpactAssets; }
public String getOverallRiskLevel() { return overallRiskLevel; }
public void setOverallRiskLevel(String overallRiskLevel) { this.overallRiskLevel = overallRiskLevel; }
public Double getImpactPercentage() { return impactPercentage; }
public void setImpactPercentage(Double impactPercentage) { this.impactPercentage = impactPercentage; }
}
/**
* Individual asset impact details.
*/
public static class AssetImpactDTO {
private String assetId;
private String assetName;
private String assetType;
private String impactLevel; // HIGH, MEDIUM, LOW
private List<String> affectedAttributes;
private List<String> appliedActions;
private String riskAssessment;
private Map<String, Object> impactDetails;
// Constructors, getters, and setters
public AssetImpactDTO() {}
public String getAssetId() { return assetId; }
public void setAssetId(String assetId) { this.assetId = assetId; }
public String getAssetName() { return assetName; }
public void setAssetName(String assetName) { this.assetName = assetName; }
public String getAssetType() { return assetType; }
public void setAssetType(String assetType) { this.assetType = assetType; }
public String getImpactLevel() { return impactLevel; }
public void setImpactLevel(String impactLevel) { this.impactLevel = impactLevel; }
public List<String> getAffectedAttributes() { return affectedAttributes; }
public void setAffectedAttributes(List<String> affectedAttributes) { this.affectedAttributes = affectedAttributes; }
public List<String> getAppliedActions() { return appliedActions; }
public void setAppliedActions(List<String> appliedActions) { this.appliedActions = appliedActions; }
public String getRiskAssessment() { return riskAssessment; }
public void setRiskAssessment(String riskAssessment) { this.riskAssessment = riskAssessment; }
public Map<String, Object> getImpactDetails() { return impactDetails; }
public void setImpactDetails(Map<String, Object> impactDetails) { this.impactDetails = impactDetails; }
}
/**
* Performance impact estimates.
*/
public static class PerformanceImpactDTO {
private Long estimatedProcessingTimeMs;
private Double cpuUtilizationIncrease;
private Double memoryUtilizationIncrease;
private Integer estimatedApiCalls;
private String performanceRiskLevel;
// Constructors, getters, and setters
public PerformanceImpactDTO() {}
public Long getEstimatedProcessingTimeMs() { return estimatedProcessingTimeMs; }
public void setEstimatedProcessingTimeMs(Long estimatedProcessingTimeMs) { this.estimatedProcessingTimeMs = estimatedProcessingTimeMs; }
public Double getCpuUtilizationIncrease() { return cpuUtilizationIncrease; }
public void setCpuUtilizationIncrease(Double cpuUtilizationIncrease) { this.cpuUtilizationIncrease = cpuUtilizationIncrease; }
public Double getMemoryUtilizationIncrease() { return memoryUtilizationIncrease; }
public void setMemoryUtilizationIncrease(Double memoryUtilizationIncrease) { this.memoryUtilizationIncrease = memoryUtilizationIncrease; }
public Integer getEstimatedApiCalls() { return estimatedApiCalls; }
public void setEstimatedApiCalls(Integer estimatedApiCalls) { this.estimatedApiCalls = estimatedApiCalls; }
public String getPerformanceRiskLevel() { return performanceRiskLevel; }
public void setPerformanceRiskLevel(String performanceRiskLevel) { this.performanceRiskLevel = performanceRiskLevel; }
}
/**
* Cost impact analysis.
*/
public static class CostImpactDTO {
private Double estimatedMonthlyCost;
private Double estimatedImplementationCost;
private Double potentialSavings;
private String costRiskLevel;
private Map<String, Double> costBreakdown;
// Constructors, getters, and setters
public CostImpactDTO() {}
public Double getEstimatedMonthlyCost() { return estimatedMonthlyCost; }
public void setEstimatedMonthlyCost(Double estimatedMonthlyCost) { this.estimatedMonthlyCost = estimatedMonthlyCost; }
public Double getEstimatedImplementationCost() { return estimatedImplementationCost; }
public void setEstimatedImplementationCost(Double estimatedImplementationCost) { this.estimatedImplementationCost = estimatedImplementationCost; }
public Double getPotentialSavings() { return potentialSavings; }
public void setPotentialSavings(Double potentialSavings) { this.potentialSavings = potentialSavings; }
public String getCostRiskLevel() { return costRiskLevel; }
public void setCostRiskLevel(String costRiskLevel) { this.costRiskLevel = costRiskLevel; }
public Map<String, Double> getCostBreakdown() { return costBreakdown; }
public void setCostBreakdown(Map<String, Double> costBreakdown) { this.costBreakdown = costBreakdown; }
}
/**
* Compliance impact analysis.
*/
public static class ComplianceImpactDTO {
private Integer conflictingPolicies;
private List<String> complianceFrameworksAffected;
private String complianceRiskLevel;
private List<String> potentialViolations;
// Constructors, getters, and setters
public ComplianceImpactDTO() {}
public Integer getConflictingPolicies() { return conflictingPolicies; }
public void setConflictingPolicies(Integer conflictingPolicies) { this.conflictingPolicies = conflictingPolicies; }
public List<String> getComplianceFrameworksAffected() { return complianceFrameworksAffected; }
public void setComplianceFrameworksAffected(List<String> complianceFrameworksAffected) { this.complianceFrameworksAffected = complianceFrameworksAffected; }
public String getComplianceRiskLevel() { return complianceRiskLevel; }
public void setComplianceRiskLevel(String complianceRiskLevel) { this.complianceRiskLevel = complianceRiskLevel; }
public List<String> getPotentialViolations() { return potentialViolations; }
public void setPotentialViolations(List<String> potentialViolations) { this.potentialViolations = potentialViolations; }
}
/**
* Risk assessment for policy implementation.
*/
public static class RiskAssessmentDTO {
private String overallRiskLevel;
private List<String> identifiedRisks;
private List<String> mitigationStrategies;
private Double riskScore;
// Constructors, getters, and setters
public RiskAssessmentDTO() {}
public String getOverallRiskLevel() { return overallRiskLevel; }
public void setOverallRiskLevel(String overallRiskLevel) { this.overallRiskLevel = overallRiskLevel; }
public List<String> getIdentifiedRisks() { return identifiedRisks; }
public void setIdentifiedRisks(List<String> identifiedRisks) { this.identifiedRisks = identifiedRisks; }
public List<String> getMitigationStrategies() { return mitigationStrategies; }
public void setMitigationStrategies(List<String> mitigationStrategies) { this.mitigationStrategies = mitigationStrategies; }
public Double getRiskScore() { return riskScore; }
public void setRiskScore(Double riskScore) { this.riskScore = riskScore; }
}
/**
* Analysis execution metadata.
*/
public static class AnalysisMetadataDTO {
private Long executionTimeMs;
private String analysisVersion;
private Boolean usesCachedData;
private Instant dataFreshnessTimestamp;
// Constructors, getters, and setters
public AnalysisMetadataDTO() {}
public Long getExecutionTimeMs() { return executionTimeMs; }
public void setExecutionTimeMs(Long executionTimeMs) { this.executionTimeMs = executionTimeMs; }
public String getAnalysisVersion() { return analysisVersion; }
public void setAnalysisVersion(String analysisVersion) { this.analysisVersion = analysisVersion; }
public Boolean getUsesCachedData() { return usesCachedData; }
public void setUsesCachedData(Boolean usesCachedData) { this.usesCachedData = usesCachedData; }
public Instant getDataFreshnessTimestamp() { return dataFreshnessTimestamp; }
public void setDataFreshnessTimestamp(Instant dataFreshnessTimestamp) { this.dataFreshnessTimestamp = dataFreshnessTimestamp; }
}
} |