From 71018e7445c44924351e0bdf5f2e1aecc1b76007 Mon Sep 17 00:00:00 2001 From: Tristan Chuine Date: Thu, 13 Jul 2023 14:16:23 +0200 Subject: [PATCH] Fix DTOs records Signed-off-by: Tristan Chuine add explication for `lombok.config` tmp Signed-off-by: Tristan Chuine tmp tmp --- lombok.config | 4 ++++ .../server/dto/AttributeModification.java | 5 +++-- .../dto/BasicEquipmentModificationInfos.java | 10 ++++------ .../server/dto/BranchCreationInfos.java | 11 ++++------- .../server/dto/BranchModificationInfos.java | 13 +++++-------- .../dto/BranchStatusModificationInfos.java | 11 +++++------ .../modification/server/dto/BuildInfos.java | 6 ++---- .../dto/BusbarConnectionCreationInfos.java | 10 ++++------ .../server/dto/BusbarSectionCreationInfos.java | 12 ++++-------- .../server/dto/CouplingDeviceInfos.java | 10 ++++------ .../server/dto/CurrentLimitsInfos.java | 16 ++++++---------- .../dto/CurrentLimitsModificationInfos.java | 17 ++++++----------- .../dto/CurrentTemporaryLimitCreationInfos.java | 9 +++++---- .../CurrentTemporaryLimitModificationInfos.java | 8 +++++--- .../server/dto/DeleteAttachingLineInfos.java | 9 ++------- .../dto/DeleteVoltageLevelOnLineInfos.java | 9 ++++----- .../EquipmentAttributeModificationInfos.java | 14 ++++++-------- .../server/dto/EquipmentCreationInfos.java | 10 ++++------ .../server/dto/EquipmentDeletionInfos.java | 10 ++++------ .../server/dto/EquipmentModificationInfos.java | 14 +++++--------- .../server/dto/FilterEquipments.java | 6 ++---- .../modification/server/dto/FilterInfos.java | 13 ++++++------- .../server/dto/GenerationDispatchInfos.java | 8 ++++---- .../server/dto/GeneratorCreationInfos.java | 13 ++++++------- .../server/dto/GeneratorModificationInfos.java | 8 +++----- .../server/dto/GeneratorScalingInfos.java | 8 ++------ .../server/dto/GeneratorsFilterInfos.java | 11 ++++------- .../dto/GeneratorsFrequencyReserveInfos.java | 10 ++++------ .../dto/GeneratorsWithoutOutageInfos.java | 11 ++++------- .../server/dto/GroovyScriptInfos.java | 12 +++++------- .../server/dto/IdentifiableAttributes.java | 7 ++----- .../server/dto/InjectionCreationInfos.java | 10 ++++------ .../server/dto/InjectionModificationInfos.java | 10 ++++------ .../dto/LineAttachToVoltageLevelInfos.java | 9 ++++----- .../server/dto/LineCreationInfos.java | 12 ++++-------- .../server/dto/LineModificationInfos.java | 12 ++++-------- .../dto/LineSplitWithVoltageLevelInfos.java | 9 ++++----- .../dto/LinesAttachToSplitLinesInfos.java | 9 ++++----- .../server/dto/LoadCreationInfos.java | 11 ++++------- .../server/dto/LoadModificationInfos.java | 12 +++++------- .../server/dto/LoadScalingInfos.java | 9 ++------- .../server/dto/ModificationInfos.java | 10 ++++------ .../modification/server/dto/NetworkInfos.java | 6 ++++-- .../server/dto/NetworkModificationResult.java | 4 ++++ .../dto/PhaseTapChangerCreationInfos.java | 10 +++++----- .../dto/RatioTapChangerCreationInfos.java | 10 +++++----- .../ReactiveCapabilityCurveCreationInfos.java | 11 ++++------- ...eactiveCapabilityCurveModificationInfos.java | 11 ++++------- .../modification/server/dto/ReportInfos.java | 6 ++++-- .../modification/server/dto/ScalingInfos.java | 10 ++++------ .../server/dto/ScalingVariationInfos.java | 14 ++++++-------- .../dto/ShuntCompensatorCreationInfos.java | 11 ++++------- .../dto/ShuntCompensatorModificationInfos.java | 10 ++++------ .../server/dto/SubstationCreationInfos.java | 12 ++++-------- .../server/dto/SubstationFreePropertyInfos.java | 15 +++++++++------ .../server/dto/SubstationModificationInfos.java | 10 ++++------ .../server/dto/TapChangerCreationInfos.java | 11 ++++------- .../server/dto/TapChangerStepCreationInfos.java | 10 +++++----- .../TwoWindingsTransformerCreationInfos.java | 12 ++++-------- ...TwoWindingsTransformerModificationInfos.java | 11 ++++------- .../server/dto/VoltageLevelCreationInfos.java | 11 ++++------- .../server/dto/VoltageLevelInfos.java | 14 ++++++-------- .../dto/VoltageLevelModificationInfos.java | 9 ++++----- .../server/dto/catalog/AerialLineTypeInfos.java | 10 ++++------ .../server/dto/catalog/LineTypeInfos.java | 17 +++++++++-------- .../dto/catalog/UndergroundLineTypeInfos.java | 10 ++++------ .../dto/elasticsearch/BasicEquipmentInfos.java | 12 +++++++----- .../dto/elasticsearch/EquipmentInfos.java | 10 +++++----- .../elasticsearch/TombstonedEquipmentInfos.java | 8 +++----- 69 files changed, 299 insertions(+), 414 deletions(-) diff --git a/lombok.config b/lombok.config index 4fa82504b..f0c932503 100644 --- a/lombok.config +++ b/lombok.config @@ -1 +1,5 @@ import target/configs/powsybl-build-tools.jar!powsybl-build-tools/lombok.config + +# We resolve compilation warnings +lombok.equalsandhashcode.callsuper = CALL +lombok.tostring.callsuper = CALL diff --git a/src/main/java/org/gridsuite/modification/server/dto/AttributeModification.java b/src/main/java/org/gridsuite/modification/server/dto/AttributeModification.java index fc1c33c69..b047dfb06 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/AttributeModification.java +++ b/src/main/java/org/gridsuite/modification/server/dto/AttributeModification.java @@ -7,7 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.entities.equipment.modification.attribute.IAttributeModificationEmbeddable; @@ -20,7 +22,6 @@ @NoArgsConstructor @AllArgsConstructor @Data -@ToString(callSuper = true) @Schema(description = "Attribute modification") public class AttributeModification { private T value; diff --git a/src/main/java/org/gridsuite/modification/server/dto/BasicEquipmentModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/BasicEquipmentModificationInfos.java index 42027d3aa..df6b33d7e 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/BasicEquipmentModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/BasicEquipmentModificationInfos.java @@ -7,10 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -18,9 +17,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Basic equipment modification") public class BasicEquipmentModificationInfos extends EquipmentModificationInfos { @Schema(description = "Equipment name modification") diff --git a/src/main/java/org/gridsuite/modification/server/dto/BranchCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/BranchCreationInfos.java index c9d66f46e..177af0660 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/BranchCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/BranchCreationInfos.java @@ -8,10 +8,9 @@ import com.powsybl.iidm.network.extensions.ConnectablePosition; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -19,12 +18,10 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Branch creation") public class BranchCreationInfos extends EquipmentCreationInfos { - @Schema(description = "Series resistance") private double seriesResistance; diff --git a/src/main/java/org/gridsuite/modification/server/dto/BranchModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/BranchModificationInfos.java index 35a5e1244..8212f26c6 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/BranchModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/BranchModificationInfos.java @@ -5,11 +5,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package org.gridsuite.modification.server.dto; + import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -17,12 +17,10 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Branch creation") public class BranchModificationInfos extends BasicEquipmentModificationInfos { - @Schema(description = "Series resistance") private AttributeModification seriesResistance; @@ -34,5 +32,4 @@ public class BranchModificationInfos extends BasicEquipmentModificationInfos { @Schema(description = "Current limits Side 2") private CurrentLimitsModificationInfos currentLimits2; - } diff --git a/src/main/java/org/gridsuite/modification/server/dto/BranchStatusModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/BranchStatusModificationInfos.java index cd5ceb9a4..2eda1a767 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/BranchStatusModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/BranchStatusModificationInfos.java @@ -10,16 +10,16 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.NetworkModificationException; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.BranchStatusModificationEntity; import org.gridsuite.modification.server.modifications.AbstractModification; import org.gridsuite.modification.server.modifications.BranchStatusModification; + import static org.gridsuite.modification.server.NetworkModificationException.Type.BRANCH_ACTION_TYPE_EMPTY; /** @@ -27,9 +27,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Branch status modification") @JsonTypeName("BRANCH_STATUS_MODIFICATION") @ModificationErrorTypeName("BRANCH_ACTION_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/BuildInfos.java b/src/main/java/org/gridsuite/modification/server/dto/BuildInfos.java index 285b3ec6c..38f05cd97 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/BuildInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/BuildInfos.java @@ -8,9 +8,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; import java.util.ArrayList; import java.util.HashSet; @@ -23,8 +22,7 @@ */ @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Build infos") public class BuildInfos { private String originVariantId; diff --git a/src/main/java/org/gridsuite/modification/server/dto/BusbarConnectionCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/BusbarConnectionCreationInfos.java index 89721e18c..4ac5b1e44 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/BusbarConnectionCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/BusbarConnectionCreationInfos.java @@ -9,19 +9,17 @@ import com.powsybl.iidm.network.SwitchKind; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; /** * @author Laurent GARNIER */ -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Voltage level bus bar sections connection creation") public class BusbarConnectionCreationInfos { @Schema(description = "one side of the connection") diff --git a/src/main/java/org/gridsuite/modification/server/dto/BusbarSectionCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/BusbarSectionCreationInfos.java index 7a0ffada6..453e714ac 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/BusbarSectionCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/BusbarSectionCreationInfos.java @@ -8,21 +8,17 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.SuperBuilder; /** * @author Laurent GARNIER */ -@ToString(callSuper = true) -@SuperBuilder +@Data +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter @Schema(description = "Voltage level bus bar section creation") public class BusbarSectionCreationInfos { @Schema(description = "bus bar section id") diff --git a/src/main/java/org/gridsuite/modification/server/dto/CouplingDeviceInfos.java b/src/main/java/org/gridsuite/modification/server/dto/CouplingDeviceInfos.java index a609d0346..c8fb74d68 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/CouplingDeviceInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/CouplingDeviceInfos.java @@ -8,19 +8,17 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; /** * @author Ayoub LABIDI */ -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Coupling device creation") public class CouplingDeviceInfos { @Schema(description = "bus bar section 1 id") diff --git a/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsInfos.java b/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsInfos.java index 8f5450529..284ff2eec 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsInfos.java @@ -7,11 +7,10 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.entities.equipment.creation.CurrentLimitsEntity; import org.gridsuite.modification.server.entities.equipment.creation.CurrentTemporaryLimitCreationEmbeddable; @@ -20,15 +19,12 @@ /** * @author Sylvain Bouzols */ - -@SuperBuilder +@Builder @NoArgsConstructor -@Getter -@Setter -@ToString +@AllArgsConstructor +@Data @Schema(description = "Current Limits") public class CurrentLimitsInfos { - @Schema(description = "Permanent current limit") private Double permanentLimit; diff --git a/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsModificationInfos.java index a94379ee0..a75422220 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/CurrentLimitsModificationInfos.java @@ -7,12 +7,10 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.SuperBuilder; - import org.gridsuite.modification.server.entities.equipment.modification.CurrentLimitsModificationEntity; import org.gridsuite.modification.server.entities.equipment.modification.CurrentTemporaryLimitModificationEmbeddable; @@ -21,15 +19,12 @@ /** * @author Ayoub LABIDI */ - -@SuperBuilder +@Builder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Current Limits") public class CurrentLimitsModificationInfos { - @Schema(description = "Permanent current limit") private Double permanentLimit; diff --git a/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitCreationInfos.java index 85bceaef9..02e6a33af 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitCreationInfos.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * @author David Braquart @@ -16,11 +19,9 @@ @Builder @AllArgsConstructor @NoArgsConstructor -@Getter -@ToString +@Data @JsonInclude(JsonInclude.Include.NON_NULL) public class CurrentTemporaryLimitCreationInfos { - @Schema(description = "name") private String name; diff --git a/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitModificationInfos.java index 0427b288c..a77facc90 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/CurrentTemporaryLimitModificationInfos.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * @author Ayoub LABIDI @@ -16,10 +19,9 @@ @Builder @AllArgsConstructor @NoArgsConstructor -@Getter +@Data @JsonInclude(JsonInclude.Include.NON_NULL) public class CurrentTemporaryLimitModificationInfos { - @Schema(description = "name") private String name; diff --git a/src/main/java/org/gridsuite/modification/server/dto/DeleteAttachingLineInfos.java b/src/main/java/org/gridsuite/modification/server/dto/DeleteAttachingLineInfos.java index ea076baf2..4b6dfecda 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/DeleteAttachingLineInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/DeleteAttachingLineInfos.java @@ -11,10 +11,8 @@ import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.DeleteAttachingLineEntity; @@ -27,14 +25,11 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@Data @Schema(description = "Delete attaching line infos") @JsonTypeName("DELETE_ATTACHING_LINE") @ModificationErrorTypeName("DELETE_ATTACHING_LINE_ERROR") public class DeleteAttachingLineInfos extends ModificationInfos { - @Schema(description = "line 1 id") private String lineToAttachTo1Id; diff --git a/src/main/java/org/gridsuite/modification/server/dto/DeleteVoltageLevelOnLineInfos.java b/src/main/java/org/gridsuite/modification/server/dto/DeleteVoltageLevelOnLineInfos.java index 8d2fad146..bebb35649 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/DeleteVoltageLevelOnLineInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/DeleteVoltageLevelOnLineInfos.java @@ -10,7 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.DeleteVoltageLevelOnLineEntity; @@ -24,14 +26,11 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@Data @Schema(description = "Delete voltage level on line infos") @JsonTypeName("DELETE_VOLTAGE_LEVEL_ON_LINE") @ModificationErrorTypeName("DELETE_VOLTAGE_LEVEL_ON_LINE_ERROR") public class DeleteVoltageLevelOnLineInfos extends ModificationInfos { - @Schema(description = "line 1 id") private String lineToAttachTo1Id; diff --git a/src/main/java/org/gridsuite/modification/server/dto/EquipmentAttributeModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/EquipmentAttributeModificationInfos.java index 2c8b33a69..6a28088a9 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/EquipmentAttributeModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/EquipmentAttributeModificationInfos.java @@ -13,12 +13,10 @@ import com.powsybl.commons.reporter.TypedValue; import com.powsybl.iidm.network.IdentifiableType; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; - import org.gridsuite.modification.server.NetworkModificationException; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.attribute.*; @@ -29,16 +27,16 @@ import java.util.Map; import java.util.Set; -import static org.gridsuite.modification.server.NetworkModificationException.Type.*; +import static org.gridsuite.modification.server.NetworkModificationException.Type.EQUIPMENT_ATTRIBUTE_NAME_ERROR; +import static org.gridsuite.modification.server.NetworkModificationException.Type.EQUIPMENT_ATTRIBUTE_VALUE_ERROR; /** * @author Franck Lecuyer */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Equipment attribute modification") @JsonTypeName("EQUIPMENT_ATTRIBUTE_MODIFICATION") @ModificationErrorTypeName("MODIFICATION_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/EquipmentCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/EquipmentCreationInfos.java index 3504eabdb..fe0d0e22a 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/EquipmentCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/EquipmentCreationInfos.java @@ -7,10 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -18,9 +17,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Equipment creation") public class EquipmentCreationInfos extends EquipmentModificationInfos { @Schema(description = "Equipment name") diff --git a/src/main/java/org/gridsuite/modification/server/dto/EquipmentDeletionInfos.java b/src/main/java/org/gridsuite/modification/server/dto/EquipmentDeletionInfos.java index f6fdec72d..6027915d3 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/EquipmentDeletionInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/EquipmentDeletionInfos.java @@ -14,10 +14,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -25,9 +24,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Equipment deletion") @JsonTypeName("EQUIPMENT_DELETION") @ModificationErrorTypeName("DELETE_EQUIPMENT_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/EquipmentModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/EquipmentModificationInfos.java index d8e2e84f3..65e20f7e6 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/EquipmentModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/EquipmentModificationInfos.java @@ -6,14 +6,12 @@ */ package org.gridsuite.modification.server.dto; -import org.springframework.lang.NonNull; - import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.springframework.lang.NonNull; /** * @author Slimane Amar @@ -21,11 +19,9 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Equipment modification") - public class EquipmentModificationInfos extends ModificationInfos { @Schema(description = "Equipment ID") @NonNull diff --git a/src/main/java/org/gridsuite/modification/server/dto/FilterEquipments.java b/src/main/java/org/gridsuite/modification/server/dto/FilterEquipments.java index 6003152ed..ed160864b 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/FilterEquipments.java +++ b/src/main/java/org/gridsuite/modification/server/dto/FilterEquipments.java @@ -9,9 +9,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.Getter; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; import java.util.List; import java.util.UUID; @@ -19,8 +18,7 @@ /** * @author bendaamerahm */ -@Getter -@Setter +@Data @NoArgsConstructor @AllArgsConstructor @Builder diff --git a/src/main/java/org/gridsuite/modification/server/dto/FilterInfos.java b/src/main/java/org/gridsuite/modification/server/dto/FilterInfos.java index 5515d3835..e680bfa89 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/FilterInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/FilterInfos.java @@ -7,8 +7,10 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.experimental.SuperBuilder; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; import org.gridsuite.modification.server.entities.equipment.modification.VariationFilterEntity; import java.util.UUID; @@ -16,15 +18,12 @@ /** * @author bendaamerahm */ -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter -@ToString +@Data @Schema(description = "Filter Infos") public class FilterInfos { - @Schema(description = "id of filter") private UUID id; diff --git a/src/main/java/org/gridsuite/modification/server/dto/GenerationDispatchInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GenerationDispatchInfos.java index 221f6b682..990753c15 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GenerationDispatchInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GenerationDispatchInfos.java @@ -11,9 +11,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.GenerationDispatchEntity; @@ -27,8 +27,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter +@AllArgsConstructor +@Data @Schema(description = "Generation dispatch creation") @JsonTypeName("GENERATION_DISPATCH") @ModificationErrorTypeName("GENERATION_DISPATCH_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/GeneratorCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GeneratorCreationInfos.java index 713022e92..968dceed3 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GeneratorCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GeneratorCreationInfos.java @@ -13,10 +13,9 @@ import com.powsybl.iidm.network.EnergySource; import com.powsybl.iidm.network.extensions.ConnectablePosition; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import java.util.List; @@ -26,15 +25,15 @@ import org.gridsuite.modification.server.modifications.AbstractModification; import org.gridsuite.modification.server.modifications.GeneratorCreation; +import java.util.List; + /** * @author Franck Lecuyer */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Generator creation") @JsonTypeName("GENERATOR_CREATION") @ModificationErrorTypeName("CREATE_GENERATOR_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/GeneratorModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GeneratorModificationInfos.java index fda157cf2..284759cf5 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GeneratorModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GeneratorModificationInfos.java @@ -8,30 +8,28 @@ import java.util.List; -import com.fasterxml.jackson.annotation.JsonTypeName; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.GeneratorModificationEntity; import org.gridsuite.modification.server.modifications.AbstractModification; import org.gridsuite.modification.server.modifications.GeneratorModification; - import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import com.powsybl.iidm.network.EnergySource; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** * @author Jacques Borsenberger */ - @SuperBuilder @NoArgsConstructor +@AllArgsConstructor @Data -@ToString(callSuper = true) @Schema(description = "generator modification") @JsonTypeName("GENERATOR_MODIFICATION") @ModificationErrorTypeName("MODIFY_GENERATOR_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/GeneratorScalingInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GeneratorScalingInfos.java index b43178186..5f8b465fe 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GeneratorScalingInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GeneratorScalingInfos.java @@ -11,9 +11,8 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.GeneratorScalingEntity; @@ -23,16 +22,13 @@ /** * @author Seddik Yengui */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter +@Data @JsonTypeName("GENERATOR_SCALING") @ModificationErrorTypeName("GENERATOR_SCALING_ERROR") @Schema(description = "Generator scaling creation") public class GeneratorScalingInfos extends ScalingInfos { - @Override public GeneratorScalingEntity toEntity() { return new GeneratorScalingEntity(this); diff --git a/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFilterInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFilterInfos.java index e2f5aa76d..a9f22651e 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFilterInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFilterInfos.java @@ -8,24 +8,21 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; import java.util.UUID; /** * @author Franck Lecuyer */ -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Generators filter Infos") public class GeneratorsFilterInfos { - @Schema(description = "id of generators filter") private UUID id; diff --git a/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFrequencyReserveInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFrequencyReserveInfos.java index 9ab735a71..235c67dde 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFrequencyReserveInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GeneratorsFrequencyReserveInfos.java @@ -8,21 +8,19 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; import java.util.List; /** * @author Franck Lecuyer */ -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Generators frequency reserve infos") public class GeneratorsFrequencyReserveInfos { @Schema(description = "generators filters") diff --git a/src/main/java/org/gridsuite/modification/server/dto/GeneratorsWithoutOutageInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GeneratorsWithoutOutageInfos.java index 9ed316cf8..bd810a8e7 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GeneratorsWithoutOutageInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GeneratorsWithoutOutageInfos.java @@ -8,24 +8,21 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; import java.util.UUID; /** * @author Franck Lecuyer */ -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Filter Infos") public class GeneratorsWithoutOutageInfos { - @Schema(description = "id of generators filter") private UUID id; diff --git a/src/main/java/org/gridsuite/modification/server/dto/GroovyScriptInfos.java b/src/main/java/org/gridsuite/modification/server/dto/GroovyScriptInfos.java index 234e731c0..6c036f1a2 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/GroovyScriptInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/GroovyScriptInfos.java @@ -6,18 +6,17 @@ */ package org.gridsuite.modification.server.dto; -import com.fasterxml.jackson.annotation.JsonTypeName; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.GroovyScriptEntity; import org.gridsuite.modification.server.modifications.AbstractModification; import org.gridsuite.modification.server.modifications.GroovyScript; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -25,9 +24,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Groovy script modification") @JsonTypeName("GROOVY_SCRIPT") @ModificationErrorTypeName("GROOVY_SCRIPT_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/IdentifiableAttributes.java b/src/main/java/org/gridsuite/modification/server/dto/IdentifiableAttributes.java index a9fe14311..3d96a6357 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/IdentifiableAttributes.java +++ b/src/main/java/org/gridsuite/modification/server/dto/IdentifiableAttributes.java @@ -10,18 +10,15 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.Getter; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -@Getter -@Setter +@Data @NoArgsConstructor @AllArgsConstructor @Builder @Schema(description = "Identifiable attributes") public class IdentifiableAttributes { - @Schema(description = "identifiable id") private String id; diff --git a/src/main/java/org/gridsuite/modification/server/dto/InjectionCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/InjectionCreationInfos.java index 731673b54..5e54f372b 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/InjectionCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/InjectionCreationInfos.java @@ -7,10 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -18,9 +17,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Injection creation") public class InjectionCreationInfos extends EquipmentCreationInfos { @Schema(description = "Voltage level id") diff --git a/src/main/java/org/gridsuite/modification/server/dto/InjectionModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/InjectionModificationInfos.java index 57fe83649..085e79f19 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/InjectionModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/InjectionModificationInfos.java @@ -7,10 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; /** @@ -18,9 +17,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Injection modification") public class InjectionModificationInfos extends BasicEquipmentModificationInfos { @Schema(description = "Voltage level id modification") diff --git a/src/main/java/org/gridsuite/modification/server/dto/LineAttachToVoltageLevelInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LineAttachToVoltageLevelInfos.java index 53301c50a..1af112ed0 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LineAttachToVoltageLevelInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LineAttachToVoltageLevelInfos.java @@ -10,7 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.LineAttachToVoltageLevelEntity; @@ -23,14 +25,11 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@Data @Schema(description = "Line attach to voltage level") @JsonTypeName("LINE_ATTACH_TO_VOLTAGE_LEVEL") @ModificationErrorTypeName("LINE_ATTACH_ERROR") public class LineAttachToVoltageLevelInfos extends ModificationInfos { - @Schema(description = "line to attach to ID") private String lineToAttachToId; diff --git a/src/main/java/org/gridsuite/modification/server/dto/LineCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LineCreationInfos.java index 28307c5cb..c1e7af685 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LineCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LineCreationInfos.java @@ -10,10 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.creation.LineCreationEntity; @@ -23,17 +22,14 @@ /** * @author Sylvain Bouzols */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Line creation") @JsonTypeName("LINE_CREATION") @ModificationErrorTypeName("CREATE_LINE_ERROR") public class LineCreationInfos extends BranchCreationInfos { - @Schema(description = "Shunt conductance Side 1") private Double shuntConductance1; diff --git a/src/main/java/org/gridsuite/modification/server/dto/LineModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LineModificationInfos.java index 7fb079f82..4a6503404 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LineModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LineModificationInfos.java @@ -10,10 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.LineModificationEntity; @@ -23,17 +22,14 @@ /** * @author Ayoub LABIDI */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Line modification") @JsonTypeName("LINE_MODIFICATION") @ModificationErrorTypeName("MODIFY_LINE_ERROR") public class LineModificationInfos extends BranchModificationInfos { - @Schema(description = "Shunt conductance Side 1") private AttributeModification shuntConductance1; diff --git a/src/main/java/org/gridsuite/modification/server/dto/LineSplitWithVoltageLevelInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LineSplitWithVoltageLevelInfos.java index cf2775c0d..e98c856c1 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LineSplitWithVoltageLevelInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LineSplitWithVoltageLevelInfos.java @@ -10,7 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; @@ -24,14 +26,11 @@ @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@Data @Schema(description = "Line split with voltage level") @JsonTypeName("LINE_SPLIT_WITH_VOLTAGE_LEVEL") @ModificationErrorTypeName("LINE_SPLIT_ERROR") public class LineSplitWithVoltageLevelInfos extends ModificationInfos { - @Schema(description = "line to split ID") private String lineToSplitId; diff --git a/src/main/java/org/gridsuite/modification/server/dto/LinesAttachToSplitLinesInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LinesAttachToSplitLinesInfos.java index d7efe0dd1..1bdeb10a6 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LinesAttachToSplitLinesInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LinesAttachToSplitLinesInfos.java @@ -10,7 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.LinesAttachToSplitLinesEntity; @@ -24,14 +26,11 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@Data @Schema(description = "Line attach to split line") @JsonTypeName("LINES_ATTACH_TO_SPLIT_LINES") @ModificationErrorTypeName("LINE_ATTACH_ERROR") public class LinesAttachToSplitLinesInfos extends ModificationInfos { - @Schema(description = "line 1 id") private String lineToAttachTo1Id; diff --git a/src/main/java/org/gridsuite/modification/server/dto/LoadCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LoadCreationInfos.java index 23091450a..800aff98b 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LoadCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LoadCreationInfos.java @@ -12,10 +12,9 @@ import com.powsybl.iidm.network.LoadType; import com.powsybl.iidm.network.extensions.ConnectablePosition; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.creation.LoadCreationEntity; @@ -25,12 +24,10 @@ /** * @author Franck Lecuyer */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Load creation") @JsonTypeName("LOAD_CREATION") @ModificationErrorTypeName("CREATE_LOAD_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/LoadModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LoadModificationInfos.java index f1b5b3e89..f4955b6c0 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LoadModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LoadModificationInfos.java @@ -6,27 +6,25 @@ */ package org.gridsuite.modification.server.dto; -import com.fasterxml.jackson.annotation.JsonTypeName; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.LoadModificationEntity; import org.gridsuite.modification.server.modifications.AbstractModification; import org.gridsuite.modification.server.modifications.LoadModification; import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import com.powsybl.iidm.network.LoadType; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @JsonInclude(JsonInclude.Include.NON_NULL) @Schema(description = "Load modification") @JsonTypeName("LOAD_MODIFICATION") diff --git a/src/main/java/org/gridsuite/modification/server/dto/LoadScalingInfos.java b/src/main/java/org/gridsuite/modification/server/dto/LoadScalingInfos.java index 32cbb858e..be14b5c95 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/LoadScalingInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/LoadScalingInfos.java @@ -10,10 +10,8 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.LoadScalingEntity; @@ -25,14 +23,11 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@Data @Schema(description = "Load scaling creation") @JsonTypeName("LOAD_SCALING") @ModificationErrorTypeName("LOAD_SCALING_ERROR") public class LoadScalingInfos extends ScalingInfos { - @Override public LoadScalingEntity toEntity() { return new LoadScalingEntity(this); diff --git a/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java index 2e3143b74..7c0ab6a1f 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java @@ -13,10 +13,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.ModificationType; import org.gridsuite.modification.server.NetworkModificationException; @@ -64,9 +63,8 @@ }) @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString +@AllArgsConstructor +@Data @Schema(description = "Modification attributes") public class ModificationInfos { @Schema(description = "Modification id") diff --git a/src/main/java/org/gridsuite/modification/server/dto/NetworkInfos.java b/src/main/java/org/gridsuite/modification/server/dto/NetworkInfos.java index 4c2790074..e263fed69 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/NetworkInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/NetworkInfos.java @@ -9,7 +9,8 @@ import com.powsybl.iidm.network.Network; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Data; +import lombok.NoArgsConstructor; import java.util.UUID; @@ -17,7 +18,8 @@ * @author Franck Lecuyer */ @AllArgsConstructor -@Getter +@NoArgsConstructor +@Data @Schema(description = "Network infos") public class NetworkInfos { private Network network; diff --git a/src/main/java/org/gridsuite/modification/server/dto/NetworkModificationResult.java b/src/main/java/org/gridsuite/modification/server/dto/NetworkModificationResult.java index cf0a2cb6f..de4756ba5 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/NetworkModificationResult.java +++ b/src/main/java/org/gridsuite/modification/server/dto/NetworkModificationResult.java @@ -7,8 +7,10 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; import org.gridsuite.modification.server.impacts.SimpleElementImpact; import java.util.List; @@ -20,6 +22,8 @@ * @author Slimane Amar */ @Builder +@NoArgsConstructor +@AllArgsConstructor @Data @Schema(description = "Network modification result") public class NetworkModificationResult { diff --git a/src/main/java/org/gridsuite/modification/server/dto/PhaseTapChangerCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/PhaseTapChangerCreationInfos.java index 9d53b0ecd..5459a44fb 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/PhaseTapChangerCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/PhaseTapChangerCreationInfos.java @@ -8,7 +8,9 @@ import com.powsybl.iidm.network.PhaseTapChanger; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; /** @@ -16,12 +18,10 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "PhaseTapChanger attributes") public class PhaseTapChangerCreationInfos extends TapChangerCreationInfos { - @Schema(description = "regulationMode") private PhaseTapChanger.RegulationMode regulationMode; diff --git a/src/main/java/org/gridsuite/modification/server/dto/RatioTapChangerCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/RatioTapChangerCreationInfos.java index 381103745..7cefe7fde 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/RatioTapChangerCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/RatioTapChangerCreationInfos.java @@ -7,7 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; /** @@ -15,12 +17,10 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "RatioTapChanger attributes") public class RatioTapChangerCreationInfos extends TapChangerCreationInfos { - @Schema(description = "loadTapChangingCapabilities") private boolean loadTapChangingCapabilities; diff --git a/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveCreationInfos.java index e51e788e4..9b017d97c 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveCreationInfos.java @@ -9,20 +9,17 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; /** * @author Seddik Yengui */ - -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Generator reactive capability curve point creation") public class ReactiveCapabilityCurveCreationInfos { @Schema(description = "Minimum reactive power ") diff --git a/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveModificationInfos.java index 054d3aafc..7a785f8f1 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ReactiveCapabilityCurveModificationInfos.java @@ -9,20 +9,17 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; /** * @author Ayoub LABIDI */ - -@SuperBuilder +@Builder @NoArgsConstructor @AllArgsConstructor -@Getter -@Setter +@Data @Schema(description = "Generator reactive capability curve point creation") public class ReactiveCapabilityCurveModificationInfos { @Schema(description = "Minimum reactive power ") diff --git a/src/main/java/org/gridsuite/modification/server/dto/ReportInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ReportInfos.java index 07ff800ed..9a7e25f5d 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ReportInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ReportInfos.java @@ -8,15 +8,17 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Getter; +import lombok.Data; +import lombok.NoArgsConstructor; import java.util.UUID; /** * @author Slimane Amar */ +@NoArgsConstructor @AllArgsConstructor -@Getter +@Data @Schema(description = "Report infos") public class ReportInfos { private UUID reportUuid; diff --git a/src/main/java/org/gridsuite/modification/server/dto/ScalingInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ScalingInfos.java index c29f6b03d..b21b8abf8 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ScalingInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ScalingInfos.java @@ -7,10 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.VariationType; @@ -21,10 +20,9 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter +@AllArgsConstructor +@Data @Schema(description = "Scaling infos") -@ToString(callSuper = true) public class ScalingInfos extends ModificationInfos { @Schema(description = "scaling variations") private List variations; diff --git a/src/main/java/org/gridsuite/modification/server/dto/ScalingVariationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ScalingVariationInfos.java index 481def036..5358c526e 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ScalingVariationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ScalingVariationInfos.java @@ -7,11 +7,10 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.ReactiveVariationMode; import org.gridsuite.modification.server.VariationMode; import org.gridsuite.modification.server.entities.equipment.modification.ScalingVariationEntity; @@ -22,11 +21,10 @@ /** * @author bendaamerahm */ -@SuperBuilder +@Builder @NoArgsConstructor -@Getter -@Setter -@ToString +@AllArgsConstructor +@Data @Schema(description = "Scaling creation") public class ScalingVariationInfos { @Schema(description = "id") diff --git a/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorCreationInfos.java index 701d53686..666d2f3d9 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorCreationInfos.java @@ -12,10 +12,9 @@ import com.powsybl.commons.reporter.ReporterModel; import com.powsybl.iidm.network.extensions.ConnectablePosition; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.creation.ShuntCompensatorCreationEntity; @@ -25,12 +24,10 @@ /** * @author Jacques Borsenberger */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Shunt compensator creation") @JsonTypeName("SHUNT_COMPENSATOR_CREATION") @ModificationErrorTypeName("CREATE_SHUNT_COMPENSATOR_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorModificationInfos.java index 85d5ba588..b78841cdb 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ShuntCompensatorModificationInfos.java @@ -12,10 +12,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.ShuntCompensatorModificationEntity; @@ -28,9 +27,8 @@ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Shunt compensator modification") @JsonTypeName("SHUNT_COMPENSATOR_MODIFICATION") @ModificationErrorTypeName("MODIFY_SHUNT_COMPENSATOR_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/SubstationCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/SubstationCreationInfos.java index f84efc4df..dce6e81d2 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/SubstationCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/SubstationCreationInfos.java @@ -12,10 +12,9 @@ import com.powsybl.commons.reporter.ReporterModel; import com.powsybl.iidm.network.Country; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.creation.SubstationCreationEntity; @@ -27,17 +26,14 @@ /** * @author Abdelsalem Hedhili */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Substation creation") @JsonTypeName("SUBSTATION_CREATION") @ModificationErrorTypeName("CREATE_SUBSTATION_ERROR") public class SubstationCreationInfos extends EquipmentCreationInfos { - @Schema(description = "Substation country") private Country substationCountry; diff --git a/src/main/java/org/gridsuite/modification/server/dto/SubstationFreePropertyInfos.java b/src/main/java/org/gridsuite/modification/server/dto/SubstationFreePropertyInfos.java index 8094710dc..01e92e892 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/SubstationFreePropertyInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/SubstationFreePropertyInfos.java @@ -8,17 +8,18 @@ import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.experimental.SuperBuilder; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * @author David Braquart */ -@SuperBuilder +@Builder @NoArgsConstructor -@Getter -@Setter -@EqualsAndHashCode +@AllArgsConstructor +@Data @JsonInclude(JsonInclude.Include.NON_NULL) @Schema(description = "Substation free properties") public class SubstationFreePropertyInfos { @@ -28,9 +29,11 @@ public class SubstationFreePropertyInfos { @Schema(description = "property value") private String value; + @Builder.Default @Schema(description = "marked as deleted") private boolean deletionMark = false; + @Builder.Default @Schema(description = "property added in current modification") private boolean added = false; } diff --git a/src/main/java/org/gridsuite/modification/server/dto/SubstationModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/SubstationModificationInfos.java index e1333ca8a..f3aa76f25 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/SubstationModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/SubstationModificationInfos.java @@ -12,10 +12,9 @@ import com.powsybl.commons.reporter.ReporterModel; import com.powsybl.iidm.network.Country; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.SubstationModificationEntity; @@ -29,9 +28,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @JsonInclude(JsonInclude.Include.NON_NULL) @Schema(description = "Substation modification") @JsonTypeName("SUBSTATION_MODIFICATION") diff --git a/src/main/java/org/gridsuite/modification/server/dto/TapChangerCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/TapChangerCreationInfos.java index d81f55398..ee26cd1e9 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/TapChangerCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/TapChangerCreationInfos.java @@ -7,10 +7,9 @@ package org.gridsuite.modification.server.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import java.util.List; @@ -20,12 +19,10 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString +@AllArgsConstructor +@Data @Schema(description = "TapChanger attributes") public class TapChangerCreationInfos { - @Schema(description = "lowTapPosition") private int lowTapPosition; diff --git a/src/main/java/org/gridsuite/modification/server/dto/TapChangerStepCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/TapChangerStepCreationInfos.java index 778f29f81..e9abbd245 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/TapChangerStepCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/TapChangerStepCreationInfos.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * @author Hugo Marcellin @@ -16,12 +19,9 @@ @Builder @AllArgsConstructor @NoArgsConstructor -@Getter -@Setter -@ToString +@Data @JsonInclude(JsonInclude.Include.NON_NULL) public class TapChangerStepCreationInfos { - @Schema(description = "index") private int index; diff --git a/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerCreationInfos.java index d5e9eebaa..ee8b89cd0 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerCreationInfos.java @@ -10,10 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.creation.TwoWindingsTransformerCreationEntity; @@ -23,17 +22,14 @@ /** * @author Abdelsalem Hedhili */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Two windings transformer creation") @JsonTypeName("TWO_WINDINGS_TRANSFORMER_CREATION") @ModificationErrorTypeName("CREATE_TWO_WINDINGS_TRANSFORMER_ERROR") public class TwoWindingsTransformerCreationInfos extends BranchCreationInfos { - @Schema(description = "Magnetizing conductance") private double magnetizingConductance; diff --git a/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerModificationInfos.java index d88120b27..783f11af2 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/TwoWindingsTransformerModificationInfos.java @@ -10,10 +10,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.TwoWindingsTransformerModificationEntity; @@ -25,14 +24,12 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Two windings transformer modification") @JsonTypeName("TWO_WINDINGS_TRANSFORMER_MODIFICATION") @ModificationErrorTypeName("MODIFY_TWO_WINDINGS_TRANSFORMER_ERROR") public class TwoWindingsTransformerModificationInfos extends BranchModificationInfos { - @Schema(description = "Magnetizing conductance") private AttributeModification magnetizingConductance; diff --git a/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelCreationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelCreationInfos.java index 5bc85711b..ab48f09fb 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelCreationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelCreationInfos.java @@ -11,10 +11,9 @@ import com.powsybl.commons.reporter.ReporterModel; import com.powsybl.iidm.network.SwitchKind; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.creation.VoltageLevelCreationEntity; @@ -28,14 +27,12 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) +@AllArgsConstructor +@Data @Schema(description = "Voltage level creation") @JsonTypeName("VOLTAGE_LEVEL_CREATION") @ModificationErrorTypeName("CREATE_VOLTAGE_LEVEL_ERROR") public class VoltageLevelCreationInfos extends EquipmentCreationInfos { - @Schema(description = "substation id") private String substationId; diff --git a/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelInfos.java b/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelInfos.java index 272eb9627..c496c4ac5 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelInfos.java @@ -6,20 +6,18 @@ */ package org.gridsuite.modification.server.dto; -import lombok.EqualsAndHashCode; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.ToString; -import lombok.experimental.SuperBuilder; /** * @author Nicolas Noir */ -@SuperBuilder +@Builder @NoArgsConstructor -@Getter -@ToString -@EqualsAndHashCode +@AllArgsConstructor +@Data public class VoltageLevelInfos { private String id; private String name; diff --git a/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelModificationInfos.java index d4ce0cc14..8488af0f1 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/VoltageLevelModificationInfos.java @@ -11,9 +11,9 @@ import com.powsybl.commons.reporter.Reporter; import com.powsybl.commons.reporter.ReporterModel; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NoArgsConstructor; -import lombok.Setter; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; import org.gridsuite.modification.server.entities.equipment.modification.VoltageLevelModificationEntity; @@ -23,11 +23,10 @@ /** * @author Seddik Yengui */ - @SuperBuilder @NoArgsConstructor -@Getter -@Setter +@AllArgsConstructor +@Data @Schema(description = "Voltage level modification") @JsonTypeName("VOLTAGE_LEVEL_MODIFICATION") @ModificationErrorTypeName("MODIFY_VOLTAGE_LEVEL_ERROR") diff --git a/src/main/java/org/gridsuite/modification/server/dto/catalog/AerialLineTypeInfos.java b/src/main/java/org/gridsuite/modification/server/dto/catalog/AerialLineTypeInfos.java index e13b2db47..88db7b5d6 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/catalog/AerialLineTypeInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/catalog/AerialLineTypeInfos.java @@ -7,23 +7,21 @@ package org.gridsuite.modification.server.dto.catalog; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; - import org.gridsuite.modification.server.entities.catalog.AerialLineTypeEntity; /** * @author Sylvain Bouzols */ -@Getter -@Setter +@Data @NoArgsConstructor @AllArgsConstructor @SuperBuilder -@EqualsAndHashCode(callSuper = true) @Schema(description = "Aerial Line Type") public class AerialLineTypeInfos extends LineTypeInfos { - @Schema(description = "Number of conductors") private Integer conductorsNumber; diff --git a/src/main/java/org/gridsuite/modification/server/dto/catalog/LineTypeInfos.java b/src/main/java/org/gridsuite/modification/server/dto/catalog/LineTypeInfos.java index 6ecdfb8c6..61a0a9c59 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/catalog/LineTypeInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/catalog/LineTypeInfos.java @@ -6,25 +6,26 @@ */ package org.gridsuite.modification.server.dto.catalog; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.experimental.SuperBuilder; -import java.util.UUID; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; - +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.entities.catalog.LineTypeEntity; +import java.util.UUID; + /** * @author Sylvain Bouzols */ -@Getter -@Setter +@Data @NoArgsConstructor @AllArgsConstructor @SuperBuilder -@EqualsAndHashCode @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, property = "category" diff --git a/src/main/java/org/gridsuite/modification/server/dto/catalog/UndergroundLineTypeInfos.java b/src/main/java/org/gridsuite/modification/server/dto/catalog/UndergroundLineTypeInfos.java index 438b33d0e..26711267a 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/catalog/UndergroundLineTypeInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/catalog/UndergroundLineTypeInfos.java @@ -7,23 +7,21 @@ package org.gridsuite.modification.server.dto.catalog; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; - import org.gridsuite.modification.server.entities.catalog.UndergroundLineTypeEntity; /** * @author Sylvain Bouzols */ -@Getter -@Setter +@Data @NoArgsConstructor @AllArgsConstructor @SuperBuilder -@EqualsAndHashCode(callSuper = true) @Schema(description = "Underground Line Type") public class UndergroundLineTypeInfos extends LineTypeInfos { - @Schema(description = "Insulator") private String insulator; diff --git a/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/BasicEquipmentInfos.java b/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/BasicEquipmentInfos.java index e1d46a85f..89ef3ac10 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/BasicEquipmentInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/BasicEquipmentInfos.java @@ -6,7 +6,10 @@ */ package org.gridsuite.modification.server.dto.elasticsearch; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Field; @@ -21,11 +24,10 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString +@AllArgsConstructor +@Data @EqualsAndHashCode -public class BasicEquipmentInfos { +class BasicEquipmentInfos { @Id private String uniqueId; diff --git a/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/EquipmentInfos.java b/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/EquipmentInfos.java index 2fc40cf47..16924b14d 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/EquipmentInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/EquipmentInfos.java @@ -7,7 +7,9 @@ package org.gridsuite.modification.server.dto.elasticsearch; import com.powsybl.iidm.network.*; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.gridsuite.modification.server.NetworkModificationException; import org.gridsuite.modification.server.dto.VoltageLevelInfos; @@ -25,10 +27,8 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = true) +@AllArgsConstructor +@Data @Document(indexName = "#{@environment.getProperty('powsybl-ws.elasticsearch.index.prefix')}equipments") @Setting(settingPath = "elasticsearch_settings.json") @TypeAlias(value = "EquipmentInfos") diff --git a/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/TombstonedEquipmentInfos.java b/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/TombstonedEquipmentInfos.java index 7d5f149f9..d8e5ac3bb 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/TombstonedEquipmentInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/elasticsearch/TombstonedEquipmentInfos.java @@ -6,7 +6,8 @@ */ package org.gridsuite.modification.server.dto.elasticsearch; -import lombok.*; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.springframework.data.annotation.TypeAlias; import org.springframework.data.elasticsearch.annotations.Document; @@ -17,10 +18,7 @@ */ @SuperBuilder @NoArgsConstructor -@Getter -@Setter -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = true) +@Data @Document(indexName = "#{@environment.getProperty('powsybl-ws.elasticsearch.index.prefix')}tombstoned-equipments") @Setting(settingPath = "elasticsearch_settings.json") @TypeAlias(value = "TombstonedEquipmentInfos")