REST doc / Mgmt DS - fix missed info (#1621)
When spring restdoc was replaces with swagger & open api some info was lost This commit returns back this info for Mgmt API - DistributionSets Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -14,68 +14,29 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request body for maintenance window PUT/POST commands, based on a schedule
|
* Request body for maintenance window PUT/POST commands, based on a schedule
|
||||||
* defined as cron expression, duration in HH:mm:ss format and time zone as
|
* defined as cron expression, duration in HH:mm:ss format and time zone as
|
||||||
* offset from UTC.
|
* offset from UTC.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtMaintenanceWindowRequestBody {
|
public class MgmtMaintenanceWindowRequestBody {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "10 12 14 3 8 ? 2023")
|
@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;
|
private String schedule;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "00:10:00")
|
@Schema(description = "Duration of the window, such as '02:00:00' for 2 hours", example = "00:10:00")
|
||||||
private String duration;
|
private String duration;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "+00:00")
|
@Schema(description = "A time-zone offset from Greenwich/UTC, such as '+02:00'", example = "+00:00")
|
||||||
private String timezone;
|
private String timezone;
|
||||||
|
|
||||||
public String getSchedule() {
|
|
||||||
return schedule;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param schedule
|
|
||||||
* is the cron expression to be used for scheduling maintenance
|
|
||||||
* window(s). Expression has 6 mandatory fields and a last
|
|
||||||
* optional field: "second minute hour dayofmonth month weekday
|
|
||||||
* year".
|
|
||||||
*/
|
|
||||||
public void setSchedule(final String schedule) {
|
|
||||||
this.schedule = schedule;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDuration() {
|
|
||||||
return duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param duration
|
|
||||||
* in HH:mm:ss format specifying the duration of a maintenance
|
|
||||||
* window, for example 00:30:00 for 30 minutes.
|
|
||||||
*/
|
|
||||||
public void setDuration(final String duration) {
|
|
||||||
this.duration = duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTimezone() {
|
|
||||||
return timezone;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param timezone
|
|
||||||
* is the time zone specified as +/-hh:mm offset from UTC. For
|
|
||||||
* example +02:00 for CET summer time and +00:00 for UTC. The
|
|
||||||
* start time of a maintenance window calculated based on the
|
|
||||||
* cron expression is relative to this time zone.
|
|
||||||
*/
|
|
||||||
public void setTimezone(final String timezone) {
|
|
||||||
this.timezone = timezone;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -14,35 +14,20 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The representation of an meta data in the REST API for POST/Create.
|
* The representation of an meta data in the REST API for POST/Create.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtMetadata {
|
public class MgmtMetadata {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "someKnownKey")
|
@Schema(description = "Metadata property key", example = "someKnownKey")
|
||||||
private String key;
|
private String key;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "someKnownKeyValue")
|
@Schema(description = "Metadata property value", example = "someKnownKeyValue")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
public String getKey() {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setKey(final String key) {
|
|
||||||
this.key = key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(final String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,7 @@ import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -33,9 +34,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@Schema(description = """
|
||||||
|
{
|
||||||
|
"id" : 13,
|
||||||
|
"_links" : {
|
||||||
|
"self" : {
|
||||||
|
"href" : "https://management-api.host.com/rest/v1/targets/target2/actions/13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}""")
|
||||||
public class MgmtActionId extends RepresentationModel<MgmtActionId> {
|
public class MgmtActionId extends RepresentationModel<MgmtActionId> {
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
|
@Schema(description = "ID of the action")
|
||||||
private long actionId;
|
private long actionId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
|
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
@@ -32,32 +31,75 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@Schema(example = """
|
||||||
|
{
|
||||||
|
"createdBy" : "bumlux",
|
||||||
|
"createdAt" : 1682408575642,
|
||||||
|
"lastModifiedBy" : "bumlux",
|
||||||
|
"lastModifiedAt" : 1682408575643,
|
||||||
|
"name" : "DS",
|
||||||
|
"description" : "Updated Desc: 2LaONizh7WZp0on6XEOZI9AwEYIjj77YZskEmA2LVrKtAOXj9vvqACopEghLMqt6DIWpIahn6XM4jUlRZ1T5SZS2NWMuWHGoFIg1",
|
||||||
|
"version" : "1.0",
|
||||||
|
"modules" : [ {
|
||||||
|
"createdBy" : "bumlux",
|
||||||
|
"createdAt" : 1682408575640,
|
||||||
|
"lastModifiedBy" : "bumlux",
|
||||||
|
"lastModifiedAt" : 1682408575644,
|
||||||
|
"name" : "Firmware",
|
||||||
|
"description" : "Updated Desc: 2LaONizh7WZp0on6XEOZI9AwEYIjj77YZskEmA2LVrKtAOXj9vvqACopEghLMqt6DIWpIahn6XM4jUlRZ1T5SZS2NWMuWHGoFIg1",
|
||||||
|
"version" : "1.0.5",
|
||||||
|
"type" : "os",
|
||||||
|
"typeName" : "OS",
|
||||||
|
"vendor" : "vendor Limited Inc, California",
|
||||||
|
"deleted" : false,
|
||||||
|
"encrypted" : false,
|
||||||
|
"_links" : {
|
||||||
|
"self" : {
|
||||||
|
"href" : "https://management-api.host.com/rest/v1/softwaremodules/76"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id" : 76
|
||||||
|
}""")
|
||||||
public class MgmtDistributionSet extends MgmtNamedEntity {
|
public class MgmtDistributionSet extends MgmtNamedEntity {
|
||||||
|
|
||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "51")
|
@Schema(description = "The technical identifier of the entity", example = "51")
|
||||||
private Long dsId;
|
private Long dsId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1.4.2")
|
@Schema(description = "Package version", example = "1.4.2")
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
|
@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
|
||||||
|
@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 = "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
|
@JsonProperty
|
||||||
private List<MgmtSoftwareModule> modules = new ArrayList<>();
|
private List<MgmtSoftwareModule> modules = new ArrayList<>();
|
||||||
@JsonProperty
|
|
||||||
@Schema(example = "false")
|
|
||||||
private boolean requiredMigrationStep;
|
|
||||||
@JsonProperty
|
|
||||||
@Schema(example = "test_default_ds_type")
|
|
||||||
private String type;
|
|
||||||
@JsonProperty
|
|
||||||
@Schema(example = "OS (FW) mandatory, runtime (FW) and app (SW) optional")
|
|
||||||
private String typeName;
|
|
||||||
@JsonProperty
|
|
||||||
@Schema(example = "true")
|
|
||||||
private Boolean complete;
|
|
||||||
@JsonProperty
|
|
||||||
@Schema(example = "false")
|
|
||||||
private boolean deleted;
|
|
||||||
@JsonProperty
|
|
||||||
@Schema(example = "true")
|
|
||||||
private boolean valid;
|
|
||||||
}
|
}
|
||||||
@@ -47,6 +47,6 @@ public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetReque
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtSoftwareModuleAssigment> modules;
|
private List<MgmtSoftwareModuleAssigment> modules;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "test_default_ds_type")
|
@Schema(description = "The type of the distribution set", example = "test_default_ds_type")
|
||||||
private String type;
|
private String type;
|
||||||
}
|
}
|
||||||
@@ -27,15 +27,17 @@ import lombok.experimental.Accessors;
|
|||||||
public class MgmtDistributionSetRequestBodyPut {
|
public class MgmtDistributionSetRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "dsOne")
|
@Schema(description = "The name of the entity", example = "dsOne")
|
||||||
private String name;
|
private String name;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Description of the distribution set.")
|
@Schema(description = "The description of the entity", example = "Description of the distribution set.")
|
||||||
private String description;
|
private String description;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1.0.0")
|
@Schema(description = "Package version", example = "1.0.0")
|
||||||
private String version;
|
private String version;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@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;
|
private Boolean requiredMigrationStep;
|
||||||
}
|
}
|
||||||
@@ -25,8 +25,9 @@ public class MgmtInvalidateDistributionSetRequestBody {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
@Schema(description = "Type of cancelation for actions referring to the given distribution set")
|
||||||
private MgmtCancelationType actionCancelationType;
|
private MgmtCancelationType actionCancelationType;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "true")
|
@Schema(description = "Defines if rollouts referring to this distribution set should be canceled", example = "true")
|
||||||
private boolean cancelRollouts;
|
private boolean cancelRollouts;
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody;
|
||||||
@@ -25,11 +26,18 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTargetAssignmentRequestBody {
|
public class MgmtTargetAssignmentRequestBody {
|
||||||
|
|
||||||
|
@Schema(description = "The technical identifier of the entity", example = "target4")
|
||||||
private String id;
|
private String id;
|
||||||
|
@Schema(description = "Forcetime in milliseconds", example = "1682408575278")
|
||||||
private long forcetime;
|
private long forcetime;
|
||||||
|
@Schema(description = "The type of the assignment")
|
||||||
private MgmtActionType type;
|
private MgmtActionType type;
|
||||||
|
@Schema(description = "Separation of download and install by defining a maintenance window for the installation")
|
||||||
private MgmtMaintenanceWindowRequestBody maintenanceWindow;
|
private MgmtMaintenanceWindowRequestBody maintenanceWindow;
|
||||||
|
@Schema(description = "Importance of the assignment. Allowed values: 0 - 1000", example = "100")
|
||||||
private Integer weight;
|
private Integer weight;
|
||||||
|
@Schema(description = "(Available with user consent flow active) Defines, if the confirmation is required for " +
|
||||||
|
"an action. Confirmation is required per default")
|
||||||
private Boolean confirmationRequired;
|
private Boolean confirmationRequired;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
@@ -29,7 +30,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTargetAssignmentResponseBody extends RepresentationModel<MgmtTargetAssignmentResponseBody> {
|
public class MgmtTargetAssignmentResponseBody extends RepresentationModel<MgmtTargetAssignmentResponseBody> {
|
||||||
|
|
||||||
|
@Schema(description = """
|
||||||
|
Targets that had this distribution set already assigned (in "offline" case this includes
|
||||||
|
targets that have arbitrary updates running)""")
|
||||||
private int alreadyAssigned;
|
private int alreadyAssigned;
|
||||||
|
@Schema(description = "The newly created actions as a result of this assignment")
|
||||||
private List<MgmtActionId> assignedActions;
|
private List<MgmtActionId> assignedActions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
@@ -30,23 +29,23 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
public class MgmtSoftwareModule extends MgmtNamedEntity {
|
public class MgmtSoftwareModule extends MgmtNamedEntity {
|
||||||
|
|
||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "6")
|
@Schema(description = "The technical identifier of the entity", example = "6")
|
||||||
private Long moduleId;
|
private Long moduleId;
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "1.0.0")
|
@Schema(description = "Package version", example = "1.0.0")
|
||||||
private String version;
|
private String version;
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "os")
|
@Schema(description = "The software module type of the entity", example = "os")
|
||||||
private String type;
|
private String type;
|
||||||
@Schema(example = "OS")
|
@Schema(description = "The software module type name of the entity", example = "OS")
|
||||||
private String typeName;
|
private String typeName;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Vendor Limited, California")
|
@Schema(description = "The software vendor", example = "Vendor Limited, California")
|
||||||
private String vendor;
|
private String vendor;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(description = "If the software module is deleted", example = "false")
|
||||||
private boolean deleted;
|
private boolean deleted;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(description = "If the software module is encrypted", example = "false")
|
||||||
private boolean encrypted;
|
private boolean encrypted;
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.mgmt.json.model.target;
|
package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@@ -12,7 +10,6 @@ import lombok.ToString;
|
|||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
@@ -25,42 +22,60 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@Schema(example = """
|
||||||
|
{
|
||||||
|
"createdBy" : "bumlux",
|
||||||
|
"createdAt" : 1682408574854,
|
||||||
|
"lastModifiedBy" : "bumlux",
|
||||||
|
"lastModifiedAt" : 1682408574863,
|
||||||
|
"name" : "targetExist",
|
||||||
|
"controllerId" : "targetExist",
|
||||||
|
"updateStatus" : "pending",
|
||||||
|
"securityToken" : "f1e3d34db13038900b7158e62a6582c8",
|
||||||
|
"requestAttributes" : true,
|
||||||
|
"_links" : {
|
||||||
|
"self" : {
|
||||||
|
"href" : "https://management-api.host.com/rest/v1/targets/targetExist"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}""")
|
||||||
public class MgmtTarget extends MgmtNamedEntity {
|
public class MgmtTarget extends MgmtNamedEntity {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "123")
|
@Schema(description = "Controller Id", example = "123")
|
||||||
private String controllerId;
|
private String controllerId;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "in_sync")
|
@Schema(description = "If the target is in sync", example = "in_sync")
|
||||||
private String updateStatus;
|
private String updateStatus;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065941102")
|
@Schema(description = "Timestamp of the last controller request", example = "1691065941102")
|
||||||
private Long lastControllerRequestAt;
|
private Long lastControllerRequestAt;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065941155")
|
@Schema(description = "Install timestamp", example = "1691065941155")
|
||||||
private Long installedAt;
|
private Long installedAt;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "192.168.0.1")
|
@Schema(description = "Target IP address", example = "192.168.0.1")
|
||||||
private String ipAddress;
|
private String ipAddress;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "http://192.168.0.1")
|
@Schema(description = "Target address", example = "http://192.168.0.1")
|
||||||
private String address;
|
private String address;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
@Schema(description = "Poll status")
|
||||||
private MgmtPollStatus pollStatus;
|
private MgmtPollStatus pollStatus;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "38e6a19932b014040ba061795186514e")
|
@Schema(description = "Security token", example = "38e6a19932b014040ba061795186514e")
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private String securityToken;
|
private String securityToken;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "true")
|
@Schema(description = "Request attributes", example = "true")
|
||||||
private boolean requestAttributes;
|
private boolean requestAttributes;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "19")
|
@Schema(description = "Target type id", example = "19")
|
||||||
private Long targetType;
|
private Long targetType;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "defaultType")
|
@Schema(description = "Target type name", example = "defaultType")
|
||||||
private String targetTypeName;
|
private String targetTypeName;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(description = "If the auto confirm is active", example = "false")
|
||||||
private Boolean autoConfirmActive;
|
private Boolean autoConfirmActive;
|
||||||
}
|
}
|
||||||
@@ -27,25 +27,51 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.ALWAYS)
|
@JsonInclude(Include.ALWAYS)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@Schema(example = """
|
||||||
|
{
|
||||||
|
"createdBy" : "bumlux",
|
||||||
|
"createdAt" : 1682408575234,
|
||||||
|
"lastModifiedBy" : "bumlux",
|
||||||
|
"lastModifiedAt" : 1682408575234,
|
||||||
|
"name" : "filter1",
|
||||||
|
"query" : "name==a",
|
||||||
|
"autoAssignDistributionSet" : 16,
|
||||||
|
"autoAssignActionType" : null,
|
||||||
|
"autoAssignWeight" : null,
|
||||||
|
"confirmationRequired" : null,
|
||||||
|
"_links" : {
|
||||||
|
"self" : {
|
||||||
|
"href" : "https://management-api.host.com/rest/v1/targetfilters/2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id" : 2
|
||||||
|
}""")
|
||||||
public class MgmtTargetFilterQuery extends MgmtBaseEntity {
|
public class MgmtTargetFilterQuery extends MgmtBaseEntity {
|
||||||
|
|
||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "2")
|
@Schema(example = "2")
|
||||||
private Long filterId;
|
private Long filterId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "filterName")
|
@Schema(example = "filterName")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "name==*")
|
@Schema(example = "name==*")
|
||||||
private String query;
|
private String query;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "15")
|
@Schema(example = "15")
|
||||||
|
|
||||||
private Long autoAssignDistributionSet;
|
private Long autoAssignDistributionSet;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private MgmtActionType autoAssignActionType;
|
private MgmtActionType autoAssignActionType;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "")
|
@Schema(example = "")
|
||||||
private Integer autoAssignWeight;
|
private Integer autoAssignWeight;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private Boolean confirmationRequired;
|
private Boolean confirmationRequired;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user