Remove unnecessary JsonProperty annotations (#2296)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -9,14 +9,11 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
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.springframework.hateoas.Link;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
/**
|
||||
@@ -28,34 +25,20 @@ import org.springframework.hateoas.RepresentationModel;
|
||||
@ToString(callSuper = true)
|
||||
public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity> {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Entity was originally created by (User, AMQP-Controller, anonymous etc.)",
|
||||
accessMode = Schema.AccessMode.READ_ONLY, example = "bumlux")
|
||||
private String createdBy;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Entity was originally created at (timestamp UTC in milliseconds)",
|
||||
accessMode = Schema.AccessMode.READ_ONLY, example = "1691065905897")
|
||||
private Long createdAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Entity was last modified by (User, AMQP-Controller, anonymous etc.)",
|
||||
accessMode = Schema.AccessMode.READ_ONLY, example = "bumlux")
|
||||
private String lastModifiedBy;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Entity was last modified at (timestamp UTC in milliseconds)",
|
||||
accessMode = Schema.AccessMode.READ_ONLY, example = "1691065906407")
|
||||
@EqualsAndHashCode.Exclude
|
||||
private Long lastModifiedAt;
|
||||
|
||||
/**
|
||||
* Added for backwards compatibility
|
||||
*
|
||||
* @return the unique identifier of the {@link MgmtBaseEntity}.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public Link getId() {
|
||||
return this.getRequiredLink("self");
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import java.util.concurrent.TimeUnit;
|
||||
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;
|
||||
@@ -34,6 +33,5 @@ public class MgmtMaintenanceWindow extends MgmtMaintenanceWindowRequestBody {
|
||||
/**
|
||||
* Time in {@link TimeUnit#MILLISECONDS} of the next maintenance window start
|
||||
*/
|
||||
@JsonProperty
|
||||
private long nextStartAt;
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
@@ -30,17 +29,14 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtMaintenanceWindowRequestBody {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
Schedule for the maintenance window start in quartz cron notation, such as '0 15 10 * * ? 2018'
|
||||
for 10:15am every day during the year 2018""", example = "10 12 14 3 8 ? 2023")
|
||||
private String schedule;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Duration of the window, such as '02:00:00' for 2 hours", example = "00:10:00")
|
||||
private String duration;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "A time-zone offset from Greenwich/UTC, such as '+02:00'", example = "+00:00")
|
||||
private String timezone;
|
||||
}
|
||||
@@ -32,7 +32,6 @@ public class MgmtMetadata {
|
||||
@Schema(description = "Metadata property key", example = "someKnownKey")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Metadata property value", example = "someKnownKeyValue")
|
||||
private String value;
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
@@ -28,7 +27,6 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtMetadataBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "someValue")
|
||||
private String value;
|
||||
}
|
||||
@@ -29,7 +29,6 @@ public abstract class MgmtNamedEntity extends MgmtBaseEntity {
|
||||
@Schema(example = "Name of entity")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Description of entity")
|
||||
private String description;
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
@@ -28,15 +27,12 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtPollStatus {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065941102")
|
||||
private Long lastRequestAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691109141102")
|
||||
private Long nextExpectedRequestAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean overdue;
|
||||
}
|
||||
@@ -29,12 +29,10 @@ public abstract class MgmtTypeEntity extends MgmtNamedEntity {
|
||||
@Schema(description = "Key that can be interpreted by the target", example = "id.t23")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Colour assigned to the entity that could be used for representation purposes",
|
||||
example = "brown")
|
||||
private String colour;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Deleted flag, used for soft deleted entities", example = "false")
|
||||
private boolean deleted;
|
||||
}
|
||||
|
||||
@@ -39,12 +39,8 @@ import org.springframework.hateoas.RepresentationModel;
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
public class PagedList<T> extends RepresentationModel<PagedList<T>> {
|
||||
|
||||
@JsonProperty
|
||||
private final List<T> content;
|
||||
|
||||
@JsonProperty
|
||||
private final long total;
|
||||
|
||||
private final int size;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model.action;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -84,52 +83,33 @@ public class MgmtAction extends MgmtBaseEntity {
|
||||
*/
|
||||
public static final String ACTION_PENDING = "pending";
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "ID of the action", example = "7")
|
||||
private Long actionId;
|
||||
|
||||
@JsonProperty
|
||||
private Long id;
|
||||
@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;
|
||||
private MgmtActionType forceType;
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.action;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -23,6 +22,5 @@ import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
@ToString
|
||||
public class MgmtActionRequestBodyPut {
|
||||
|
||||
@JsonProperty(value = "forceType")
|
||||
private MgmtActionType actionType;
|
||||
private MgmtActionType forceType;
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import java.util.List;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -28,26 +27,20 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtActionStatus {
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(example = "21")
|
||||
private Long statusId;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "running")
|
||||
private String type;
|
||||
|
||||
@JsonProperty
|
||||
private List<String> messages;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065929524")
|
||||
private Long reportedAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065929524")
|
||||
private Long timestamp;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "200")
|
||||
private Integer code;
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model.artifact;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -57,18 +56,14 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
||||
}""")
|
||||
public class MgmtArtifact extends MgmtBaseEntity {
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "Artifact id", example = "3")
|
||||
private Long artifactId;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty
|
||||
private MgmtArtifactHash hashes;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "file1")
|
||||
private String providedFilename;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Size of the artifact", example = "3")
|
||||
private Long size;
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.artifact;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
@@ -25,15 +24,10 @@ import lombok.ToString;
|
||||
@ToString
|
||||
public class MgmtArtifactHash {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "SHA1 hash of the artifact", example = "2d86c2a659e364e9abba49ea6ffcd53dd5559f05")
|
||||
private String sha1;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "MD5 hash of the artifact.", example = "0d1b08c34858921bc7c662b228acb7ba")
|
||||
private String md5;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "SHA256 hash of the artifact", example = "a03b221c6c6eae7122ca51695d456d5222e524889136394944b2f9763b483615")
|
||||
private String sha256;
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -46,18 +45,17 @@ import org.springframework.hateoas.RepresentationModel;
|
||||
}""")
|
||||
public class MgmtActionId extends RepresentationModel<MgmtActionId> {
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(description = "ID of the action")
|
||||
private long actionId;
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param actionId the actionId
|
||||
* @param controllerId the controller Id
|
||||
* @param id the actionId
|
||||
*/
|
||||
public MgmtActionId(final String controllerId, final long actionId) {
|
||||
this.actionId = actionId;
|
||||
add(linkTo(methodOn(MgmtTargetRestApi.class).getAction(controllerId, actionId)).withSelfRel().expand());
|
||||
public MgmtActionId(final String controllerId, final long id) {
|
||||
this.id = id;
|
||||
add(linkTo(methodOn(MgmtTargetRestApi.class).getAction(controllerId, id)).withSelfRel().expand());
|
||||
}
|
||||
}
|
||||
@@ -133,47 +133,38 @@ import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
|
||||
}""")
|
||||
public class MgmtDistributionSet extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The technical identifier of the entity", example = "51")
|
||||
private Long dsId;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Package version", example = "1.4.2")
|
||||
private String version;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The type of the distribution set", example = "test_default_ds_type")
|
||||
private String type;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The type name of the distribution set",
|
||||
example = "OS (FW) mandatory, runtime (FW) and app (SW) optional")
|
||||
private String typeName;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
True of the distribution set software module setup is complete as defined by the
|
||||
distribution set type""", example = "true")
|
||||
private Boolean complete;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "If the distribution set is locked", example = "true")
|
||||
private boolean locked;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Deleted flag, used for soft deleted entities", example = "false")
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "True by default and false after the distribution set is invalidated by the user", example = "true")
|
||||
private boolean valid;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
True if DS is a required migration step for another DS. As a result the DS’s assignment will not be cancelled
|
||||
when another DS is assigned (note: updatable only if DS is not yet assigned to a target)""", example = "false")
|
||||
private boolean requiredMigrationStep;
|
||||
|
||||
@JsonProperty
|
||||
private List<MgmtSoftwareModule> modules = new ArrayList<>();
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import java.util.List;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -34,23 +33,18 @@ import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssi
|
||||
public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetRequestBodyPut {
|
||||
|
||||
// deprecated format from the times where os, application and runtime where statically defined
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssignment os;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssignment runtime;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssignment application;
|
||||
// deprecated format - END
|
||||
|
||||
@JsonProperty
|
||||
private List<MgmtSoftwareModuleAssignment> modules;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The type of the distribution set", example = "test_default_ds_type")
|
||||
private String type;
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -26,19 +25,15 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtDistributionSetRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The name of the entity", example = "dsOne")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The description of the entity", example = "Description of the distribution set.")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Package version", example = "1.0.0")
|
||||
private String version;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
Should be set only if change of locked state is requested. If put, the distribution set locked flag will be
|
||||
set to the requested. Note: unlock (i.e. set this property to false) with extreme care!
|
||||
@@ -47,7 +42,6 @@ public class MgmtDistributionSetRequestBodyPut {
|
||||
example = "true")
|
||||
private Boolean locked;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
True if DS is a required migration step for another DS. As a result the DS’s assignment will not be cancelled
|
||||
when another DS is assigned (note: updatable only if DS is not yet assigned to a target)""", example = "false")
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
@@ -32,13 +31,12 @@ public class MgmtDistributionSetStatistics {
|
||||
|
||||
private static final String TOTAL = "total";
|
||||
|
||||
@JsonProperty("actions")
|
||||
private Map<String, Long> totalActionsPerStatus;
|
||||
// totalActionsPerStatus
|
||||
private Map<String, Long> actions;
|
||||
|
||||
@JsonProperty("rollouts")
|
||||
private Map<String, Long> totalRolloutsPerStatus;
|
||||
// totalRolloutsPerStatus
|
||||
private Map<String, Long> rollouts;
|
||||
|
||||
@JsonProperty
|
||||
private Long totalAutoAssignments;
|
||||
|
||||
public static class Builder {
|
||||
@@ -71,8 +69,8 @@ public class MgmtDistributionSetStatistics {
|
||||
|
||||
public MgmtDistributionSetStatistics build() {
|
||||
MgmtDistributionSetStatistics statistics = new MgmtDistributionSetStatistics();
|
||||
statistics.totalActionsPerStatus = calculateTotalWithStatus(totalActionsPerStatus);
|
||||
statistics.totalRolloutsPerStatus = calculateTotalWithStatus(totalRolloutsPerStatus);
|
||||
statistics.actions = calculateTotalWithStatus(totalActionsPerStatus);
|
||||
statistics.rollouts = calculateTotalWithStatus(totalRolloutsPerStatus);
|
||||
statistics.totalAutoAssignments = calculateTotalAutoAssignments();
|
||||
return statistics;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -24,11 +23,9 @@ import lombok.experimental.Accessors;
|
||||
public class MgmtInvalidateDistributionSetRequestBody {
|
||||
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
@Schema(description = "Type of cancelation for actions referring to the given distribution set")
|
||||
private MgmtCancelationType actionCancelationType;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Defines if rollouts referring to this distribution set should be canceled", example = "true")
|
||||
private boolean cancelRollouts;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ import org.springframework.hateoas.RepresentationModel;
|
||||
public class MgmtTargetAssignmentResponseBody extends RepresentationModel<MgmtTargetAssignmentResponseBody> {
|
||||
|
||||
@Schema(description = """
|
||||
Targets that had this distribution set already assigned (in "offline" case this includes
|
||||
Targets that had this distribution already assigned (in "offline" case this includes
|
||||
targets that have arbitrary updates running)""")
|
||||
private int alreadyAssigned;
|
||||
|
||||
@@ -44,6 +44,7 @@ public class MgmtTargetAssignmentResponseBody extends RepresentationModel<MgmtTa
|
||||
/**
|
||||
* @return the count of assigned targets
|
||||
*/
|
||||
@Schema(description = "Targets that had this distribution set really assigned excluding already assigned")
|
||||
@JsonProperty("assigned")
|
||||
public int getAssigned() {
|
||||
return assignedActions == null ? 0 : assignedActions.size();
|
||||
@@ -52,6 +53,7 @@ public class MgmtTargetAssignmentResponseBody extends RepresentationModel<MgmtTa
|
||||
/**
|
||||
* @return the total
|
||||
*/
|
||||
@Schema(description = "Total targets")
|
||||
@JsonProperty("total")
|
||||
public int getTotal() {
|
||||
return getAssigned() + alreadyAssigned;
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||
}""")
|
||||
public class MgmtDistributionSetType extends MgmtTypeEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The technical identifier of the entity", example = "99")
|
||||
private Long moduleId;
|
||||
private Long id;
|
||||
}
|
||||
@@ -36,11 +36,9 @@ public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetT
|
||||
@Schema(description = "Functional key of the distribution set type", example = "Example key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Mandatory module type IDs")
|
||||
private List<MgmtSoftwareModuleTypeAssignment> mandatorymodules;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Optional module type IDs")
|
||||
private List<MgmtSoftwareModuleTypeAssignment> optionalmodules;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -23,11 +22,9 @@ import lombok.experimental.Accessors;
|
||||
@ToString
|
||||
public class MgmtDistributionSetTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The description of the entity", example = "Example description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The colour of the entity", example = "rgb(86,37,99)")
|
||||
private String colour;
|
||||
}
|
||||
@@ -101,16 +101,16 @@ import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
}""")
|
||||
public class MgmtRolloutResponseBody extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "Rollout id", example = "2")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "Target filter query language expression", example = "controllerId==exampleTarget*")
|
||||
private String targetFilterQuery;
|
||||
|
||||
@Schema(description = "The ID of distribution set of this rollout", example = "2")
|
||||
private Long distributionSetId;
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(description = "Rollout id", example = "2")
|
||||
private Long rolloutId;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The status of this rollout", example = "ready")
|
||||
private String status;
|
||||
@@ -120,43 +120,33 @@ public class MgmtRolloutResponseBody extends MgmtNamedEntity {
|
||||
private Long totalTargets;
|
||||
|
||||
@Setter(AccessLevel.NONE)
|
||||
@JsonProperty
|
||||
@Schema(description = "The total targets per status")
|
||||
private Map<String, Long> totalTargetsPerStatus;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The total number of groups created by this rollout", example = "5")
|
||||
private Integer totalGroups;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Start at timestamp of Rollout", example = "1691065753136")
|
||||
private Long startAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Forcetime in milliseconds", example = "1691065762496")
|
||||
private Long forcetime;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Deleted flag, used for soft deleted entities", example = "false")
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The type of this rollout")
|
||||
private MgmtActionType type;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Weight of the resulting Actions", example = "400")
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "If this rollout is dynamic or static", example = "true")
|
||||
private boolean dynamic;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Approved remark.")
|
||||
private String approvalRemark;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "exampleUsername")
|
||||
private String approveDecidedBy;
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import java.util.List;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -79,19 +78,15 @@ public class MgmtRolloutRestRequestBodyPost extends AbstractMgmtRolloutCondition
|
||||
@Schema(description = "Start at timestamp of Rollout", example = "1691065780929")
|
||||
private Long startAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Weight of the resulting Actions", example = "400")
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private boolean dynamic;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Template for dynamic groups (only if dynamic flag is true)")
|
||||
private MgmtDynamicRolloutGroupTemplate dynamicGroupTemplate;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
(Available with user consent flow active) If the confirmation is required for this rollout. Value will be used
|
||||
if confirmation options are missing in the rollout group definitions. Confirmation is required per default""",
|
||||
|
||||
@@ -80,14 +80,13 @@ import lombok.experimental.Accessors;
|
||||
}""")
|
||||
public class MgmtRolloutGroupResponseBody extends MgmtRolloutGroup {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "Rollouts id", example = "63")
|
||||
private Long rolloutGroupId;
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "If the rollout group is dynamic", example = "false")
|
||||
private boolean dynamic;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The status of this rollout", example = "ready")
|
||||
private String status;
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
}""")
|
||||
public class MgmtSoftwareModule extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The technical identifier of the entity", example = "6")
|
||||
private Long moduleId;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "Package version", example = "1.0.0")
|
||||
@@ -82,19 +82,15 @@ public class MgmtSoftwareModule extends MgmtNamedEntity {
|
||||
@Schema(description = "The software module type name of the entity", example = "OS")
|
||||
private String typeName;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The software vendor", example = "Vendor Limited, California")
|
||||
private String vendor;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "If the software module is encrypted", example = "false")
|
||||
private boolean encrypted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "If the software module is locked", example = "true")
|
||||
private boolean locked;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "If the software module is deleted", example = "false")
|
||||
private boolean deleted;
|
||||
}
|
||||
@@ -32,12 +32,9 @@ public class MgmtSoftwareModuleMetadata {
|
||||
@Schema(description = "Metadata property key", example = "someKnownKey")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Metadata property value", example = "someKnownValue")
|
||||
private String value;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Metadata property is visible to targets as part of software update action",
|
||||
example = "false")
|
||||
@Schema(description = "Metadata property is visible to targets as part of software update action", example = "false")
|
||||
private boolean targetVisible;
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
@@ -28,11 +27,9 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtSoftwareModuleMetadataBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "newValue")
|
||||
private String value;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private Boolean targetVisible;
|
||||
}
|
||||
@@ -35,15 +35,12 @@ public class MgmtSoftwareModuleRequestBodyPost {
|
||||
@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;
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -23,15 +22,12 @@ import lombok.experimental.Accessors;
|
||||
@ToString
|
||||
public class MgmtSoftwareModuleRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "SM Description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "SM Vendor Name")
|
||||
private String vendor;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
Should be set only if change of locked state is requested. If put, the software module locked flag will be
|
||||
set to the requested. Note: unlock (i.e. set this property to false) with extreme care!
|
||||
|
||||
@@ -50,11 +50,10 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||
}""")
|
||||
public class MgmtSoftwareModuleType extends MgmtTypeEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The technical identifier of the entity", example = "83")
|
||||
private Long moduleId;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Software modules of that type can be assigned at this maximum number " +
|
||||
"(e.g. operating system only once)", example = "1")
|
||||
private int maxAssignments;
|
||||
|
||||
@@ -33,7 +33,6 @@ public class MgmtSoftwareModuleTypeRequestBodyPost extends MgmtSoftwareModuleTyp
|
||||
@Schema(example = "Example key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1")
|
||||
private int maxAssignments;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -23,11 +22,9 @@ import lombok.experimental.Accessors;
|
||||
@ToString
|
||||
public class MgmtSoftwareModuleTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Example description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rgb(0,0,255")
|
||||
private String colour;
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import java.util.List;
|
||||
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.experimental.Accessors;
|
||||
|
||||
@@ -27,21 +26,15 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
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;
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import java.util.Map;
|
||||
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.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -29,21 +28,15 @@ import lombok.experimental.Accessors;
|
||||
@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;
|
||||
}
|
||||
@@ -53,11 +53,10 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
}""")
|
||||
public class MgmtTag extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The technical identifier of the entity", example = "2")
|
||||
private Long tagId;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The colour of the entity", example = "red")
|
||||
private String colour;
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.mgmt.json.model.tag;
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
@@ -28,15 +27,12 @@ import lombok.experimental.Accessors;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtTagRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The name of the entity", example = "Example name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The description of the entity", example = "Example description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The colour of the entity", example = "rgb(0,255,0)")
|
||||
private String colour;
|
||||
}
|
||||
}
|
||||
@@ -26,11 +26,9 @@ public class MgmtDistributionSetAssignment extends MgmtId {
|
||||
@Schema(description = "Forcetime in milliseconds", example = "1691065930359")
|
||||
private long forcetime;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Importance of the assignment", example = "23")
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = """
|
||||
(Available with user consent flow active) Specifies if the confirmation by the device
|
||||
is required for this action""", example = "false")
|
||||
|
||||
@@ -90,52 +90,41 @@ public class MgmtTarget extends MgmtNamedEntity {
|
||||
@Schema(description = "Controller ID", example = "123")
|
||||
private String controllerId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "If the target is in sync", example = "in_sync")
|
||||
private String updateStatus;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Timestamp of the last controller request", example = "1691065941102")
|
||||
private Long lastControllerRequestAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Install timestamp", example = "1691065941155")
|
||||
private Long installedAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Last known IP address of the target. Only presented if IP address of the target " +
|
||||
"itself is known (connected directly through DDI API)", example = "192.168.0.1")
|
||||
private String ipAddress;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The last known address URI of the target. Includes information of the target is " +
|
||||
"connected either directly (DDI) through HTTP or indirectly (DMF) through amqp.",
|
||||
example = "http://192.168.0.1")
|
||||
private String address;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Poll status")
|
||||
private MgmtPollStatus pollStatus;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Pre-Shared key that allows targets to authenticate at Direct Device Integration " +
|
||||
"API if enabled in the tenant settings", example = "38e6a19932b014040ba061795186514e")
|
||||
@ToString.Exclude
|
||||
private String securityToken;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Request re-transmission of target attributes", example = "true")
|
||||
private boolean requestAttributes;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "ID of the target type", example = "19")
|
||||
private Long targetType;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Name of the target type", example = "defaultType")
|
||||
private String targetTypeName;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Present if user consent flow active. Indicates if auto-confirm is active", example = "false")
|
||||
private Boolean autoConfirmActive;
|
||||
}
|
||||
@@ -24,11 +24,9 @@ import lombok.experimental.Accessors;
|
||||
@ToString
|
||||
public class MgmtTargetAutoConfirmUpdate {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "(Optional) Initiator set on activation", example = "custom_initiator_value")
|
||||
private final String initiator;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "(Optional) Remark set on activation", example = "custom_remark")
|
||||
private final String remark;
|
||||
|
||||
|
||||
@@ -28,22 +28,18 @@ public class MgmtTargetRequestBody {
|
||||
@Schema(description = "Controller ID", example = "123")
|
||||
private String controllerId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The last known address URI of the target. Includes information of the target is " +
|
||||
"connected either directly (DDI) through HTTP or indirectly (DMF) through amqp",
|
||||
example = "https://192.168.0.1")
|
||||
private String address;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Pre-Shared key that allows targets to authenticate at Direct Device Integration API if " +
|
||||
"enabled in the tenant settings", example = "2345678DGGDGFTDzztgf")
|
||||
private String securityToken;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Request re-transmission of target attributes", example = "true")
|
||||
private Boolean requestAttributes;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "ID of the target type", example = "10")
|
||||
private Long targetType;
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
@@ -27,12 +26,9 @@ import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
@ToString(callSuper = true)
|
||||
public class MgmtDistributionSetAutoAssignment extends MgmtId {
|
||||
|
||||
@JsonProperty
|
||||
private MgmtActionType type;
|
||||
|
||||
@JsonProperty
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty
|
||||
private Boolean confirmationRequired;
|
||||
}
|
||||
@@ -55,31 +55,25 @@ import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
}""")
|
||||
public class MgmtTargetFilterQuery extends MgmtBaseEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The technical identifier of the entity", example = "2")
|
||||
private Long filterId;
|
||||
private Long id;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The name of the entity", example = "filterName")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Target filter query expression", example = "name==*")
|
||||
private String query;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "15")
|
||||
private Long autoAssignDistributionSet;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Auto assign distribution set id")
|
||||
private MgmtActionType autoAssignActionType;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Weight of the resulting Actions", example = "600")
|
||||
private Integer autoAssignWeight;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "(Available with user consent flow active) Defines, if the confirmation is required for an " +
|
||||
"action. Confirmation is required per default.", example = "false")
|
||||
private Boolean confirmationRequired;
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||
}""")
|
||||
public class MgmtTargetType extends MgmtTypeEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@JsonProperty(required = true)
|
||||
@Schema(description = "The technical identifier of the entity", example = "26")
|
||||
private Long typeId;
|
||||
private Long id;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ package org.eclipse.hawkbit.mgmt.json.model.targettype;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -28,11 +27,9 @@ import org.eclipse.hawkbit.mgmt.json.model.distributionsettype.MgmtDistributionS
|
||||
@ToString(callSuper = true)
|
||||
public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Target type key", example = "id.t23")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Array of distribution set types that are compatible to that target type")
|
||||
private List<MgmtDistributionSetTypeAssignment> compatibledistributionsettypes;
|
||||
}
|
||||
@@ -27,11 +27,9 @@ public class MgmtTargetTypeRequestBodyPut {
|
||||
@Schema(description = "The name of the entity", example = "updatedTypeName")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The description of the entity", example = "an updated description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The colour of the entity", example = "#aaafff")
|
||||
private String colour;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user