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.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<MgmtBaseEntity> {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 <T>
|
||||
* the type of elements in this list
|
||||
*
|
||||
* @param <T> 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<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}
|
||||
* .
|
||||
*
|
||||
* @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<T> content, @JsonProperty("total") final long total) {
|
||||
@@ -58,23 +61,4 @@ public class PagedList<T> extends RepresentationModel<PagedList<T>> {
|
||||
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<T> getContent() {
|
||||
return Collections.unmodifiableList(content);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<MgmtSystemTenantServiceUsage> tenantStats;
|
||||
}
|
||||
@@ -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<String, String> usageData;
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<MgmtDistributionSet> assignedDistributionSets;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Unassigned distribution sets")
|
||||
private List<MgmtDistributionSet> unassignedDistributionSets;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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<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 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)
|
||||
|
||||
Reference in New Issue
Block a user