Consistent chain = true fore Mgmt REST API (#1685)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.hateoas.Link;
|
import org.springframework.hateoas.Link;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
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.
|
* A json annotated rest model for BaseEntity to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity> {
|
public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity> {
|
||||||
|
|||||||
@@ -15,26 +15,25 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
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.
|
* JSON model for Management API to define the maintenance window.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtMaintenanceWindow extends MgmtMaintenanceWindowRequestBody {
|
public class MgmtMaintenanceWindow extends MgmtMaintenanceWindowRequestBody {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Time in {@link TimeUnit#MILLISECONDS} of the next maintenance window
|
* Time in {@link TimeUnit#MILLISECONDS} of the next maintenance window start
|
||||||
* start
|
|
||||||
*/
|
*/
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long nextStartAt;
|
private long nextStartAt;
|
||||||
|
|
||||||
public long getNextStartAt() {
|
|
||||||
return nextStartAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNextStartAt(final long nextStartAt) {
|
|
||||||
this.nextStartAt = nextStartAt;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,8 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request body for maintenance window PUT/POST commands, based on a schedule
|
* Request body for maintenance window PUT/POST commands, based on a schedule
|
||||||
@@ -22,6 +24,8 @@ import lombok.Data;
|
|||||||
* offset from UTC.
|
* offset from UTC.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtMaintenanceWindowRequestBody {
|
public class MgmtMaintenanceWindowRequestBody {
|
||||||
|
|||||||
@@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The representation of an meta data in the REST API for POST/Create.
|
* The representation of an meta data in the REST API for POST/Create.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtMetadata {
|
public class MgmtMetadata {
|
||||||
@@ -27,6 +31,7 @@ public class MgmtMetadata {
|
|||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(description = "Metadata property key", example = "someKnownKey")
|
@Schema(description = "Metadata property key", example = "someKnownKey")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Metadata property value", example = "someKnownKeyValue")
|
@Schema(description = "Metadata property value", example = "someKnownKeyValue")
|
||||||
private String value;
|
private String value;
|
||||||
|
|||||||
@@ -14,11 +14,16 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
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.
|
* The representation of an meta data in the REST API for PUT/Update.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtMetadataBodyPut {
|
public class MgmtMetadataBodyPut {
|
||||||
@@ -26,12 +31,4 @@ public class MgmtMetadataBodyPut {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "someValue")
|
@Schema(example = "someValue")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(final String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -14,11 +14,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for NamedEntity to RESTful API representation.
|
* A json annotated rest model for NamedEntity to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public abstract class MgmtNamedEntity extends MgmtBaseEntity {
|
public abstract class MgmtNamedEntity extends MgmtBaseEntity {
|
||||||
|
|||||||
@@ -14,16 +14,18 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
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;
|
import static org.checkerframework.checker.units.qual.Prefix.exa;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for PollStatus to RESTful API representation.
|
* A json annotated rest model for PollStatus to RESTful API representation.
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtPollStatus {
|
public class MgmtPollStatus {
|
||||||
@@ -39,49 +41,4 @@ public class MgmtPollStatus {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private boolean overdue;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -11,11 +11,18 @@ package org.eclipse.hawkbit.mgmt.json.model;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
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.
|
* 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 {
|
public abstract class MgmtTypeEntity extends MgmtNamedEntity {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@@ -30,28 +37,4 @@ public abstract class MgmtTypeEntity extends MgmtNamedEntity {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Deleted flag, used for soft deleted entities", example = "false")
|
@Schema(description = "Deleted flag, used for soft deleted entities", example = "false")
|
||||||
private boolean deleted;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,10 @@ import java.util.List;
|
|||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
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
|
* total elements and size of content. The content of the actual list is stored
|
||||||
* in the {@link #content} field.
|
* in the {@link #content} field.
|
||||||
*
|
*
|
||||||
* @param <T>
|
* @param <T> the type of elements in this list
|
||||||
* the type of elements in this list
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
public class PagedList<T> extends RepresentationModel<PagedList<T>> {
|
public class PagedList<T> extends RepresentationModel<PagedList<T>> {
|
||||||
@@ -45,12 +51,9 @@ public class PagedList<T> extends RepresentationModel<PagedList<T>> {
|
|||||||
* creates a new paged list with the given {@code content} and {@code total}
|
* creates a new paged list with the given {@code content} and {@code total}
|
||||||
* .
|
* .
|
||||||
*
|
*
|
||||||
* @param content
|
* @param content the actual content of the list
|
||||||
* the actual content of the list
|
* @param total the total amount of elements
|
||||||
* @param total
|
* @throws NullPointerException in case {@code content} is {@code null}.
|
||||||
* the total amount of elements
|
|
||||||
* @throws NullPointerException
|
|
||||||
* in case {@code content} is {@code null}.
|
|
||||||
*/
|
*/
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public PagedList(@JsonProperty("content") @NotNull final List<T> content, @JsonProperty("total") final long total) {
|
public PagedList(@JsonProperty("content") @NotNull final List<T> content, @JsonProperty("total") final long total) {
|
||||||
@@ -58,23 +61,4 @@ public class PagedList<T> extends RepresentationModel<PagedList<T>> {
|
|||||||
this.total = total;
|
this.total = total;
|
||||||
this.content = content;
|
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<T> getContent() {
|
|
||||||
return Collections.unmodifiableList(content);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindow;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindow;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
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.
|
* A json annotated rest model for Action to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@@ -86,36 +88,47 @@ public class MgmtAction extends MgmtBaseEntity {
|
|||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
@Schema(description = "ID of the action", example = "7")
|
@Schema(description = "ID of the action", example = "7")
|
||||||
private Long actionId;
|
private Long actionId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Type of action", example = "update")
|
@Schema(description = "Type of action", example = "update")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Status of action", example = "finished")
|
@Schema(description = "Status of action", example = "finished")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Detailed status of action", example = "finished")
|
@Schema(description = "Detailed status of action", example = "finished")
|
||||||
private String detailStatus;
|
private String detailStatus;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065903238")
|
@Schema(example = "1691065903238")
|
||||||
private Long forceTime;
|
private Long forceTime;
|
||||||
|
|
||||||
@JsonProperty(value = "forceType")
|
@JsonProperty(value = "forceType")
|
||||||
private MgmtActionType actionType;
|
private MgmtActionType actionType;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Weight of the action showing the importance of the update", example = "600")
|
@Schema(description = "Weight of the action showing the importance of the update", example = "600")
|
||||||
private Integer weight;
|
private Integer weight;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(hidden = true)
|
@Schema(hidden = true)
|
||||||
private MgmtMaintenanceWindow maintenanceWindow;
|
private MgmtMaintenanceWindow maintenanceWindow;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "The ID of the rollout this action was created for", example = "1")
|
@Schema(description = "The ID of the rollout this action was created for", example = "1")
|
||||||
private Long rollout;
|
private Long rollout;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "The name of the rollout this action was created for", example = "rollout")
|
@Schema(description = "The name of the rollout this action was created for", example = "rollout")
|
||||||
private String rolloutName;
|
private String rolloutName;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "(Optional) Code provided as part of the last status update that was sent by the device.",
|
@Schema(description = "(Optional) Code provided as part of the last status update that was sent by the device.",
|
||||||
example = "200")
|
example = "200")
|
||||||
private Integer lastStatusCode;
|
private Integer lastStatusCode;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "If created by external system this field contains the external reference for the action")
|
@Schema(description = "If created by external system this field contains the external reference for the action")
|
||||||
private String externalRef;
|
private String externalRef;
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.action;
|
package org.eclipse.hawkbit.mgmt.json.model.action;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
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.
|
* A json annotated model for Action updates in RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtActionRequestBodyPut {
|
public class MgmtActionRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty(value="forceType")
|
@JsonProperty(value="forceType")
|
||||||
|
|||||||
@@ -17,11 +17,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for ActionStatus to RESTful API representation.
|
* A json annotated rest model for ActionStatus to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtActionStatus {
|
public class MgmtActionStatus {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
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.
|
* A json annotated rest model for Artifact to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -10,13 +10,17 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.auth;
|
package org.eclipse.hawkbit.mgmt.json.model.auth;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for Userinfo to RESTful API representation.
|
* A json annotated rest model for Userinfo to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtUserInfo {
|
public class MgmtUserInfo {
|
||||||
|
|
||||||
private String username;
|
|
||||||
private String tenant;
|
private String tenant;
|
||||||
|
private String username;
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetRestApi;
|
import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetRestApi;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
|
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* A json annotated rest model for DistributionSet for POST.
|
* A json annotated rest model for DistributionSet for POST.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@Accessors(chain = true)
|
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetRequestBodyPut {
|
public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetRequestBodyPut {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -26,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* Response Body of Target for assignment operations.
|
* Response Body of Target for assignment operations.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,6 +26,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
|||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -10,11 +10,13 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body of DistributionSetType for assignment operations (ID only).
|
* Request Body of DistributionSetType for assignment operations (ID only).
|
||||||
*/
|
*/
|
||||||
|
@Accessors(chain = true)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtDistributionSetTypeAssignment extends MgmtId {
|
public class MgmtDistributionSetTypeAssignment extends MgmtId {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* Request Body for DistributionSetType POST.
|
* Request Body for DistributionSetType POST.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@Accessors(chain = true)
|
|
||||||
public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetTypeRequestBodyPut {
|
public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +20,7 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtDistributionSetTypeRequestBodyPut {
|
public class MgmtDistributionSetTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -22,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
* Model for defining Conditions and Actions
|
* Model for defining Conditions and Actions
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
|||||||
@@ -15,9 +15,13 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutCondition {
|
public class MgmtRolloutCondition {
|
||||||
|
|||||||
@@ -15,12 +15,16 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An action that runs when the error condition is met
|
* An action that runs when the error condition is met
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutErrorAction {
|
public class MgmtRolloutErrorAction {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
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;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
|
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.
|
* creating a rollout via REST API.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -15,9 +15,13 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutSuccessAction {
|
public class MgmtRolloutSuccessAction {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
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
|
* Model for defining the Attributes of a Rollout Group
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
|||||||
@@ -22,12 +22,14 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for the rollout group annotated with json-annotations for easier
|
* Model for the rollout group annotated with json-annotations for easier
|
||||||
* serialization and de-serialization.
|
* serialization and de-serialization.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
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.
|
* A json annotated rest model for SoftwareModule to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The representation of SoftwareModuleMetadata in the REST API for POST/Create.
|
* The representation of SoftwareModuleMetadata in the REST API for POST/Create.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSoftwareModuleMetadata {
|
public class MgmtSoftwareModuleMetadata {
|
||||||
|
|||||||
@@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The representation of an meta data in the REST API for PUT/Update.
|
* The representation of an meta data in the REST API for PUT/Update.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSoftwareModuleMetadataBodyPut {
|
public class MgmtSoftwareModuleMetadataBodyPut {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,23 +20,29 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtSoftwareModuleRequestBodyPost {
|
public class MgmtSoftwareModuleRequestBodyPost {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "SM Name")
|
@Schema(example = "SM Name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "1.0.0")
|
@Schema(example = "1.0.0")
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "os")
|
@Schema(example = "os")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "SM Description")
|
@Schema(example = "SM Description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Vendor Limited, California")
|
@Schema(example = "Vendor Limited, California")
|
||||||
private String vendor;
|
private String vendor;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private boolean encrypted;
|
private boolean encrypted;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +20,7 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtSoftwareModuleRequestBodyPut {
|
public class MgmtSoftwareModuleRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,6 +26,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
|||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@@ -52,6 +54,7 @@ public class MgmtSoftwareModuleType extends MgmtTypeEntity {
|
|||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(description = "The technical identifier of the entity", example = "83")
|
@Schema(description = "The technical identifier of the entity", example = "83")
|
||||||
private Long moduleId;
|
private Long moduleId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Software modules of that type can be assigned at this maximum number " +
|
@Schema(description = "Software modules of that type can be assigned at this maximum number " +
|
||||||
"(e.g. operating system only once)", example = "1")
|
"(e.g. operating system only once)", example = "1")
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +20,7 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtSoftwareModuleTypeRequestBodyPut {
|
public class MgmtSoftwareModuleTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -28,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -34,10 +34,11 @@ public class MgmtSystemTenantConfigurationValueRequest {
|
|||||||
@Schema(description = "Current value of of configuration parameter", example = "exampleToken")
|
@Schema(description = "Current value of of configuration parameter", example = "exampleToken")
|
||||||
private Serializable value;
|
private Serializable value;
|
||||||
|
|
||||||
public void setValue(final Object value) {
|
public MgmtSystemTenantConfigurationValueRequest setValue(final Object value) {
|
||||||
if (!(value instanceof Serializable)) {
|
if (!(value instanceof Serializable)) {
|
||||||
throw new IllegalArgumentException("The value must be a instance of " + Serializable.class.getName());
|
throw new IllegalArgumentException("The value must be a instance of " + Serializable.class.getName());
|
||||||
}
|
}
|
||||||
this.value = (Serializable) value;
|
this.value = (Serializable) value;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,11 +15,13 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model representation of an Cache entry as json.
|
* Model representation of an Cache entry as json.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSystemCache {
|
public class MgmtSystemCache {
|
||||||
|
|||||||
@@ -16,12 +16,14 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Body for system statistics.
|
* Body for system statistics.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
@@ -29,14 +31,19 @@ public class MgmtSystemStatisticsRest {
|
|||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallTargets;
|
private long overallTargets;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallArtifacts;
|
private long overallArtifacts;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallArtifactVolumeInBytes;
|
private long overallArtifactVolumeInBytes;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallActions;
|
private long overallActions;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallTenants;
|
private long overallTenants;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtSystemTenantServiceUsage> tenantStats;
|
private List<MgmtSystemTenantServiceUsage> tenantStats;
|
||||||
}
|
}
|
||||||
@@ -16,25 +16,34 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response body for system usage report.
|
* Response body for system usage report.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSystemTenantServiceUsage {
|
public class MgmtSystemTenantServiceUsage {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private String tenantName;
|
private String tenantName;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long targets;
|
private long targets;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long artifacts;
|
private long artifacts;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long actions;
|
private long actions;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallArtifactVolumeInBytes;
|
private long overallArtifactVolumeInBytes;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private Map<String, String> usageData;
|
private Map<String, String> usageData;
|
||||||
}
|
}
|
||||||
@@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for PUT.
|
* Request Body for PUT.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtAssignedDistributionSetRequestBody {
|
public class MgmtAssignedDistributionSetRequestBody {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,6 +23,7 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtAssignedTargetRequestBody {
|
public class MgmtAssignedTargetRequestBody {
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -25,6 +27,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtDistributionSetTagAssigmentResult {
|
public class MgmtDistributionSetTagAssigmentResult {
|
||||||
@@ -32,6 +36,7 @@ public class MgmtDistributionSetTagAssigmentResult {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Assigned distribution sets")
|
@Schema(description = "Assigned distribution sets")
|
||||||
private List<MgmtDistributionSet> assignedDistributionSets;
|
private List<MgmtDistributionSet> assignedDistributionSets;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Unassigned distribution sets")
|
@Schema(description = "Unassigned distribution sets")
|
||||||
private List<MgmtDistributionSet> unassignedDistributionSets;
|
private List<MgmtDistributionSet> unassignedDistributionSets;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
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.
|
* A json annotated rest model for Tag to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,6 +23,7 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTagRequestBodyPut {
|
public class MgmtTagRequestBodyPut {
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
|
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -25,6 +27,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTargetTagAssigmentResult {
|
public class MgmtTargetTagAssigmentResult {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus;
|
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.
|
* A json annotated rest model for Target to RESTful API representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
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
|
* Response representing the current state of auto-confirmation for a specific target
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
|||||||
@@ -13,11 +13,15 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Payload to activate the auto-confirmation by given initiator and remark.
|
* Payload to activate the auto-confirmation by given initiator and remark.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtTargetAutoConfirmUpdate {
|
public class MgmtTargetAutoConfirmUpdate {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ package org.eclipse.hawkbit.mgmt.json.model.target;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,6 +14,7 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtTargetRequestBody {
|
public class MgmtTargetRequestBody {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,6 +24,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
|||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
|||||||
@@ -13,13 +13,19 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
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.MgmtDistributionSetTypeAssignment;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionSetTypeRequestBodyPost;
|
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for TargetType POST.
|
* Request Body for TargetType POST.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut {
|
public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@@ -29,56 +35,4 @@ public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(description = "Array of distribution set types that are compatible to that target type")
|
@Schema(description = "Array of distribution set types that are compatible to that target type")
|
||||||
private List<MgmtDistributionSetTypeAssignment> compatibledistributionsettypes;
|
private List<MgmtDistributionSetTypeAssignment> 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<MgmtDistributionSetTypeAssignment> getCompatibleDsTypes() {
|
|
||||||
return compatibledistributionsettypes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param compatibleDsTypes
|
|
||||||
* the compatible ds types to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtTargetTypeRequestBodyPost setCompatibleDsTypes(
|
|
||||||
final List<MgmtDistributionSetTypeAssignment> compatibleDsTypes) {
|
|
||||||
this.compatibledistributionsettypes = compatibleDsTypes;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.targettype;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +20,7 @@ import lombok.experimental.Accessors;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ToString
|
||||||
public class MgmtTargetTypeRequestBodyPut {
|
public class MgmtTargetTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public final class MgmtTargetTypeMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Collection<Long> getDistributionSets(final MgmtTargetTypeRequestBodyPost targetTypesRest) {
|
private static Collection<Long> getDistributionSets(final MgmtTargetTypeRequestBodyPost targetTypesRest) {
|
||||||
return Optional.ofNullable(targetTypesRest.getCompatibleDsTypes())
|
return Optional.ofNullable(targetTypesRest.getCompatibledistributionsettypes())
|
||||||
.map(ds -> ds.stream().map(MgmtDistributionSetTypeAssignment::getId).collect(Collectors.toList()))
|
.map(ds -> ds.stream().map(MgmtDistributionSetTypeAssignment::getId).collect(Collectors.toList()))
|
||||||
.orElse(Collections.emptyList());
|
.orElse(Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user