diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtBaseEntity.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtBaseEntity.java index 37604709a..4b1e75cb1 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtBaseEntity.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtBaseEntity.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.springframework.hateoas.Link; import org.springframework.hateoas.RepresentationModel; @@ -23,6 +24,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated rest model for BaseEntity to RESTful API representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public abstract class MgmtBaseEntity extends RepresentationModel { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindow.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindow.java index e5dd5d48d..63f34ab41 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindow.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindow.java @@ -15,26 +15,25 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; /** * JSON model for Management API to define the maintenance window. */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtMaintenanceWindow extends MgmtMaintenanceWindowRequestBody { /** - * Time in {@link TimeUnit#MILLISECONDS} of the next maintenance window - * start + * Time in {@link TimeUnit#MILLISECONDS} of the next maintenance window start */ @JsonProperty private long nextStartAt; - - public long getNextStartAt() { - return nextStartAt; - } - - public void setNextStartAt(final long nextStartAt) { - this.nextStartAt = nextStartAt; - } -} +} \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindowRequestBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindowRequestBody.java index 2ca2392cd..6e67600e6 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindowRequestBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMaintenanceWindowRequestBody.java @@ -15,6 +15,8 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * Request body for maintenance window PUT/POST commands, based on a schedule @@ -22,6 +24,8 @@ import lombok.Data; * offset from UTC. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtMaintenanceWindowRequestBody { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadata.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadata.java index 9a4ebe229..e4aa8e43e 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadata.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadata.java @@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * The representation of an meta data in the REST API for POST/Create. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtMetadata { @@ -27,6 +31,7 @@ public class MgmtMetadata { @JsonProperty(required = true) @Schema(description = "Metadata property key", example = "someKnownKey") private String key; + @JsonProperty @Schema(description = "Metadata property value", example = "someKnownKeyValue") private String value; diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadataBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadataBodyPut.java index 9334ba687..a7fbd04b6 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadataBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtMetadataBodyPut.java @@ -14,11 +14,16 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * The representation of an meta data in the REST API for PUT/Update. - * */ +@Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtMetadataBodyPut { @@ -26,12 +31,4 @@ public class MgmtMetadataBodyPut { @JsonProperty @Schema(example = "someValue") private String value; - - public String getValue() { - return value; - } - - public void setValue(final String value) { - this.value = value; - } -} +} \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtNamedEntity.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtNamedEntity.java index 75bd26273..1a4620ac0 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtNamedEntity.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtNamedEntity.java @@ -14,11 +14,13 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; /** * A json annotated rest model for NamedEntity to RESTful API representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public abstract class MgmtNamedEntity extends MgmtBaseEntity { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtPollStatus.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtPollStatus.java index bef85bce7..34da3ff30 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtPollStatus.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtPollStatus.java @@ -14,16 +14,18 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; import static org.checkerframework.checker.units.qual.Prefix.exa; /** * A json annotated rest model for PollStatus to RESTful API representation. - * - * - * - * */ +@Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtPollStatus { @@ -39,49 +41,4 @@ public class MgmtPollStatus { @JsonProperty @Schema(example = "false") private boolean overdue; - - /** - * @return the lastRequestAt - */ - public Long getLastRequestAt() { - return lastRequestAt; - } - - /** - * @param lastRequestAt - * the lastRequestAt to set - */ - public void setLastRequestAt(final Long lastRequestAt) { - this.lastRequestAt = lastRequestAt; - } - - /** - * @return the nextExpectedRequestAt - */ - public Long getNextExpectedRequestAt() { - return nextExpectedRequestAt; - } - - /** - * @param nextExpectedRequestAt - * the nextExpectedRequestAt to set - */ - public void setNextExpectedRequestAt(final Long nextExpectedRequestAt) { - this.nextExpectedRequestAt = nextExpectedRequestAt; - } - - /** - * @return the overdue - */ - public boolean isOverdue() { - return overdue; - } - - /** - * @param overdue - * the overdue to set - */ - public void setOverdue(final boolean overdue) { - this.overdue = overdue; - } -} +} \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtTypeEntity.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtTypeEntity.java index 194cdb576..491518600 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtTypeEntity.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/MgmtTypeEntity.java @@ -11,11 +11,18 @@ package org.eclipse.hawkbit.mgmt.json.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; /** * A json annotated rest model for Type to RESTful API representation. - * */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public abstract class MgmtTypeEntity extends MgmtNamedEntity { @JsonProperty(required = true) @@ -30,28 +37,4 @@ public abstract class MgmtTypeEntity extends MgmtNamedEntity { @JsonProperty @Schema(description = "Deleted flag, used for soft deleted entities", example = "false") private boolean deleted; - - public String getKey() { - return key; - } - - public void setKey(final String key) { - this.key = key; - } - - public String getColour() { - return colour; - } - - public void setColour(String colour) { - this.colour = colour; - } - - public boolean isDeleted() { - return deleted; - } - - public void setDeleted(final boolean deleted) { - this.deleted = deleted; - } -} +} \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/PagedList.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/PagedList.java index 7839fe598..ca711bd81 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/PagedList.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/PagedList.java @@ -14,6 +14,10 @@ import java.util.List; import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; import org.springframework.hateoas.RepresentationModel; import com.fasterxml.jackson.annotation.JsonCreator; @@ -27,10 +31,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; * total elements and size of content. The content of the actual list is stored * in the {@link #content} field. * - * @param - * the type of elements in this list - * + * @param the type of elements in this list */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(Include.NON_NULL) public class PagedList extends RepresentationModel> { @@ -45,12 +51,9 @@ public class PagedList extends RepresentationModel> { * creates a new paged list with the given {@code content} and {@code total} * . * - * @param content - * the actual content of the list - * @param total - * the total amount of elements - * @throws NullPointerException - * in case {@code content} is {@code null}. + * @param content the actual content of the list + * @param total the total amount of elements + * @throws NullPointerException in case {@code content} is {@code null}. */ @JsonCreator public PagedList(@JsonProperty("content") @NotNull final List content, @JsonProperty("total") final long total) { @@ -58,23 +61,4 @@ public class PagedList extends RepresentationModel> { this.total = total; this.content = content; } - - /** - * @return the size of the content list - */ - public int getSize() { - return size; - } - - /** - * @return the total amount of elements - */ - public long getTotal() { - return total; - } - - public List getContent() { - return Collections.unmodifiableList(content); - } - -} +} \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtAction.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtAction.java index a86b471b8..9ae7fde6f 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtAction.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtAction.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindow; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; @@ -26,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated rest model for Action to RESTful API representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) @@ -86,36 +88,47 @@ public class MgmtAction extends MgmtBaseEntity { @JsonProperty("id") @Schema(description = "ID of the action", example = "7") private Long actionId; + @JsonProperty @Schema(description = "Type of action", example = "update") private String type; + @JsonProperty @Schema(description = "Status of action", example = "finished") private String status; + @JsonProperty @Schema(description = "Detailed status of action", example = "finished") private String detailStatus; + @JsonProperty @Schema(example = "1691065903238") private Long forceTime; + @JsonProperty(value = "forceType") private MgmtActionType actionType; + @JsonProperty @Schema(description = "Weight of the action showing the importance of the update", example = "600") private Integer weight; + @JsonProperty @Schema(hidden = true) private MgmtMaintenanceWindow maintenanceWindow; + @JsonProperty @Schema(description = "The ID of the rollout this action was created for", example = "1") private Long rollout; + @JsonProperty @Schema(description = "The name of the rollout this action was created for", example = "rollout") private String rolloutName; + @JsonProperty @Schema(description = "(Optional) Code provided as part of the last status update that was sent by the device.", example = "200") private Integer lastStatusCode; + @JsonProperty @Schema(description = "If created by external system this field contains the external reference for the action") private String externalRef; diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionRequestBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionRequestBodyPut.java index bbd4ac328..43f9fd4b6 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionRequestBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionRequestBodyPut.java @@ -10,6 +10,8 @@ package org.eclipse.hawkbit.mgmt.json.model.action; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,6 +20,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated model for Action updates in RESTful API representation. */ @Data +@Accessors(chain = true) +@ToString public class MgmtActionRequestBodyPut { @JsonProperty(value="forceType") diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionStatus.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionStatus.java index 138c8a1c6..26eb428b2 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionStatus.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/action/MgmtActionStatus.java @@ -17,11 +17,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * A json annotated rest model for ActionStatus to RESTful API representation. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtActionStatus { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifact.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifact.java index 967c02e8e..948b349e5 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifact.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/artifact/MgmtArtifact.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -25,6 +26,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated rest model for Artifact to RESTful API representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/auth/MgmtUserInfo.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/auth/MgmtUserInfo.java index 3e8dc92cc..6b859f894 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/auth/MgmtUserInfo.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/auth/MgmtUserInfo.java @@ -10,13 +10,17 @@ package org.eclipse.hawkbit.mgmt.json.model.auth; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * A json annotated rest model for Userinfo to RESTful API representation. */ @Data +@Accessors(chain = true) +@ToString public class MgmtUserInfo { - private String username; private String tenant; + private String username; } \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtActionId.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtActionId.java index 573f1e6a7..0f91950bf 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtActionId.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtActionId.java @@ -19,6 +19,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetRestApi; import org.springframework.hateoas.RepresentationModel; @@ -32,6 +33,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; */ @NoArgsConstructor @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSet.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSet.java index 4a0168784..8047b40a2 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSet.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSet.java @@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule; @@ -29,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPost.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPost.java index 4bf4bea2c..9fd2118a6 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPost.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtDistributionSetRequestBodyPost.java @@ -27,9 +27,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated rest model for DistributionSet for POST. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -@Accessors(chain = true) @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetRequestBodyPut { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentResponseBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentResponseBody.java index 9862bfc48..877fa33c2 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentResponseBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtTargetAssignmentResponseBody.java @@ -15,6 +15,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.springframework.hateoas.RepresentationModel; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -26,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Response Body of Target for assignment operations. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetType.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetType.java index 5f699a2c3..09685ae86 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetType.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetType.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity; /** @@ -25,6 +26,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity; * representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeAssignment.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeAssignment.java index 04d81138f..e202c45aa 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeAssignment.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeAssignment.java @@ -10,11 +10,13 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionsettype; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtId; /** * Request Body of DistributionSetType for assignment operations (ID only). */ +@Accessors(chain = true) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtDistributionSetTypeAssignment extends MgmtId { } diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPost.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPost.java index 0d83004f8..000d5dd5a 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPost.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPost.java @@ -24,9 +24,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Request Body for DistributionSetType POST. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -@Accessors(chain = true) public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetTypeRequestBodyPut { @JsonProperty(required = true) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPut.java index e1270362f..226f8175b 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionsettype/MgmtDistributionSetTypeRequestBodyPut.java @@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionsettype; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -19,6 +20,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString public class MgmtDistributionSetTypeRequestBodyPut { @JsonProperty diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/AbstractMgmtRolloutConditionsEntity.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/AbstractMgmtRolloutConditionsEntity.java index fe8468402..8a1c0db9a 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/AbstractMgmtRolloutConditionsEntity.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/AbstractMgmtRolloutConditionsEntity.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -22,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; * Model for defining Conditions and Actions */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutCondition.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutCondition.java index 1b8cb6bb3..86cb76726 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutCondition.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutCondition.java @@ -15,9 +15,13 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; @NoArgsConstructor @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtRolloutCondition { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutErrorAction.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutErrorAction.java index 48539c647..4172b19a5 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutErrorAction.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutErrorAction.java @@ -15,12 +15,16 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; /** * An action that runs when the error condition is met */ @NoArgsConstructor @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtRolloutErrorAction { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutResponseBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutResponseBody.java index 2b7f9b9a9..be1587268 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutResponseBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutResponseBody.java @@ -18,6 +18,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.Setter; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; @@ -27,6 +28,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutRestRequestBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutRestRequestBody.java index 96b8969b5..afc9e7442 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutRestRequestBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutRestRequestBody.java @@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup; @@ -29,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * creating a rollout via REST API. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutSuccessAction.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutSuccessAction.java index 304640d26..d3b6ace8d 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutSuccessAction.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rollout/MgmtRolloutSuccessAction.java @@ -15,9 +15,13 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; @NoArgsConstructor @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtRolloutSuccessAction { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroup.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroup.java index f8157b9d9..ebf987977 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroup.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroup.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -22,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; * Model for defining the Attributes of a Rollout Group */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroupResponseBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroupResponseBody.java index 406fc5e80..46a495c25 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroupResponseBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/rolloutgroup/MgmtRolloutGroupResponseBody.java @@ -22,12 +22,14 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.Setter; import lombok.ToString; +import lombok.experimental.Accessors; /** * Model for the rollout group annotated with json-annotations for easier * serialization and de-serialization. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModule.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModule.java index 1cde8b12e..ff3d19227 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModule.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModule.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -24,6 +25,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated rest model for SoftwareModule to RESTful API representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadata.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadata.java index 560281dd5..529db00e7 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadata.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadata.java @@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * The representation of SoftwareModuleMetadata in the REST API for POST/Create. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtSoftwareModuleMetadata { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadataBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadataBodyPut.java index 1c5114ea2..5b6dd50dc 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadataBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleMetadataBodyPut.java @@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * The representation of an meta data in the REST API for PUT/Update. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtSoftwareModuleMetadataBodyPut { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPost.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPost.java index 049d97947..9c7fff47c 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPost.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPost.java @@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremodule; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -19,23 +20,29 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString public class MgmtSoftwareModuleRequestBodyPost { @JsonProperty(required = true) @Schema(example = "SM Name") private String name; + @JsonProperty(required = true) @Schema(example = "1.0.0") private String version; + @JsonProperty(required = true) @Schema(example = "os") private String type; + @JsonProperty @Schema(example = "SM Description") private String description; + @JsonProperty @Schema(example = "Vendor Limited, California") private String vendor; + @JsonProperty @Schema(example = "false") private boolean encrypted; diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPut.java index 50a0b77cb..bb59ee747 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremodule/MgmtSoftwareModuleRequestBodyPut.java @@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremodule; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -19,6 +20,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString public class MgmtSoftwareModuleRequestBodyPut { @JsonProperty diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleType.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleType.java index 138198e5a..6353de529 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleType.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleType.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity; /** @@ -25,6 +26,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity; * representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) @@ -52,6 +54,7 @@ public class MgmtSoftwareModuleType extends MgmtTypeEntity { @JsonProperty(value = "id", required = true) @Schema(description = "The technical identifier of the entity", example = "83") private Long moduleId; + @JsonProperty @Schema(description = "Software modules of that type can be assigned at this maximum number " + "(e.g. operating system only once)", example = "1") diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPut.java index c29fa4976..1225a66a8 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/softwaremoduletype/MgmtSoftwareModuleTypeRequestBodyPut.java @@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -19,6 +20,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString public class MgmtSoftwareModuleTypeRequestBodyPut { @JsonProperty diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValue.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValue.java index 76ebd233a..e57111c62 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValue.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValue.java @@ -17,6 +17,7 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; +import lombok.experimental.Accessors; import org.springframework.hateoas.RepresentationModel; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -28,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; * representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValueRequest.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValueRequest.java index 12f86857d..cd5838353 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValueRequest.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/system/MgmtSystemTenantConfigurationValueRequest.java @@ -34,10 +34,11 @@ public class MgmtSystemTenantConfigurationValueRequest { @Schema(description = "Current value of of configuration parameter", example = "exampleToken") private Serializable value; - public void setValue(final Object value) { + public MgmtSystemTenantConfigurationValueRequest setValue(final Object value) { if (!(value instanceof Serializable)) { throw new IllegalArgumentException("The value must be a instance of " + Serializable.class.getName()); } this.value = (Serializable) value; + return this; } } \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemCache.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemCache.java index 60e8441ae..54d45536d 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemCache.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemCache.java @@ -15,11 +15,13 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import lombok.Data; +import lombok.ToString; /** * Model representation of an Cache entry as json. */ @Data +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtSystemCache { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemStatisticsRest.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemStatisticsRest.java index 984175d4b..a140e50c5 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemStatisticsRest.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemStatisticsRest.java @@ -16,12 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** * Body for system statistics. */ @Data +@ToString @Accessors(chain = true) @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @@ -29,14 +31,19 @@ public class MgmtSystemStatisticsRest { @JsonProperty private long overallTargets; + @JsonProperty private long overallArtifacts; + @JsonProperty private long overallArtifactVolumeInBytes; + @JsonProperty private long overallActions; + @JsonProperty private long overallTenants; + @JsonProperty private List tenantStats; } \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemTenantServiceUsage.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemTenantServiceUsage.java index c62cbc799..6bd29410d 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemTenantServiceUsage.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/systemmanagement/MgmtSystemTenantServiceUsage.java @@ -16,25 +16,34 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * Response body for system usage report. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtSystemTenantServiceUsage { @JsonProperty private String tenantName; + @JsonProperty private long targets; + @JsonProperty private long artifacts; + @JsonProperty private long actions; + @JsonProperty private long overallArtifactVolumeInBytes; + @JsonProperty private Map usageData; } \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedDistributionSetRequestBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedDistributionSetRequestBody.java index fafc336f1..6b0d4f09b 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedDistributionSetRequestBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedDistributionSetRequestBody.java @@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * Request Body for PUT. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtAssignedDistributionSetRequestBody { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedTargetRequestBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedTargetRequestBody.java index 01d45339a..4fce8d360 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedTargetRequestBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtAssignedTargetRequestBody.java @@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -22,6 +23,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtAssignedTargetRequestBody { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtDistributionSetTagAssigmentResult.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtDistributionSetTagAssigmentResult.java index 76caca323..fc40cb44d 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtDistributionSetTagAssigmentResult.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtDistributionSetTagAssigmentResult.java @@ -13,6 +13,8 @@ import java.util.List; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -25,6 +27,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; * representation. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtDistributionSetTagAssigmentResult { @@ -32,6 +36,7 @@ public class MgmtDistributionSetTagAssigmentResult { @JsonProperty @Schema(description = "Assigned distribution sets") private List assignedDistributionSets; + @JsonProperty @Schema(description = "Unassigned distribution sets") private List unassignedDistributionSets; diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTag.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTag.java index 941d6167d..bd46ec5d6 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTag.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTag.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -25,6 +26,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated rest model for Tag to RESTful API representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTagRequestBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTagRequestBodyPut.java index 1741d1466..2bcf3029f 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTagRequestBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTagRequestBodyPut.java @@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -22,6 +23,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtTagRequestBodyPut { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTargetTagAssigmentResult.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTargetTagAssigmentResult.java index fb78ed4b4..644228f18 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTargetTagAssigmentResult.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/tag/MgmtTargetTagAssigmentResult.java @@ -13,6 +13,8 @@ import java.util.List; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -25,6 +27,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; * representation. */ @Data +@Accessors(chain = true) +@ToString @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class MgmtTargetTagAssigmentResult { diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java index b6ec2b33a..51b39b727 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java @@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus; @@ -19,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * A json annotated rest model for Target to RESTful API representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirm.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirm.java index 5a7debe76..6ed99e4cc 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirm.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirm.java @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.springframework.hateoas.RepresentationModel; import jakarta.validation.constraints.NotNull; @@ -25,6 +26,7 @@ import jakarta.validation.constraints.NotNull; * Response representing the current state of auto-confirmation for a specific target */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirmUpdate.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirmUpdate.java index df610e35d..0157e3d2c 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirmUpdate.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetAutoConfirmUpdate.java @@ -13,11 +13,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; +import lombok.experimental.Accessors; /** * Payload to activate the auto-confirmation by given initiator and remark. */ @Data +@Accessors(chain = true) +@ToString public class MgmtTargetAutoConfirmUpdate { @JsonProperty diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetRequestBody.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetRequestBody.java index 3f4d510e8..47a945120 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetRequestBody.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTargetRequestBody.java @@ -6,6 +6,7 @@ package org.eclipse.hawkbit.mgmt.json.model.target; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -13,6 +14,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString public class MgmtTargetRequestBody { @JsonProperty(required = true) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetType.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetType.java index 09c64abf5..381031222 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetType.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetType.java @@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity; /** @@ -23,6 +24,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity; * representation. */ @Data +@Accessors(chain = true) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPost.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPost.java index 64583f4bf..847daf5a3 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPost.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPost.java @@ -13,13 +13,19 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeAssignment; -import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeRequestBodyPost; -import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment; /** * Request Body for TargetType POST. */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut { @JsonProperty @@ -29,56 +35,4 @@ public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut @JsonProperty @Schema(description = "Array of distribution set types that are compatible to that target type") private List compatibledistributionsettypes; - - /** - * @param name - * the name to set - * @return post request body - */ - @Override - public MgmtTargetTypeRequestBodyPost setName(final String name) { - super.setName(name); - return this; - } - - @Override - public MgmtTargetTypeRequestBodyPost setDescription(final String description) { - super.setDescription(description); - return this; - } - - public MgmtTargetTypeRequestBodyPost setKey(final String key) { - this.key = key; - return this; - } - - public String getKey() { - return key; - } - - @Override - public MgmtTargetTypeRequestBodyPost setColour(final String colour) { - super.setColour(colour); - return this; - } - - - /** - * @return the compatible ds types - */ - public List getCompatibleDsTypes() { - return compatibledistributionsettypes; - } - - /** - * @param compatibleDsTypes - * the compatible ds types to set - * - * @return updated body - */ - public MgmtTargetTypeRequestBodyPost setCompatibleDsTypes( - final List compatibleDsTypes) { - this.compatibledistributionsettypes = compatibleDsTypes; - return this; - } -} +} \ No newline at end of file diff --git a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPut.java b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPut.java index a8682f2e4..2e39926d9 100644 --- a/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPut.java +++ b/hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/targettype/MgmtTargetTypeRequestBodyPut.java @@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.targettype; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.ToString; import lombok.experimental.Accessors; /** @@ -19,6 +20,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) +@ToString public class MgmtTargetTypeRequestBodyPut { @JsonProperty(required = true) diff --git a/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeMapper.java b/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeMapper.java index ca8ac807e..03ce3aa0d 100644 --- a/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeMapper.java +++ b/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeMapper.java @@ -55,7 +55,7 @@ public final class MgmtTargetTypeMapper { } private static Collection getDistributionSets(final MgmtTargetTypeRequestBodyPost targetTypesRest) { - return Optional.ofNullable(targetTypesRest.getCompatibleDsTypes()) + return Optional.ofNullable(targetTypesRest.getCompatibledistributionsettypes()) .map(ds -> ds.stream().map(MgmtDistributionSetTypeAssignment::getId).collect(Collectors.toList())) .orElse(Collections.emptyList()); }