Refactoring/Improving source: rest (lombok) (#1614)
Apply data to models Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -10,6 +10,8 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model;
|
package org.eclipse.hawkbit.mgmt.json.model;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.hateoas.Link;
|
import org.springframework.hateoas.Link;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
@@ -18,22 +20,20 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for BaseEntity to RESTful API representation.
|
* A json annotated rest model for BaseEntity to RESTful API representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity> {
|
public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity> {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "bumlux")
|
@Schema(example = "bumlux")
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065905897")
|
@Schema(example = "1691065905897")
|
||||||
private Long createdAt;
|
private Long createdAt;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "bumlux")
|
@Schema(example = "bumlux")
|
||||||
private String lastModifiedBy;
|
private String lastModifiedBy;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065906407")
|
@Schema(example = "1691065906407")
|
||||||
private Long lastModifiedAt;
|
private Long lastModifiedAt;
|
||||||
@@ -48,32 +48,13 @@ public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity>
|
|||||||
return this.getRequiredLink("self");
|
return this.getRequiredLink("self");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the createdBy
|
|
||||||
*/
|
|
||||||
public String getCreatedBy() {
|
|
||||||
return createdBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param createdBy
|
|
||||||
* the createdBy to set
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public void setCreatedBy(final String createdBy) {
|
public void setCreatedBy(final String createdBy) {
|
||||||
this.createdBy = createdBy;
|
this.createdBy = createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the createdAt
|
* @param createdAt the createdAt to set
|
||||||
*/
|
|
||||||
public Long getCreatedAt() {
|
|
||||||
return createdAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param createdAt
|
|
||||||
* the createdAt to set
|
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public void setCreatedAt(final Long createdAt) {
|
public void setCreatedAt(final Long createdAt) {
|
||||||
@@ -81,28 +62,13 @@ public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the lastModifiedBy
|
* @param lastModifiedBy the lastModifiedBy to set
|
||||||
*/
|
|
||||||
public String getLastModifiedBy() {
|
|
||||||
return lastModifiedBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param lastModifiedBy
|
|
||||||
* the lastModifiedBy to set
|
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public void setLastModifiedBy(final String lastModifiedBy) {
|
public void setLastModifiedBy(final String lastModifiedBy) {
|
||||||
this.lastModifiedBy = lastModifiedBy;
|
this.lastModifiedBy = lastModifiedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the lastModifiedAt
|
|
||||||
*/
|
|
||||||
public Long getLastModifiedAt() {
|
|
||||||
return lastModifiedAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param lastModifiedAt
|
* @param lastModifiedAt
|
||||||
* the lastModifiedAt to set
|
* the lastModifiedAt to set
|
||||||
@@ -111,4 +77,4 @@ public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity>
|
|||||||
public void setLastModifiedAt(final Long lastModifiedAt) {
|
public void setLastModifiedAt(final Long lastModifiedAt) {
|
||||||
this.lastModifiedAt = lastModifiedAt;
|
this.lastModifiedAt = lastModifiedAt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,49 +11,20 @@ package org.eclipse.hawkbit.mgmt.json.model;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for NamedEntity to RESTful API representation.
|
* A json annotated rest model for NamedEntity to RESTful API representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public abstract class MgmtNamedEntity extends MgmtBaseEntity {
|
public abstract class MgmtNamedEntity extends MgmtBaseEntity {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "Name of entity")
|
@Schema(example = "Name of entity")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Description of entity")
|
@Schema(example = "Description of entity")
|
||||||
private String description;
|
private String description;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param name
|
|
||||||
* the name to set
|
|
||||||
*/
|
|
||||||
public void setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the description
|
|
||||||
*/
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param description
|
|
||||||
* the description to set
|
|
||||||
*/
|
|
||||||
public void setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -35,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtActionId extends RepresentationModel<MgmtActionId> {
|
public class MgmtActionId extends RepresentationModel<MgmtActionId> {
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
private long actionId;
|
private long actionId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -15,12 +15,16 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for SoftwareModuleType to RESTful API
|
* A json annotated rest model for SoftwareModuleType to RESTful API
|
||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtDistributionSetType extends MgmtTypeEntity {
|
public class MgmtDistributionSetType extends MgmtTypeEntity {
|
||||||
@@ -28,19 +32,4 @@ public class MgmtDistributionSetType extends MgmtTypeEntity {
|
|||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "99")
|
@Schema(example = "99")
|
||||||
private Long moduleId;
|
private Long moduleId;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the moduleId
|
|
||||||
*/
|
|
||||||
public Long getModuleId() {
|
|
||||||
return moduleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param moduleId
|
|
||||||
* the moduleId to set
|
|
||||||
*/
|
|
||||||
public void setModuleId(final Long moduleId) {
|
|
||||||
this.moduleId = moduleId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,27 +12,29 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
|
import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for DistributionSetType POST.
|
* Request Body for DistributionSetType POST.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetTypeRequestBodyPut {
|
public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "Example type name")
|
@Schema(example = "Example type name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "Example key")
|
@Schema(example = "Example key")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtSoftwareModuleTypeAssigment> mandatorymodules;
|
private List<MgmtSoftwareModuleTypeAssigment> mandatorymodules;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtSoftwareModuleTypeAssigment> optionalmodules;
|
private List<MgmtSoftwareModuleTypeAssigment> optionalmodules;
|
||||||
|
|
||||||
@@ -47,79 +49,4 @@ public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetT
|
|||||||
super.setColour(colour);
|
super.setColour(colour);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param name
|
|
||||||
* the name to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtDistributionSetTypeRequestBodyPost setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the key
|
|
||||||
*/
|
|
||||||
public String getKey() {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param key
|
|
||||||
* the key to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtDistributionSetTypeRequestBodyPost setKey(final String key) {
|
|
||||||
this.key = key;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the mandatory modules
|
|
||||||
*/
|
|
||||||
public List<MgmtSoftwareModuleTypeAssigment> getMandatorymodules() {
|
|
||||||
return mandatorymodules;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param mandatorymodules
|
|
||||||
* the mandatory modules to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtDistributionSetTypeRequestBodyPost setMandatorymodules(
|
|
||||||
final List<MgmtSoftwareModuleTypeAssigment> mandatorymodules) {
|
|
||||||
this.mandatorymodules = mandatorymodules;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the optional modules
|
|
||||||
*/
|
|
||||||
public List<MgmtSoftwareModuleTypeAssigment> getOptionalmodules() {
|
|
||||||
return optionalmodules;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param optionalmodules
|
|
||||||
* the optional modules to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtDistributionSetTypeRequestBodyPost setOptionalmodules(
|
|
||||||
final List<MgmtSoftwareModuleTypeAssigment> optionalmodules) {
|
|
||||||
this.optionalmodules = optionalmodules;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -11,37 +11,20 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for DistributionSetType PUT, i.e. update.
|
* Request Body for DistributionSetType PUT, i.e. update.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
public class MgmtDistributionSetTypeRequestBodyPut {
|
public class MgmtDistributionSetTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Example description")
|
@Schema(example = "Example description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "rgb(86,37,99)")
|
@Schema(example = "rgb(86,37,99)")
|
||||||
private String colour;
|
private String colour;
|
||||||
|
}
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtDistributionSetTypeRequestBodyPut setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getColour() {
|
|
||||||
return colour;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtDistributionSetTypeRequestBodyPut setColour(final String colour) {
|
|
||||||
this.colour = colour;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.mgmt.json.model.rollout;
|
package org.eclipse.hawkbit.mgmt.json.model.rollout;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -17,6 +19,8 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
/**
|
/**
|
||||||
* Model for defining Conditions and Actions
|
* Model for defining Conditions and Actions
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public abstract class AbstractMgmtRolloutConditionsEntity extends MgmtNamedEntity {
|
public abstract class AbstractMgmtRolloutConditionsEntity extends MgmtNamedEntity {
|
||||||
@@ -25,37 +29,4 @@ public abstract class AbstractMgmtRolloutConditionsEntity extends MgmtNamedEntit
|
|||||||
private MgmtRolloutSuccessAction successAction;
|
private MgmtRolloutSuccessAction successAction;
|
||||||
private MgmtRolloutCondition errorCondition;
|
private MgmtRolloutCondition errorCondition;
|
||||||
private MgmtRolloutErrorAction errorAction;
|
private MgmtRolloutErrorAction errorAction;
|
||||||
|
|
||||||
public MgmtRolloutCondition getSuccessCondition() {
|
|
||||||
return successCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuccessCondition(final MgmtRolloutCondition successCondition) {
|
|
||||||
this.successCondition = successCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtRolloutSuccessAction getSuccessAction() {
|
|
||||||
return successAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuccessAction(final MgmtRolloutSuccessAction successAction) {
|
|
||||||
this.successAction = successAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtRolloutCondition getErrorCondition() {
|
|
||||||
return errorCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setErrorCondition(final MgmtRolloutCondition errorCondition) {
|
|
||||||
this.errorCondition = errorCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtRolloutErrorAction getErrorAction() {
|
|
||||||
return errorAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setErrorAction(final MgmtRolloutErrorAction errorAction) {
|
|
||||||
this.errorAction = errorAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,61 +13,25 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
@NoArgsConstructor
|
||||||
*
|
@Data
|
||||||
*/
|
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutCondition {
|
public class MgmtRolloutCondition {
|
||||||
|
|
||||||
|
public enum Condition {
|
||||||
|
THRESHOLD
|
||||||
|
}
|
||||||
|
|
||||||
private Condition condition = Condition.THRESHOLD;
|
private Condition condition = Condition.THRESHOLD;
|
||||||
@Schema(example = "50")
|
@Schema(example = "50")
|
||||||
private String expression = "100";
|
private String expression = "100";
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public MgmtRolloutCondition() {
|
|
||||||
// needed for jackson json creator.
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtRolloutCondition(final Condition condition, final String expression) {
|
public MgmtRolloutCondition(final Condition condition, final String expression) {
|
||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the condition
|
|
||||||
*/
|
|
||||||
public Condition getCondition() {
|
|
||||||
return condition;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param condition
|
|
||||||
* the condition to set
|
|
||||||
*/
|
|
||||||
public void setCondition(final Condition condition) {
|
|
||||||
this.condition = condition;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the expession
|
|
||||||
*/
|
|
||||||
public String getExpression() {
|
|
||||||
return expression;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param expession
|
|
||||||
* the expession to set
|
|
||||||
*/
|
|
||||||
public void setExpression(final String expession) {
|
|
||||||
this.expression = expession;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum Condition {
|
|
||||||
THRESHOLD
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,22 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An action that runs when the error condition is met
|
* An action that runs when the error condition is met
|
||||||
*/
|
*/
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutErrorAction {
|
public class MgmtRolloutErrorAction {
|
||||||
|
|
||||||
|
public enum ErrorAction {
|
||||||
|
PAUSE
|
||||||
|
}
|
||||||
|
|
||||||
private ErrorAction action = ErrorAction.PAUSE;
|
private ErrorAction action = ErrorAction.PAUSE;
|
||||||
@Schema(example = "80")
|
@Schema(example = "80")
|
||||||
private String expression;
|
private String expression;
|
||||||
@@ -28,57 +36,11 @@ public class MgmtRolloutErrorAction {
|
|||||||
/**
|
/**
|
||||||
* Creates a rollout error action
|
* Creates a rollout error action
|
||||||
*
|
*
|
||||||
* @param action
|
* @param action the action to run when th error condition is met
|
||||||
* the action to run when th error condition is met
|
* @param expression the expression for the action
|
||||||
* @param expression
|
|
||||||
* the expression for the action
|
|
||||||
*/
|
*/
|
||||||
public MgmtRolloutErrorAction(ErrorAction action, String expression) {
|
public MgmtRolloutErrorAction(ErrorAction action, String expression) {
|
||||||
this.action = action;
|
this.action = action;
|
||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Default constructor
|
|
||||||
*/
|
|
||||||
public MgmtRolloutErrorAction() {
|
|
||||||
// Instantiate default error action
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the action
|
|
||||||
*/
|
|
||||||
public ErrorAction getAction() {
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param action
|
|
||||||
* the action to set
|
|
||||||
*/
|
|
||||||
public void setAction(final ErrorAction action) {
|
|
||||||
this.action = action;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the expression
|
|
||||||
*/
|
|
||||||
public String getExpression() {
|
|
||||||
return expression;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param expression
|
|
||||||
* the expression to set
|
|
||||||
*/
|
|
||||||
public void setExpression(final String expression) {
|
|
||||||
this.expression = expression;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Possible actions
|
|
||||||
*/
|
|
||||||
public enum ErrorAction {
|
|
||||||
PAUSE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,6 +13,10 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Setter;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||||
|
|
||||||
@@ -21,9 +25,8 @@ 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;
|
||||||
|
|
||||||
/**
|
@Data
|
||||||
*
|
@EqualsAndHashCode(callSuper = true)
|
||||||
*/
|
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutResponseBody extends MgmtNamedEntity {
|
public class MgmtRolloutResponseBody extends MgmtNamedEntity {
|
||||||
@@ -32,125 +35,45 @@ public class MgmtRolloutResponseBody extends MgmtNamedEntity {
|
|||||||
private String targetFilterQuery;
|
private String targetFilterQuery;
|
||||||
@Schema(example = "2")
|
@Schema(example = "2")
|
||||||
private Long distributionSetId;
|
private Long distributionSetId;
|
||||||
|
|
||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "2")
|
@Schema(example = "2")
|
||||||
private Long rolloutId;
|
private Long rolloutId;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "ready")
|
@Schema(example = "ready")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "20")
|
@Schema(example = "20")
|
||||||
private Long totalTargets;
|
private Long totalTargets;
|
||||||
|
@Setter(AccessLevel.NONE)
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private Map<String, Long> totalTargetsPerStatus;
|
private Map<String, Long> totalTargetsPerStatus;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "5")
|
@Schema(example = "5")
|
||||||
private Integer totalGroups;
|
private Integer totalGroups;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065753136")
|
@Schema(example = "1691065753136")
|
||||||
private Long startAt;
|
private Long startAt;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065762496")
|
@Schema(example = "1691065762496")
|
||||||
private Long forcetime;
|
private Long forcetime;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private boolean deleted;
|
private boolean deleted;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private MgmtActionType type;
|
private MgmtActionType type;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "400")
|
@Schema(example = "400")
|
||||||
private Integer weight;
|
private Integer weight;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "true")
|
@Schema(example = "true")
|
||||||
private boolean dynamic;
|
private boolean dynamic;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Approved remark.")
|
@Schema(example = "Approved remark.")
|
||||||
private String approvalRemark;
|
private String approvalRemark;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "exampleUsername")
|
@Schema(example = "exampleUsername")
|
||||||
private String approveDecidedBy;
|
private String approveDecidedBy;
|
||||||
|
|
||||||
public boolean isDeleted() {
|
|
||||||
return deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeleted(final boolean deleted) {
|
|
||||||
this.deleted = deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(final String status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getRolloutId() {
|
|
||||||
return rolloutId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRolloutId(final Long rolloutId) {
|
|
||||||
this.rolloutId = rolloutId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTargetFilterQuery() {
|
|
||||||
return targetFilterQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetFilterQuery(final String targetFilterQuery) {
|
|
||||||
this.targetFilterQuery = targetFilterQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getDistributionSetId() {
|
|
||||||
return distributionSetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDistributionSetId(final Long distributionSetId) {
|
|
||||||
this.distributionSetId = distributionSetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalTargets(final Long totalTargets) {
|
|
||||||
this.totalTargets = totalTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getTotalTargets() {
|
|
||||||
return totalTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStartAt(final Long startAt) {
|
|
||||||
this.startAt = startAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getStartAt() {
|
|
||||||
return startAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setForcetime(final Long forcetime) {
|
|
||||||
this.forcetime = forcetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getForcetime() {
|
|
||||||
return forcetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, Long> getTotalTargetsPerStatus() {
|
|
||||||
return totalTargetsPerStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addTotalTargetsPerStatus(final String status, final Long totalTargetCountByStatus) {
|
public void addTotalTargetsPerStatus(final String status, final Long totalTargetCountByStatus) {
|
||||||
if (totalTargetsPerStatus == null) {
|
if (totalTargetsPerStatus == null) {
|
||||||
totalTargetsPerStatus = new HashMap<>();
|
totalTargetsPerStatus = new HashMap<>();
|
||||||
@@ -158,52 +81,4 @@ public class MgmtRolloutResponseBody extends MgmtNamedEntity {
|
|||||||
|
|
||||||
totalTargetsPerStatus.put(status, totalTargetCountByStatus);
|
totalTargetsPerStatus.put(status, totalTargetCountByStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setType(final MgmtActionType type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtActionType getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWeight(final Integer weight) {
|
|
||||||
this.weight = weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getWeight() {
|
|
||||||
return weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDynamic(final boolean dynamic) {
|
|
||||||
this.dynamic = dynamic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDynamic() {
|
|
||||||
return dynamic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalGroups(final Integer totalGroups) {
|
|
||||||
this.totalGroups = totalGroups;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getTotalGroups() {
|
|
||||||
return totalGroups;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApprovalRemark(final String approvalRemark) {
|
|
||||||
this.approvalRemark = approvalRemark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApprovalRemark() {
|
|
||||||
return approvalRemark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApproveDecidedBy(final String approveDecidedBy) {
|
|
||||||
this.approveDecidedBy = approveDecidedBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApproveDecidedBy(final String approveDecidedBy) {
|
|
||||||
return approveDecidedBy;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import java.util.List;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
|
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
|
||||||
|
|
||||||
@@ -25,6 +27,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* Model for request containing a rollout body e.g. in a POST request of
|
* Model for request containing a rollout body e.g. in a POST request of
|
||||||
* creating a rollout via REST API.
|
* creating a rollout via REST API.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutRestRequestBody extends AbstractMgmtRolloutConditionsEntity {
|
public class MgmtRolloutRestRequestBody extends AbstractMgmtRolloutConditionsEntity {
|
||||||
@@ -33,181 +37,21 @@ public class MgmtRolloutRestRequestBody extends AbstractMgmtRolloutConditionsEnt
|
|||||||
private String targetFilterQuery;
|
private String targetFilterQuery;
|
||||||
@Schema(example = "6")
|
@Schema(example = "6")
|
||||||
private long distributionSetId;
|
private long distributionSetId;
|
||||||
|
|
||||||
@Schema(example = "5")
|
@Schema(example = "5")
|
||||||
private Integer amountGroups;
|
private Integer amountGroups;
|
||||||
|
|
||||||
@Schema(example = "1691065781929")
|
@Schema(example = "1691065781929")
|
||||||
private Long forcetime;
|
private Long forcetime;
|
||||||
|
|
||||||
@Schema(example = "1691065780929")
|
@Schema(example = "1691065780929")
|
||||||
private Long startAt;
|
private Long startAt;
|
||||||
|
@JsonProperty
|
||||||
@JsonProperty(required = false)
|
|
||||||
@Schema(example = "400")
|
@Schema(example = "400")
|
||||||
private Integer weight;
|
private Integer weight;
|
||||||
|
@JsonProperty
|
||||||
@JsonProperty(required = false)
|
|
||||||
@Schema(example = "true")
|
@Schema(example = "true")
|
||||||
private boolean dynamic;
|
private boolean dynamic;
|
||||||
|
@JsonProperty
|
||||||
@JsonProperty(required = false)
|
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private Boolean confirmationRequired;
|
private Boolean confirmationRequired;
|
||||||
|
|
||||||
private MgmtActionType type;
|
private MgmtActionType type;
|
||||||
|
|
||||||
private List<MgmtRolloutGroup> groups;
|
private List<MgmtRolloutGroup> groups;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the targetFilterQuery
|
|
||||||
*/
|
|
||||||
public String getTargetFilterQuery() {
|
|
||||||
return targetFilterQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param targetFilterQuery
|
|
||||||
* the targetFilterQuery to set
|
|
||||||
*/
|
|
||||||
public void setTargetFilterQuery(final String targetFilterQuery) {
|
|
||||||
this.targetFilterQuery = targetFilterQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the distributionSetId
|
|
||||||
*/
|
|
||||||
public long getDistributionSetId() {
|
|
||||||
return distributionSetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param distributionSetId
|
|
||||||
* the distributionSetId to set
|
|
||||||
*/
|
|
||||||
public void setDistributionSetId(final long distributionSetId) {
|
|
||||||
this.distributionSetId = distributionSetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the groupSize
|
|
||||||
*/
|
|
||||||
public Integer getAmountGroups() {
|
|
||||||
return amountGroups;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param groupSize
|
|
||||||
* the groupSize to set
|
|
||||||
*/
|
|
||||||
public void setAmountGroups(final Integer groupSize) {
|
|
||||||
this.amountGroups = groupSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the forcetime
|
|
||||||
*/
|
|
||||||
public Long getForcetime() {
|
|
||||||
return forcetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param forcetime
|
|
||||||
* the forcetime to set
|
|
||||||
*/
|
|
||||||
public void setForcetime(final Long forcetime) {
|
|
||||||
this.forcetime = forcetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the type
|
|
||||||
*/
|
|
||||||
public MgmtActionType getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param type
|
|
||||||
* the type to set
|
|
||||||
*/
|
|
||||||
public void setType(final MgmtActionType type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the List of defined Groups
|
|
||||||
*/
|
|
||||||
public List<MgmtRolloutGroup> getGroups() {
|
|
||||||
return groups;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param groups
|
|
||||||
* List of {@link MgmtRolloutGroup}
|
|
||||||
*/
|
|
||||||
public void setGroups(final List<MgmtRolloutGroup> groups) {
|
|
||||||
this.groups = groups;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the start at timestamp in millis or null
|
|
||||||
*/
|
|
||||||
public Long getStartAt() {
|
|
||||||
return startAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param startAt
|
|
||||||
* the start at timestamp in millis or null
|
|
||||||
*/
|
|
||||||
public void setStartAt(final Long startAt) {
|
|
||||||
this.startAt = startAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the priority of {@link Rollout}
|
|
||||||
*/
|
|
||||||
public Integer getWeight() {
|
|
||||||
return weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param weight
|
|
||||||
* the priority of {@link Rollout}
|
|
||||||
*/
|
|
||||||
public void setWeight(final Integer weight) {
|
|
||||||
this.weight = weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return if the {@link Rollout} shall be dynamic
|
|
||||||
*/
|
|
||||||
public boolean isDynamic() {
|
|
||||||
return dynamic;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param dynamic
|
|
||||||
* is the {@link Rollout} shall be dynamic
|
|
||||||
*/
|
|
||||||
public void setDynamic(final boolean dynamic) {
|
|
||||||
this.dynamic = dynamic;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Only considered if confirmation flow active
|
|
||||||
*
|
|
||||||
* @return if the confirmation is required for this rollout
|
|
||||||
*/
|
|
||||||
public Boolean isConfirmationRequired() {
|
|
||||||
return confirmationRequired;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param confirmationRequired
|
|
||||||
* if the confirmation is required for this rollout
|
|
||||||
*/
|
|
||||||
public void setConfirmationRequired(final boolean confirmationRequired) {
|
|
||||||
this.confirmationRequired = confirmationRequired;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,60 +12,24 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
|
|||||||
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;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
@NoArgsConstructor
|
||||||
*
|
@Data
|
||||||
*/
|
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutSuccessAction {
|
public class MgmtRolloutSuccessAction {
|
||||||
|
|
||||||
|
public enum SuccessAction {
|
||||||
|
NEXTGROUP
|
||||||
|
}
|
||||||
|
|
||||||
private SuccessAction action = SuccessAction.NEXTGROUP;
|
private SuccessAction action = SuccessAction.NEXTGROUP;
|
||||||
private String expression = null;
|
private String expression = null;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public MgmtRolloutSuccessAction() {
|
|
||||||
// needed for json creator
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtRolloutSuccessAction(final SuccessAction action, final String expression) {
|
public MgmtRolloutSuccessAction(final SuccessAction action, final String expression) {
|
||||||
this.action = action;
|
this.action = action;
|
||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the action
|
|
||||||
*/
|
|
||||||
public SuccessAction getAction() {
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param action
|
|
||||||
* the action to set
|
|
||||||
*/
|
|
||||||
public void setAction(final SuccessAction action) {
|
|
||||||
this.action = action;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the expession
|
|
||||||
*/
|
|
||||||
public String getExpression() {
|
|
||||||
return expression;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param expession
|
|
||||||
* the expession to set
|
|
||||||
*/
|
|
||||||
public void setExpression(final String expession) {
|
|
||||||
this.expression = expession;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum SuccessAction {
|
|
||||||
NEXTGROUP
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup;
|
package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -18,6 +20,8 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
/**
|
/**
|
||||||
* Model for defining the Attributes of a Rollout Group
|
* Model for defining the Attributes of a Rollout Group
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutGroup extends AbstractMgmtRolloutConditionsEntity {
|
public class MgmtRolloutGroup extends AbstractMgmtRolloutConditionsEntity {
|
||||||
@@ -28,28 +32,4 @@ public class MgmtRolloutGroup extends AbstractMgmtRolloutConditionsEntity {
|
|||||||
private Float targetPercentage;
|
private Float targetPercentage;
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private Boolean confirmationRequired;
|
private Boolean confirmationRequired;
|
||||||
|
}
|
||||||
public String getTargetFilterQuery() {
|
|
||||||
return targetFilterQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetFilterQuery(final String targetFilterQuery) {
|
|
||||||
this.targetFilterQuery = targetFilterQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Float getTargetPercentage() {
|
|
||||||
return targetPercentage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetPercentage(Float targetPercentage) {
|
|
||||||
this.targetPercentage = targetPercentage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isConfirmationRequired() {
|
|
||||||
return confirmationRequired;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfirmationRequired(final Boolean confirmationRequired) {
|
|
||||||
this.confirmationRequired = confirmationRequired;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -17,11 +17,17 @@ 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.AccessLevel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for the rollout group annotated with json-annotations for easier
|
* Model for the rollout group annotated with json-annotations for easier
|
||||||
* serialization and de-serialization.
|
* serialization and de-serialization.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtRolloutGroupResponseBody extends MgmtRolloutGroup {
|
public class MgmtRolloutGroupResponseBody extends MgmtRolloutGroup {
|
||||||
@@ -29,44 +35,14 @@ public class MgmtRolloutGroupResponseBody extends MgmtRolloutGroup {
|
|||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "63")
|
@Schema(example = "63")
|
||||||
private Long rolloutGroupId;
|
private Long rolloutGroupId;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "ready")
|
@Schema(example = "ready")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@Schema(example = "4")
|
@Schema(example = "4")
|
||||||
private int totalTargets;
|
private int totalTargets;
|
||||||
|
@Setter(AccessLevel.NONE)
|
||||||
private Map<String, Long> totalTargetsPerStatus;
|
private Map<String, Long> totalTargetsPerStatus;
|
||||||
|
|
||||||
public Long getRolloutGroupId() {
|
|
||||||
return rolloutGroupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRolloutGroupId(final Long rolloutGroupId) {
|
|
||||||
this.rolloutGroupId = rolloutGroupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(final String status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getTotalTargets() {
|
|
||||||
return totalTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalTargets(final int totalTargets) {
|
|
||||||
this.totalTargets = totalTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, Long> getTotalTargetsPerStatus() {
|
|
||||||
return totalTargetsPerStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addTotalTargetsPerStatus(final String status, final Long totalTargetCountByStatus) {
|
public void addTotalTargetsPerStatus(final String status, final Long totalTargetCountByStatus) {
|
||||||
if (totalTargetsPerStatus == null) {
|
if (totalTargetsPerStatus == null) {
|
||||||
totalTargetsPerStatus = new HashMap<>();
|
totalTargetsPerStatus = new HashMap<>();
|
||||||
@@ -74,5 +50,4 @@ public class MgmtRolloutGroupResponseBody extends MgmtRolloutGroup {
|
|||||||
|
|
||||||
totalTargetsPerStatus.put(status, totalTargetCountByStatus);
|
totalTargetsPerStatus.put(status, totalTargetCountByStatus);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
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.JsonIgnore;
|
||||||
@@ -20,93 +22,31 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for SoftwareModule to RESTful API representation.
|
* A json annotated rest model for SoftwareModule to RESTful API representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSoftwareModule extends MgmtNamedEntity {
|
public class MgmtSoftwareModule extends MgmtNamedEntity {
|
||||||
|
|
||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "6")
|
@Schema(example = "6")
|
||||||
private Long moduleId;
|
private Long moduleId;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "1.0.0")
|
@Schema(example = "1.0.0")
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "os")
|
@Schema(example = "os")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@Schema(example = "OS")
|
@Schema(example = "OS")
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Vendor Limited, California")
|
@Schema(example = "Vendor Limited, California")
|
||||||
private String vendor;
|
private String vendor;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private boolean deleted;
|
private boolean deleted;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private boolean encrypted;
|
private boolean encrypted;
|
||||||
|
}
|
||||||
public void setDeleted(final boolean deleted) {
|
|
||||||
this.deleted = deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDeleted() {
|
|
||||||
return deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getModuleId() {
|
|
||||||
return moduleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
public void setModuleId(final Long moduleId) {
|
|
||||||
this.moduleId = moduleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVersion() {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVersion(final String version) {
|
|
||||||
this.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(final String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTypeName() {
|
|
||||||
return typeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTypeName(final String typeName) {
|
|
||||||
this.typeName = typeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVendor() {
|
|
||||||
return vendor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVendor(final String vendor) {
|
|
||||||
this.vendor = vendor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEncrypted(final boolean encrypted) {
|
|
||||||
this.encrypted = encrypted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEncrypted() {
|
|
||||||
return encrypted;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -14,11 +14,12 @@ 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 SoftwareModuleMetadata in the REST API for POST/Create.
|
* The representation of SoftwareModuleMetadata in the REST API for POST/Create.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSoftwareModuleMetadata {
|
public class MgmtSoftwareModuleMetadata {
|
||||||
@@ -32,29 +33,4 @@ public class MgmtSoftwareModuleMetadata {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private boolean targetVisible;
|
private boolean targetVisible;
|
||||||
|
}
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isTargetVisible() {
|
|
||||||
return targetVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetVisible(final boolean targetVisible) {
|
|
||||||
this.targetVisible = targetVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -14,11 +14,12 @@ 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 PUT/Update.
|
* The representation of an meta data in the REST API for PUT/Update.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSoftwareModuleMetadataBodyPut {
|
public class MgmtSoftwareModuleMetadataBodyPut {
|
||||||
@@ -29,20 +30,4 @@ public class MgmtSoftwareModuleMetadataBodyPut {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "true")
|
@Schema(example = "true")
|
||||||
private Boolean targetVisible;
|
private Boolean targetVisible;
|
||||||
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(final String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isTargetVisible() {
|
|
||||||
return targetVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetVisible(final Boolean targetVisible) {
|
|
||||||
this.targetVisible = targetVisible;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,143 +11,32 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for SoftwareModule POST.
|
* Request Body for SoftwareModule POST.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
public class MgmtSoftwareModuleRequestBodyPost {
|
public class MgmtSoftwareModuleRequestBodyPost {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "SM Name")
|
@Schema(example = "SM Name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "1.0.0")
|
@Schema(example = "1.0.0")
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "os")
|
@Schema(example = "os")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "SM Description")
|
@Schema(example = "SM Description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Vendor Limited, California")
|
@Schema(example = "Vendor Limited, California")
|
||||||
private String vendor;
|
private String vendor;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private boolean encrypted;
|
private boolean encrypted;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param name
|
|
||||||
* the name to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPost setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the version
|
|
||||||
*/
|
|
||||||
public String getVersion() {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param version
|
|
||||||
* the version to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPost setVersion(final String version) {
|
|
||||||
this.version = version;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the type
|
|
||||||
*/
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param type
|
|
||||||
* the type to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPost setType(final String type) {
|
|
||||||
this.type = type;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the description
|
|
||||||
*/
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param description
|
|
||||||
* the description to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPost setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the vendor
|
|
||||||
*/
|
|
||||||
public String getVendor() {
|
|
||||||
return vendor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param vendor
|
|
||||||
* the vendor to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPost setVendor(final String vendor) {
|
|
||||||
this.vendor = vendor;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return if encrypted
|
|
||||||
*/
|
|
||||||
public boolean isEncrypted() {
|
|
||||||
return encrypted;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param encrypted
|
|
||||||
* if should be encrypted
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPost setEncrypted(final boolean encrypted) {
|
|
||||||
this.encrypted = encrypted;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -11,55 +11,20 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for SoftwareModule PUT.
|
* Request Body for SoftwareModule PUT.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
public class MgmtSoftwareModuleRequestBodyPut {
|
public class MgmtSoftwareModuleRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "SM Description")
|
@Schema(example = "SM Description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "SM Vendor Name")
|
@Schema(example = "SM Vendor Name")
|
||||||
private String vendor;
|
private String vendor;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the description
|
|
||||||
*/
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param description
|
|
||||||
* the description to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPut setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the vendor
|
|
||||||
*/
|
|
||||||
public String getVendor() {
|
|
||||||
return vendor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param vendor
|
|
||||||
* the vendor to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleRequestBodyPut setVendor(final String vendor) {
|
|
||||||
this.vendor = vendor;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -15,12 +15,16 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for SoftwareModuleType to RESTful API
|
* A json annotated rest model for SoftwareModuleType to RESTful API
|
||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSoftwareModuleType extends MgmtTypeEntity {
|
public class MgmtSoftwareModuleType extends MgmtTypeEntity {
|
||||||
@@ -28,24 +32,7 @@ public class MgmtSoftwareModuleType extends MgmtTypeEntity {
|
|||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "83")
|
@Schema(example = "83")
|
||||||
private Long moduleId;
|
private Long moduleId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1")
|
@Schema(example = "1")
|
||||||
private int maxAssignments;
|
private int maxAssignments;
|
||||||
|
}
|
||||||
public Long getModuleId() {
|
|
||||||
return moduleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModuleId(final Long moduleId) {
|
|
||||||
this.moduleId = moduleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMaxAssignments() {
|
|
||||||
return maxAssignments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMaxAssignments(final int maxAssignments) {
|
|
||||||
this.maxAssignments = maxAssignments;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,21 +11,24 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for SoftwareModuleType POST.
|
* Request Body for SoftwareModuleType POST.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class MgmtSoftwareModuleTypeRequestBodyPost extends MgmtSoftwareModuleTypeRequestBodyPut {
|
public class MgmtSoftwareModuleTypeRequestBodyPost extends MgmtSoftwareModuleTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "Example name")
|
@Schema(example = "Example name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "Example key")
|
@Schema(example = "Example key")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1")
|
@Schema(example = "1")
|
||||||
private int maxAssignments;
|
private int maxAssignments;
|
||||||
@@ -41,58 +44,4 @@ public class MgmtSoftwareModuleTypeRequestBodyPost extends MgmtSoftwareModuleTyp
|
|||||||
super.setColour(colour);
|
super.setColour(colour);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param name
|
|
||||||
* the name to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleTypeRequestBodyPost setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the key
|
|
||||||
*/
|
|
||||||
public String getKey() {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param key
|
|
||||||
* the key to set
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleTypeRequestBodyPost setKey(final String key) {
|
|
||||||
this.key = key;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the maxAssignments
|
|
||||||
*/
|
|
||||||
public int getMaxAssignments() {
|
|
||||||
return maxAssignments;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param maxAssignments
|
|
||||||
* the maxAssignments to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtSoftwareModuleTypeRequestBodyPost setMaxAssignments(final int maxAssignments) {
|
|
||||||
this.maxAssignments = maxAssignments;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -11,37 +11,20 @@ package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for SoftwareModuleType PUT.
|
* Request Body for SoftwareModuleType PUT.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
public class MgmtSoftwareModuleTypeRequestBodyPut {
|
public class MgmtSoftwareModuleTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Example description")
|
@Schema(example = "Example description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "rgb(0,0,255")
|
@Schema(example = "rgb(0,0,255")
|
||||||
private String colour;
|
private String colour;
|
||||||
|
}
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtSoftwareModuleTypeRequestBodyPut setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getColour() {
|
|
||||||
return colour;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtSoftwareModuleTypeRequestBodyPut setColour(final String colour) {
|
|
||||||
this.colour = colour;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -11,6 +11,11 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.system;
|
package org.eclipse.hawkbit.mgmt.json.model.system;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -20,8 +25,9 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
/**
|
/**
|
||||||
* A json annotated rest model for a tenant configuration value to RESTful API
|
* A json annotated rest model for a tenant configuration value to RESTful API
|
||||||
* representation.
|
* representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSystemTenantConfigurationValue extends RepresentationModel<MgmtSystemTenantConfigurationValue> {
|
public class MgmtSystemTenantConfigurationValue extends RepresentationModel<MgmtSystemTenantConfigurationValue> {
|
||||||
@@ -29,30 +35,19 @@ public class MgmtSystemTenantConfigurationValue extends RepresentationModel<Mgmt
|
|||||||
@JsonInclude(Include.ALWAYS)
|
@JsonInclude(Include.ALWAYS)
|
||||||
@Schema(example = "true")
|
@Schema(example = "true")
|
||||||
private Object value;
|
private Object value;
|
||||||
|
|
||||||
@JsonInclude(Include.ALWAYS)
|
@JsonInclude(Include.ALWAYS)
|
||||||
|
@Getter(AccessLevel.NONE) @Setter(AccessLevel.NONE)
|
||||||
@Schema(example = "true")
|
@Schema(example = "true")
|
||||||
private boolean isGlobal = true;
|
private boolean isGlobal = true;
|
||||||
|
|
||||||
@Schema(example = "1623085150")
|
@Schema(example = "1623085150")
|
||||||
private Long lastModifiedAt;
|
private Long lastModifiedAt;
|
||||||
|
|
||||||
@Schema(example = "example user")
|
@Schema(example = "example user")
|
||||||
private String lastModifiedBy;
|
private String lastModifiedBy;
|
||||||
|
|
||||||
@Schema(example = "1523085150")
|
@Schema(example = "1523085150")
|
||||||
private Long createdAt;
|
private Long createdAt;
|
||||||
@Schema(example = "example user")
|
@Schema(example = "example user")
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|
||||||
public Object getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(final Object value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isGlobal() {
|
public boolean isGlobal() {
|
||||||
return isGlobal;
|
return isGlobal;
|
||||||
}
|
}
|
||||||
@@ -60,37 +55,4 @@ public class MgmtSystemTenantConfigurationValue extends RepresentationModel<Mgmt
|
|||||||
public void setGlobal(final boolean isGlobal) {
|
public void setGlobal(final boolean isGlobal) {
|
||||||
this.isGlobal = isGlobal;
|
this.isGlobal = isGlobal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getLastModifiedAt() {
|
|
||||||
return lastModifiedAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLastModifiedAt(final Long lastModifiedAt) {
|
|
||||||
this.lastModifiedAt = lastModifiedAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLastModifiedBy() {
|
|
||||||
return lastModifiedBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLastModifiedBy(final String lastModifiedBy) {
|
|
||||||
this.lastModifiedBy = lastModifiedBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getCreatedAt() {
|
|
||||||
return createdAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreatedAt(final Long createdAt) {
|
|
||||||
this.createdAt = createdAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreatedBy() {
|
|
||||||
return createdBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreatedBy(final String createdBy) {
|
|
||||||
this.createdBy = createdBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ 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.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for System Configuration for PUT.
|
* A json annotated rest model for System Configuration for PUT.
|
||||||
@@ -24,23 +25,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSystemTenantConfigurationValueRequest {
|
public class MgmtSystemTenantConfigurationValueRequest {
|
||||||
|
|
||||||
|
@Getter
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "exampleToken")
|
@Schema(example = "exampleToken")
|
||||||
private Serializable value;
|
private Serializable value;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return the value of the MgmtSystemTenantConfigurationValueRequest
|
|
||||||
*/
|
|
||||||
public Serializable getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value of the MgmtSystemTenantConfigurationValueRequest
|
|
||||||
*
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void setValue(final Object value) {
|
public void setValue(final Object value) {
|
||||||
if (!(value instanceof Serializable)) {
|
if (!(value instanceof Serializable)) {
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ import java.util.Collection;
|
|||||||
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;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model representation of an Cache entry as json.
|
* Model representation of an Cache entry as json.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSystemCache {
|
public class MgmtSystemCache {
|
||||||
@@ -36,28 +37,4 @@ public class MgmtSystemCache {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
this.keys = cacheKeys;
|
this.keys = cacheKeys;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the keys
|
|
||||||
*/
|
|
||||||
public Collection<String> getKeys() {
|
|
||||||
return keys;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "MgmtSystemCache [name=" + name + ", keys=" + keys + "]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,84 +15,28 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Body for system statistics.
|
* Body for system statistics.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSystemStatisticsRest {
|
public class MgmtSystemStatisticsRest {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallTargets;
|
private long overallTargets;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallArtifacts;
|
private long overallArtifacts;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallArtifactVolumeInBytes;
|
private long overallArtifactVolumeInBytes;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallActions;
|
private long overallActions;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallTenants;
|
private long overallTenants;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtSystemTenantServiceUsage> tenantStats;
|
private List<MgmtSystemTenantServiceUsage> tenantStats;
|
||||||
|
}
|
||||||
public long getOverallTargets() {
|
|
||||||
return overallTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtSystemStatisticsRest setOverallTargets(final long overallTargets) {
|
|
||||||
this.overallTargets = overallTargets;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOverallArtifacts() {
|
|
||||||
return overallArtifacts;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtSystemStatisticsRest setOverallArtifacts(final long overallArtifacts) {
|
|
||||||
this.overallArtifacts = overallArtifacts;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOverallArtifactVolumeInBytes() {
|
|
||||||
return overallArtifactVolumeInBytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtSystemStatisticsRest setOverallArtifactVolumeInBytes(final long overallArtifactVolumeInBytes) {
|
|
||||||
this.overallArtifactVolumeInBytes = overallArtifactVolumeInBytes;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOverallActions() {
|
|
||||||
return overallActions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtSystemStatisticsRest setOverallActions(final long overallActions) {
|
|
||||||
this.overallActions = overallActions;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOverallTenants() {
|
|
||||||
return overallTenants;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtSystemStatisticsRest setOverallTenants(final long overallTenants) {
|
|
||||||
this.overallTenants = overallTenants;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTenantStats(final List<MgmtSystemTenantServiceUsage> tenantStats) {
|
|
||||||
this.tenantStats = tenantStats;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<MgmtSystemTenantServiceUsage> getTenantStats() {
|
|
||||||
return tenantStats;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -15,79 +15,26 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response body for system usage report.
|
* Response body for system usage report.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtSystemTenantServiceUsage {
|
public class MgmtSystemTenantServiceUsage {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private String tenantName;
|
private String tenantName;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long targets;
|
private long targets;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long artifacts;
|
private long artifacts;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long actions;
|
private long actions;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private long overallArtifactVolumeInBytes;
|
private long overallArtifactVolumeInBytes;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private Map<String, String> usageData;
|
private Map<String, String> usageData;
|
||||||
|
}
|
||||||
public void setTenantName(final String tenantName) {
|
|
||||||
this.tenantName = tenantName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTargets() {
|
|
||||||
return targets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargets(final long targets) {
|
|
||||||
this.targets = targets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getArtifacts() {
|
|
||||||
return artifacts;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArtifacts(final long artifacts) {
|
|
||||||
this.artifacts = artifacts;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getActions() {
|
|
||||||
return actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActions(final long actions) {
|
|
||||||
this.actions = actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getOverallArtifactVolumeInBytes() {
|
|
||||||
return overallArtifactVolumeInBytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOverallArtifactVolumeInBytes(final long overallArtifactVolumeInBytes) {
|
|
||||||
this.overallArtifactVolumeInBytes = overallArtifactVolumeInBytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTenantName() {
|
|
||||||
return tenantName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, String> getUsageData() {
|
|
||||||
return usageData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsageData(final Map<String, String> usageData) {
|
|
||||||
this.usageData = usageData;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -14,11 +14,12 @@ 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 PUT.
|
* Request Body for PUT.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtAssignedDistributionSetRequestBody {
|
public class MgmtAssignedDistributionSetRequestBody {
|
||||||
@@ -26,13 +27,4 @@ public class MgmtAssignedDistributionSetRequestBody {
|
|||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "24")
|
@Schema(example = "24")
|
||||||
private Long distributionSetId;
|
private Long distributionSetId;
|
||||||
|
|
||||||
public Long getDistributionSetId() {
|
|
||||||
return distributionSetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDistributionSetId(final Long distributionSetId) {
|
|
||||||
this.distributionSetId = distributionSetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,14 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for PUT.
|
* Request Body for PUT.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtAssignedTargetRequestBody {
|
public class MgmtAssignedTargetRequestBody {
|
||||||
@@ -26,14 +29,4 @@ public class MgmtAssignedTargetRequestBody {
|
|||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "Target1")
|
@Schema(example = "Target1")
|
||||||
private String controllerId;
|
private String controllerId;
|
||||||
|
}
|
||||||
public String getControllerId() {
|
|
||||||
return controllerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtAssignedTargetRequestBody setControllerId(final String controllerId) {
|
|
||||||
this.controllerId = controllerId;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.mgmt.json.model.tag;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -21,32 +22,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
/**
|
/**
|
||||||
* * A json annotated rest model for DSAssigmentResult to RESTful API
|
* * A json annotated rest model for DSAssigmentResult to RESTful API
|
||||||
* representation.
|
* representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtDistributionSetTagAssigmentResult {
|
public class MgmtDistributionSetTagAssigmentResult {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtDistributionSet> assignedDistributionSets;
|
private List<MgmtDistributionSet> assignedDistributionSets;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtDistributionSet> unassignedDistributionSets;
|
private List<MgmtDistributionSet> unassignedDistributionSets;
|
||||||
|
}
|
||||||
public List<MgmtDistributionSet> getAssignedDistributionSets() {
|
|
||||||
return assignedDistributionSets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<MgmtDistributionSet> getUnassignedDistributionSets() {
|
|
||||||
return unassignedDistributionSets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAssignedDistributionSets(final List<MgmtDistributionSet> assignedDistributionSets) {
|
|
||||||
this.assignedDistributionSets = assignedDistributionSets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUnassignedDistributionSets(final List<MgmtDistributionSet> unassignedDistributionSets) {
|
|
||||||
this.unassignedDistributionSets = unassignedDistributionSets;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.tag;
|
package org.eclipse.hawkbit.mgmt.json.model.tag;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
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.JsonIgnore;
|
||||||
@@ -20,8 +22,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for Tag to RESTful API representation.
|
* A json annotated rest model for Tag to RESTful API representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTag extends MgmtNamedEntity {
|
public class MgmtTag extends MgmtNamedEntity {
|
||||||
@@ -29,25 +32,7 @@ public class MgmtTag extends MgmtNamedEntity {
|
|||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "2")
|
@Schema(example = "2")
|
||||||
private Long tagId;
|
private Long tagId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "rgb(255,0,0)")
|
@Schema(example = "rgb(255,0,0)")
|
||||||
private String colour;
|
private String colour;
|
||||||
|
}
|
||||||
@JsonIgnore
|
|
||||||
public void setTagId(final Long tagId) {
|
|
||||||
this.tagId = tagId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getTagId() {
|
|
||||||
return tagId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setColour(final String colour) {
|
|
||||||
this.colour = colour;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getColour() {
|
|
||||||
return colour;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -14,11 +14,14 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for PUT/POST.
|
* Request Body for PUT/POST.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTagRequestBodyPut {
|
public class MgmtTagRequestBodyPut {
|
||||||
@@ -26,39 +29,10 @@ public class MgmtTagRequestBodyPut {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "rgb(0,255,0)")
|
@Schema(example = "rgb(0,255,0)")
|
||||||
private String colour;
|
private String colour;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Example name")
|
@Schema(example = "Example name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "Example description")
|
@Schema(example = "Example description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtTagRequestBodyPut setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtTagRequestBodyPut setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtTagRequestBodyPut setColour(final String colour) {
|
|
||||||
this.colour = colour;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getColour() {
|
|
||||||
return colour;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.mgmt.json.model.tag;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
|
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@@ -21,32 +22,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
/**
|
/**
|
||||||
* * A json annotated rest model for TargetTagAssigmentResult to RESTful API
|
* * A json annotated rest model for TargetTagAssigmentResult to RESTful API
|
||||||
* representation.
|
* representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTargetTagAssigmentResult {
|
public class MgmtTargetTagAssigmentResult {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtTarget> assignedTargets;
|
private List<MgmtTarget> assignedTargets;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private List<MgmtTarget> unassignedTargets;
|
private List<MgmtTarget> unassignedTargets;
|
||||||
|
}
|
||||||
public void setAssignedTargets(final List<MgmtTarget> assignedTargets) {
|
|
||||||
this.assignedTargets = assignedTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<MgmtTarget> getAssignedTargets() {
|
|
||||||
return assignedTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUnassignedTargets(final List<MgmtTarget> unassignedTargets) {
|
|
||||||
this.unassignedTargets = unassignedTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<MgmtTarget> getUnassignedTargets() {
|
|
||||||
return unassignedTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.target;
|
package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||||
@@ -13,8 +15,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body of DistributionSet for assignment operations (ID only).
|
* Request Body of DistributionSet for assignment operations (ID only).
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class MgmtDistributionSetAssignment extends MgmtId {
|
public class MgmtDistributionSetAssignment extends MgmtId {
|
||||||
|
|
||||||
@Schema(example = "1691065930359")
|
@Schema(example = "1691065930359")
|
||||||
@@ -38,57 +41,4 @@ public class MgmtDistributionSetAssignment extends MgmtId {
|
|||||||
public MgmtDistributionSetAssignment(@JsonProperty(required = true, value = "id") final Long id) {
|
public MgmtDistributionSetAssignment(@JsonProperty(required = true, value = "id") final Long id) {
|
||||||
super(id);
|
super(id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public MgmtActionType getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(final MgmtActionType type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getForcetime() {
|
|
||||||
return forcetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setForcetime(final long forcetime) {
|
|
||||||
this.forcetime = forcetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getWeight() {
|
|
||||||
return weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWeight(final int weight) {
|
|
||||||
this.weight = weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns {@link MgmtMaintenanceWindowRequestBody} for distribution set
|
|
||||||
* assignment.
|
|
||||||
*
|
|
||||||
* @return {@link MgmtMaintenanceWindowRequestBody}.
|
|
||||||
*/
|
|
||||||
public MgmtMaintenanceWindowRequestBody getMaintenanceWindow() {
|
|
||||||
return maintenanceWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets {@link MgmtMaintenanceWindowRequestBody} for distribution set
|
|
||||||
* assignment.
|
|
||||||
*
|
|
||||||
* @param maintenanceWindow
|
|
||||||
* as {@link MgmtMaintenanceWindowRequestBody}.
|
|
||||||
*/
|
|
||||||
public void setMaintenanceWindow(final MgmtMaintenanceWindowRequestBody maintenanceWindow) {
|
|
||||||
this.maintenanceWindow = maintenanceWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isConfirmationRequired() {
|
|
||||||
return confirmationRequired;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfirmationRequired(final Boolean confirmationRequired) {
|
|
||||||
this.confirmationRequired = confirmationRequired;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.mgmt.json.model.target;
|
package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -21,6 +22,8 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||||||
*/
|
*/
|
||||||
@JsonDeserialize(using = MgmtDistributionSetAssignmentsDeserializer.class)
|
@JsonDeserialize(using = MgmtDistributionSetAssignmentsDeserializer.class)
|
||||||
public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSetAssignment> {
|
public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSetAssignment> {
|
||||||
|
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,7 +31,7 @@ public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSe
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public MgmtDistributionSetAssignments() {
|
public MgmtDistributionSetAssignments() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +42,6 @@ public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSe
|
|||||||
* the assignment
|
* the assignment
|
||||||
*/
|
*/
|
||||||
public MgmtDistributionSetAssignments(final MgmtDistributionSetAssignment assignment) {
|
public MgmtDistributionSetAssignments(final MgmtDistributionSetAssignment assignment) {
|
||||||
super();
|
|
||||||
add(assignment);
|
add(assignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,5 +55,4 @@ public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSe
|
|||||||
public MgmtDistributionSetAssignments(final List<MgmtDistributionSetAssignment> assignments) {
|
public MgmtDistributionSetAssignments(final List<MgmtDistributionSetAssignment> assignments) {
|
||||||
super(assignments);
|
super(assignments);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.target;
|
package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.Serial;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonParser;
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
@@ -23,6 +24,8 @@ import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
|||||||
* {@link MgmtDistributionSetAssignment}s
|
* {@link MgmtDistributionSetAssignment}s
|
||||||
*/
|
*/
|
||||||
public class MgmtDistributionSetAssignmentsDeserializer extends StdDeserializer<MgmtDistributionSetAssignments> {
|
public class MgmtDistributionSetAssignmentsDeserializer extends StdDeserializer<MgmtDistributionSetAssignments> {
|
||||||
|
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,4 +52,4 @@ public class MgmtDistributionSetAssignmentsDeserializer extends StdDeserializer<
|
|||||||
}
|
}
|
||||||
return assignments;
|
return assignments;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,9 @@ package org.eclipse.hawkbit.mgmt.json.model.target;
|
|||||||
import java.net.URI;
|
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.EqualsAndHashCode;
|
||||||
|
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;
|
||||||
|
|
||||||
@@ -17,8 +20,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for Target to RESTful API representation.
|
* A json annotated rest model for Target to RESTful API representation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.NON_NULL)
|
@JsonInclude(Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTarget extends MgmtNamedEntity {
|
public class MgmtTarget extends MgmtNamedEntity {
|
||||||
@@ -26,223 +30,37 @@ public class MgmtTarget extends MgmtNamedEntity {
|
|||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "123")
|
@Schema(example = "123")
|
||||||
private String controllerId;
|
private String controllerId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "in_sync")
|
@Schema(example = "in_sync")
|
||||||
private String updateStatus;
|
private String updateStatus;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065941102")
|
@Schema(example = "1691065941102")
|
||||||
private Long lastControllerRequestAt;
|
private Long lastControllerRequestAt;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "1691065941155")
|
@Schema(example = "1691065941155")
|
||||||
private Long installedAt;
|
private Long installedAt;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "192.168.0.1")
|
@Schema(example = "192.168.0.1")
|
||||||
private String ipAddress;
|
private String ipAddress;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "http://192.168.0.1")
|
@Schema(example = "http://192.168.0.1")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private MgmtPollStatus pollStatus;
|
private MgmtPollStatus pollStatus;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "38e6a19932b014040ba061795186514e")
|
@Schema(example = "38e6a19932b014040ba061795186514e")
|
||||||
|
@ToString.Exclude
|
||||||
private String securityToken;
|
private String securityToken;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "true")
|
@Schema(example = "true")
|
||||||
private boolean requestAttributes;
|
private boolean requestAttributes;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "19")
|
@Schema(example = "19")
|
||||||
private Long targetType;
|
private Long targetType;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "defaultType")
|
@Schema(example = "defaultType")
|
||||||
private String targetTypeName;
|
private String targetTypeName;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private Boolean autoConfirmActive;
|
private Boolean autoConfirmActive;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return Target type ID
|
|
||||||
*/
|
|
||||||
public Long getTargetType() {
|
|
||||||
return targetType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param targetType
|
|
||||||
* Target type ID
|
|
||||||
*/
|
|
||||||
public void setTargetType(final Long targetType) {
|
|
||||||
this.targetType = targetType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Target type name
|
|
||||||
*/
|
|
||||||
public String getTargetTypeName() {
|
|
||||||
return targetTypeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param targetTypeName
|
|
||||||
* Target type name
|
|
||||||
*/
|
|
||||||
public void setTargetTypeName(final String targetTypeName) {
|
|
||||||
this.targetTypeName = targetTypeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the controllerId
|
|
||||||
*/
|
|
||||||
public String getControllerId() {
|
|
||||||
return controllerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param controllerId
|
|
||||||
* the controllerId to set
|
|
||||||
*/
|
|
||||||
public void setControllerId(final String controllerId) {
|
|
||||||
this.controllerId = controllerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the updateStatus
|
|
||||||
*/
|
|
||||||
public String getUpdateStatus() {
|
|
||||||
return updateStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param updateStatus
|
|
||||||
* the updateStatus to set
|
|
||||||
*/
|
|
||||||
public void setUpdateStatus(final String updateStatus) {
|
|
||||||
this.updateStatus = updateStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the lastControllerRequestAt
|
|
||||||
*/
|
|
||||||
public Long getLastControllerRequestAt() {
|
|
||||||
return lastControllerRequestAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param lastControllerRequestAt
|
|
||||||
* the lastControllerRequestAt to set
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
|
||||||
public void setLastControllerRequestAt(final Long lastControllerRequestAt) {
|
|
||||||
this.lastControllerRequestAt = lastControllerRequestAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the installedAt
|
|
||||||
*/
|
|
||||||
public Long getInstalledAt() {
|
|
||||||
return installedAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param installedAt
|
|
||||||
* the installedAt to set
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
|
||||||
public void setInstalledAt(final Long installedAt) {
|
|
||||||
this.installedAt = installedAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the pollStatus
|
|
||||||
*/
|
|
||||||
public MgmtPollStatus getPollStatus() {
|
|
||||||
return pollStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param pollStatus
|
|
||||||
* the pollStatus to set
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
|
||||||
public void setPollStatus(final MgmtPollStatus pollStatus) {
|
|
||||||
this.pollStatus = pollStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the ipAddress
|
|
||||||
*/
|
|
||||||
public String getIpAddress() {
|
|
||||||
return ipAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ipAddress
|
|
||||||
* the ipAddress to set
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
|
||||||
public void setIpAddress(final String ipAddress) {
|
|
||||||
this.ipAddress = ipAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the securityToken
|
|
||||||
*/
|
|
||||||
public String getSecurityToken() {
|
|
||||||
return securityToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Address
|
|
||||||
*/
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
public void setAddress(final String address) {
|
|
||||||
if (address != null) {
|
|
||||||
URI.create(address);
|
|
||||||
}
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param securityToken
|
|
||||||
* the securityToken to set
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
|
||||||
public void setSecurityToken(final String securityToken) {
|
|
||||||
this.securityToken = securityToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return boolean true or false
|
|
||||||
*/
|
|
||||||
public boolean isRequestAttributes() {
|
|
||||||
return requestAttributes;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
public void setRequestAttributes(final boolean requestAttributes) {
|
|
||||||
this.requestAttributes = requestAttributes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getAutoConfirmActive() {
|
|
||||||
return autoConfirmActive;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
public void setAutoConfirmActive(final boolean autoConfirmActive) {
|
|
||||||
this.autoConfirmActive = autoConfirmActive;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.mgmt.json.model.target;
|
package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -11,6 +12,6 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class MgmtTargetAttributes extends HashMap<String, String> {
|
public class MgmtTargetAttributes extends HashMap<String, String> {
|
||||||
|
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -13,6 +13,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@@ -20,6 +22,8 @@ import jakarta.validation.constraints.NotNull;
|
|||||||
/**
|
/**
|
||||||
* Response representing the current state of auto-confirmation for a specific target
|
* Response representing the current state of auto-confirmation for a specific target
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
@JsonPropertyOrder({ "active", "initiator", "remark", "activatedAt" })
|
@JsonPropertyOrder({ "active", "initiator", "remark", "activatedAt" })
|
||||||
@@ -34,13 +38,6 @@ public class MgmtTargetAutoConfirm extends RepresentationModel<MgmtTargetAutoCon
|
|||||||
@Schema(example = "1691065938576")
|
@Schema(example = "1691065938576")
|
||||||
private Long activatedAt;
|
private Long activatedAt;
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*/
|
|
||||||
public MgmtTargetAutoConfirm() {
|
|
||||||
// needed for json create.
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MgmtTargetAutoConfirm active(final long activatedAt) {
|
public static MgmtTargetAutoConfirm active(final long activatedAt) {
|
||||||
final MgmtTargetAutoConfirm state = new MgmtTargetAutoConfirm();
|
final MgmtTargetAutoConfirm state = new MgmtTargetAutoConfirm();
|
||||||
state.setActive(true);
|
state.setActive(true);
|
||||||
@@ -51,36 +48,4 @@ public class MgmtTargetAutoConfirm extends RepresentationModel<MgmtTargetAutoCon
|
|||||||
public static MgmtTargetAutoConfirm disabled() {
|
public static MgmtTargetAutoConfirm disabled() {
|
||||||
return new MgmtTargetAutoConfirm();
|
return new MgmtTargetAutoConfirm();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public boolean isActive() {
|
|
||||||
return active;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActive(final boolean active) {
|
|
||||||
this.active = active;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getActivatedAt() {
|
|
||||||
return activatedAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActivatedAt(final long activatedAt) {
|
|
||||||
this.activatedAt = activatedAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInitiator() {
|
|
||||||
return initiator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInitiator(final String initiator) {
|
|
||||||
this.initiator = initiator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemark(final String remark) {
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,15 +12,17 @@ package org.eclipse.hawkbit.mgmt.json.model.target;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Payload to activate the auto-confirmation by given initiator and remark.
|
* Payload to activate the auto-confirmation by given initiator and remark.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class MgmtTargetAutoConfirmUpdate {
|
public class MgmtTargetAutoConfirmUpdate {
|
||||||
|
|
||||||
@JsonProperty(required = false)
|
@JsonProperty(required = false)
|
||||||
@Schema(example = "custom_initiator_value")
|
@Schema(example = "custom_initiator_value")
|
||||||
private final String initiator;
|
private final String initiator;
|
||||||
|
|
||||||
@JsonProperty(required = false)
|
@JsonProperty(required = false)
|
||||||
@Schema(example = "custom_remark")
|
@Schema(example = "custom_remark")
|
||||||
private final String remark;
|
private final String remark;
|
||||||
@@ -28,10 +30,8 @@ public class MgmtTargetAutoConfirmUpdate {
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param initiator
|
* @param initiator can be null
|
||||||
* can be null
|
* @param remark can be null
|
||||||
* @param remark
|
|
||||||
* can be null
|
|
||||||
*/
|
*/
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public MgmtTargetAutoConfirmUpdate(@JsonProperty(value = "initiator") final String initiator,
|
public MgmtTargetAutoConfirmUpdate(@JsonProperty(value = "initiator") final String initiator,
|
||||||
@@ -39,18 +39,4 @@ public class MgmtTargetAutoConfirmUpdate {
|
|||||||
this.initiator = initiator;
|
this.initiator = initiator;
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public String getInitiator() {
|
|
||||||
return initiator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "MgmtTargetAutoConfirm [initiator=" + initiator + ", remark=" + remark + ", toString()="
|
|
||||||
+ super.toString() + "]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,143 +5,34 @@ package org.eclipse.hawkbit.mgmt.json.model.target;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request body for target PUT/POST commands.
|
* Request body for target PUT/POST commands.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
public class MgmtTargetRequestBody {
|
public class MgmtTargetRequestBody {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "controllerName")
|
@Schema(example = "controllerName")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(example = "Example description of a target")
|
@Schema(example = "Example description of a target")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "12345")
|
@Schema(example = "12345")
|
||||||
private String controllerId;
|
private String controllerId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "https://192.168.0.1")
|
@Schema(example = "https://192.168.0.1")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "2345678DGGDGFTDzztgf")
|
@Schema(example = "2345678DGGDGFTDzztgf")
|
||||||
private String securityToken;
|
private String securityToken;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "false")
|
@Schema(example = "false")
|
||||||
private Boolean requestAttributes;
|
private Boolean requestAttributes;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "10")
|
@Schema(example = "10")
|
||||||
private Long targetType;
|
private Long targetType;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return Target type ID
|
|
||||||
*/
|
|
||||||
public Long getTargetType() {
|
|
||||||
return targetType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param targetType
|
|
||||||
* Target type ID
|
|
||||||
*/
|
|
||||||
public void setTargetType(Long targetType) {
|
|
||||||
this.targetType = targetType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return token
|
|
||||||
*/
|
|
||||||
public String getSecurityToken() {
|
|
||||||
return securityToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param securityToken Token
|
|
||||||
*/
|
|
||||||
public void setSecurityToken(final String securityToken) {
|
|
||||||
this.securityToken = securityToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the description
|
|
||||||
*/
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the controllerId
|
|
||||||
*/
|
|
||||||
public String getControllerId() {
|
|
||||||
return controllerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param name
|
|
||||||
* the name to set
|
|
||||||
*/
|
|
||||||
public MgmtTargetRequestBody setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param description
|
|
||||||
* the description to set
|
|
||||||
*/
|
|
||||||
public MgmtTargetRequestBody setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param controllerId
|
|
||||||
* the controllerId to set
|
|
||||||
*/
|
|
||||||
public MgmtTargetRequestBody setControllerId(final String controllerId) {
|
|
||||||
this.controllerId = controllerId;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return address
|
|
||||||
*/
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param address
|
|
||||||
* Address
|
|
||||||
*/
|
|
||||||
public void setAddress(final String address) {
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return boolean true or false
|
|
||||||
*/
|
|
||||||
public Boolean isRequestAttributes() {
|
|
||||||
return requestAttributes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param requestAttributes
|
|
||||||
* Attributes
|
|
||||||
*/
|
|
||||||
public void setRequestAttributes(final Boolean requestAttributes) {
|
|
||||||
this.requestAttributes = requestAttributes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||||
|
|
||||||
@@ -18,38 +20,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* Request Body of DistributionSet Id and Action Type for target filter auto
|
* Request Body of DistributionSet Id and Action Type for target filter auto
|
||||||
* assignment operation.
|
* assignment operation.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class MgmtDistributionSetAutoAssignment extends MgmtId {
|
public class MgmtDistributionSetAutoAssignment extends MgmtId {
|
||||||
|
|
||||||
@JsonProperty(required = false)
|
@JsonProperty
|
||||||
private MgmtActionType type;
|
private MgmtActionType type;
|
||||||
|
@JsonProperty
|
||||||
@JsonProperty(required = false)
|
|
||||||
private Integer weight;
|
private Integer weight;
|
||||||
|
@JsonProperty
|
||||||
@JsonProperty(required = false)
|
|
||||||
private Boolean confirmationRequired;
|
private Boolean confirmationRequired;
|
||||||
|
}
|
||||||
public MgmtActionType getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(final MgmtActionType type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getWeight() {
|
|
||||||
return weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWeight(final Integer weight) {
|
|
||||||
this.weight = weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isConfirmationRequired() {
|
|
||||||
return confirmationRequired;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfirmationRequired(final Boolean confirmationRequired) {
|
|
||||||
this.confirmationRequired = confirmationRequired;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||||
|
|
||||||
@@ -19,10 +21,10 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for Target Filter Queries to RESTful API
|
* A json annotated rest model for Target Filter Queries to RESTful API representation.
|
||||||
* representation.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(Include.ALWAYS)
|
@JsonInclude(Include.ALWAYS)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTargetFilterQuery extends MgmtBaseEntity {
|
public class MgmtTargetFilterQuery extends MgmtBaseEntity {
|
||||||
@@ -30,83 +32,21 @@ 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;
|
||||||
|
}
|
||||||
public Long getFilterId() {
|
|
||||||
return filterId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFilterId(final Long filterId) {
|
|
||||||
this.filterId = filterId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getQuery() {
|
|
||||||
return query;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQuery(final String query) {
|
|
||||||
this.query = query;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getAutoAssignDistributionSet() {
|
|
||||||
return autoAssignDistributionSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAutoAssignDistributionSet(final Long autoAssignDistributionSet) {
|
|
||||||
this.autoAssignDistributionSet = autoAssignDistributionSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MgmtActionType getAutoAssignActionType() {
|
|
||||||
return autoAssignActionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAutoAssignActionType(final MgmtActionType actionType) {
|
|
||||||
this.autoAssignActionType = actionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getAutoAssignWeight() {
|
|
||||||
return autoAssignWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAutoAssignWeight(final Integer autoAssignWeight) {
|
|
||||||
this.autoAssignWeight = autoAssignWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getConfirmationRequired() {
|
|
||||||
return confirmationRequired;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfirmationRequired(final Boolean confirmationRequired) {
|
|
||||||
this.confirmationRequired = confirmationRequired;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,33 +11,18 @@ package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
|||||||
|
|
||||||
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 target PUT/POST commands.
|
* Request body for target PUT/POST commands.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class MgmtTargetFilterQueryRequestBody {
|
public class MgmtTargetFilterQueryRequestBody {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "filterName")
|
@Schema(example = "filterName")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@Schema(example = "controllerId==example-target-*")
|
@Schema(example = "controllerId==example-target-*")
|
||||||
private String query;
|
private String query;
|
||||||
|
}
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getQuery() {
|
|
||||||
return query;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQuery(final String query) {
|
|
||||||
this.query = query;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,12 +13,16 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
import org.eclipse.hawkbit.mgmt.json.model.MgmtTypeEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A json annotated rest model for TargetType to RESTful API
|
* A json annotated rest model for TargetType to RESTful API
|
||||||
* representation.
|
* representation.
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class MgmtTargetType extends MgmtTypeEntity {
|
public class MgmtTargetType extends MgmtTypeEntity {
|
||||||
@@ -26,19 +30,4 @@ public class MgmtTargetType extends MgmtTypeEntity {
|
|||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@Schema(example = "26")
|
@Schema(example = "26")
|
||||||
private Long typeId;
|
private Long typeId;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return target type ID
|
|
||||||
*/
|
|
||||||
public Long getTypeId() {
|
|
||||||
return typeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param typeId
|
|
||||||
* Target type ID
|
|
||||||
*/
|
|
||||||
public void setTypeId(final Long typeId) {
|
|
||||||
this.typeId = typeId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModule
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for TargetType POST.
|
* Request Body for TargetType POST.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut {
|
public class MgmtTargetTypeRequestBodyPost extends MgmtTargetTypeRequestBodyPut {
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,14 @@ package org.eclipse.hawkbit.mgmt.json.model.targettype;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Body for TargetType PUT.
|
* Request Body for TargetType PUT.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
public class MgmtTargetTypeRequestBodyPut {
|
public class MgmtTargetTypeRequestBodyPut {
|
||||||
|
|
||||||
@JsonProperty(required = true)
|
@JsonProperty(required = true)
|
||||||
@@ -29,56 +32,4 @@ public class MgmtTargetTypeRequestBodyPut {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Schema(example = "#aaafff")
|
@Schema(example = "#aaafff")
|
||||||
private String colour;
|
private String colour;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param name
|
|
||||||
* the name to set
|
|
||||||
*
|
|
||||||
* @return updated body
|
|
||||||
*/
|
|
||||||
public MgmtTargetTypeRequestBodyPut setName(final String name) {
|
|
||||||
this.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return description
|
|
||||||
*/
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param description
|
|
||||||
* Description
|
|
||||||
* @return Updated body
|
|
||||||
*/
|
|
||||||
public MgmtTargetTypeRequestBodyPut setDescription(final String description) {
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Colour
|
|
||||||
*/
|
|
||||||
public String getColour() {
|
|
||||||
return colour;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param colour
|
|
||||||
* Colour
|
|
||||||
* @return Updated body
|
|
||||||
*/
|
|
||||||
public MgmtTargetTypeRequestBodyPut setColour(final String colour) {
|
|
||||||
this.colour = colour;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,9 +158,9 @@ public class MgmtRolloutResource implements MgmtRolloutRestApi {
|
|||||||
rollout = rolloutManagement.create(create, rolloutGroups, rolloutGroupConditions);
|
rollout = rolloutManagement.create(create, rolloutGroups, rolloutGroupConditions);
|
||||||
|
|
||||||
} else if (rolloutRequestBody.getAmountGroups() != null) {
|
} else if (rolloutRequestBody.getAmountGroups() != null) {
|
||||||
final boolean confirmationRequired = rolloutRequestBody.isConfirmationRequired() == null
|
final boolean confirmationRequired = rolloutRequestBody.getConfirmationRequired() == null
|
||||||
? confirmationFlowActive
|
? confirmationFlowActive
|
||||||
: rolloutRequestBody.isConfirmationRequired();
|
: rolloutRequestBody.getConfirmationRequired();
|
||||||
rollout = rolloutManagement.create(create, rolloutRequestBody.getAmountGroups(), confirmationRequired,
|
rollout = rolloutManagement.create(create, rolloutRequestBody.getAmountGroups(), confirmationRequired,
|
||||||
rolloutGroupConditions);
|
rolloutGroupConditions);
|
||||||
|
|
||||||
@@ -173,10 +173,10 @@ public class MgmtRolloutResource implements MgmtRolloutRestApi {
|
|||||||
|
|
||||||
private Optional<Boolean> isConfirmationRequiredForGroup(final MgmtRolloutGroup group,
|
private Optional<Boolean> isConfirmationRequiredForGroup(final MgmtRolloutGroup group,
|
||||||
final MgmtRolloutRestRequestBody request) {
|
final MgmtRolloutRestRequestBody request) {
|
||||||
if (group.isConfirmationRequired() != null) {
|
if (group.getConfirmationRequired() != null) {
|
||||||
return Optional.of(group.isConfirmationRequired());
|
return Optional.of(group.getConfirmationRequired());
|
||||||
} else if (request.isConfirmationRequired() != null) {
|
} else if (request.getConfirmationRequired() != null) {
|
||||||
return Optional.of(request.isConfirmationRequired());
|
return Optional.of(request.getConfirmationRequired());
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ public class MgmtSoftwareModuleResource implements MgmtSoftwareModuleRestApi {
|
|||||||
@RequestBody final MgmtSoftwareModuleMetadataBodyPut metadata) {
|
@RequestBody final MgmtSoftwareModuleMetadataBodyPut metadata) {
|
||||||
final SoftwareModuleMetadata updated = softwareModuleManagement
|
final SoftwareModuleMetadata updated = softwareModuleManagement
|
||||||
.updateMetaData(entityFactory.softwareModuleMetadata().update(softwareModuleId, metadataKey)
|
.updateMetaData(entityFactory.softwareModuleMetadata().update(softwareModuleId, metadataKey)
|
||||||
.value(metadata.getValue()).targetVisible(metadata.isTargetVisible()));
|
.value(metadata.getValue()).targetVisible(metadata.getTargetVisible()));
|
||||||
|
|
||||||
return ResponseEntity.ok(MgmtSoftwareModuleMapper.toResponseSwMetadata(updated));
|
return ResponseEntity.ok(MgmtSoftwareModuleMapper.toResponseSwMetadata(updated));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,9 +146,9 @@ public class MgmtTargetFilterQueryResource implements MgmtTargetFilterQueryRestA
|
|||||||
@PathVariable("filterId") final Long filterId,
|
@PathVariable("filterId") final Long filterId,
|
||||||
@RequestBody final MgmtDistributionSetAutoAssignment autoAssignRequest) {
|
@RequestBody final MgmtDistributionSetAutoAssignment autoAssignRequest) {
|
||||||
|
|
||||||
final boolean confirmationRequired = autoAssignRequest.isConfirmationRequired() == null
|
final boolean confirmationRequired = autoAssignRequest.getConfirmationRequired() == null
|
||||||
? tenantConfigHelper.isConfirmationFlowEnabled()
|
? tenantConfigHelper.isConfirmationFlowEnabled()
|
||||||
: autoAssignRequest.isConfirmationRequired();
|
: autoAssignRequest.getConfirmationRequired();
|
||||||
|
|
||||||
final AutoAssignDistributionSetUpdate update = MgmtTargetFilterQueryMapper
|
final AutoAssignDistributionSetUpdate update = MgmtTargetFilterQueryMapper
|
||||||
.fromRequest(entityFactory, filterId, autoAssignRequest).confirmationRequired(confirmationRequired);
|
.fromRequest(entityFactory, filterId, autoAssignRequest).confirmationRequired(confirmationRequired);
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ public class MgmtTargetResource implements MgmtTargetRestApi {
|
|||||||
public ResponseEntity<MgmtTarget> updateTarget(@PathVariable("targetId") final String targetId,
|
public ResponseEntity<MgmtTarget> updateTarget(@PathVariable("targetId") final String targetId,
|
||||||
@RequestBody final MgmtTargetRequestBody targetRest) {
|
@RequestBody final MgmtTargetRequestBody targetRest) {
|
||||||
|
|
||||||
if (targetRest.isRequestAttributes() != null) {
|
if (targetRest.getRequestAttributes() != null) {
|
||||||
if (targetRest.isRequestAttributes()) {
|
if (targetRest.getRequestAttributes()) {
|
||||||
targetManagement.requestControllerAttributes(targetId);
|
targetManagement.requestControllerAttributes(targetId);
|
||||||
} else {
|
} else {
|
||||||
return ResponseEntity.badRequest().build();
|
return ResponseEntity.badRequest().build();
|
||||||
@@ -162,13 +162,13 @@ public class MgmtTargetResource implements MgmtTargetRestApi {
|
|||||||
// update target without targetType here ...
|
// update target without targetType here ...
|
||||||
updateTarget = this.targetManagement.update(entityFactory.target().update(targetId)
|
updateTarget = this.targetManagement.update(entityFactory.target().update(targetId)
|
||||||
.name(targetRest.getName()).description(targetRest.getDescription()).address(targetRest.getAddress())
|
.name(targetRest.getName()).description(targetRest.getDescription()).address(targetRest.getAddress())
|
||||||
.securityToken(targetRest.getSecurityToken()).requestAttributes(targetRest.isRequestAttributes()));
|
.securityToken(targetRest.getSecurityToken()).requestAttributes(targetRest.getRequestAttributes()));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
updateTarget = this.targetManagement.update(
|
updateTarget = this.targetManagement.update(
|
||||||
entityFactory.target().update(targetId).name(targetRest.getName()).description(targetRest.getDescription())
|
entityFactory.target().update(targetId).name(targetRest.getName()).description(targetRest.getDescription())
|
||||||
.address(targetRest.getAddress()).targetType(targetRest.getTargetType()).securityToken(targetRest.getSecurityToken())
|
.address(targetRest.getAddress()).targetType(targetRest.getTargetType()).securityToken(targetRest.getSecurityToken())
|
||||||
.requestAttributes(targetRest.isRequestAttributes()));
|
.requestAttributes(targetRest.getRequestAttributes()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,9 +339,9 @@ public class MgmtTargetResource implements MgmtTargetRestApi {
|
|||||||
findTargetWithExceptionIfNotFound(targetId);
|
findTargetWithExceptionIfNotFound(targetId);
|
||||||
|
|
||||||
final List<DeploymentRequest> deploymentRequests = dsAssignments.stream().map(dsAssignment -> {
|
final List<DeploymentRequest> deploymentRequests = dsAssignments.stream().map(dsAssignment -> {
|
||||||
final boolean isConfirmationRequired = dsAssignment.isConfirmationRequired() == null
|
final boolean isConfirmationRequired = dsAssignment.getConfirmationRequired() == null
|
||||||
? tenantConfigHelper.isConfirmationFlowEnabled()
|
? tenantConfigHelper.isConfirmationFlowEnabled()
|
||||||
: dsAssignment.isConfirmationRequired();
|
: dsAssignment.getConfirmationRequired();
|
||||||
return MgmtDeploymentRequestMapper.createAssignmentRequestBuilder(dsAssignment, targetId)
|
return MgmtDeploymentRequestMapper.createAssignmentRequestBuilder(dsAssignment, targetId)
|
||||||
.setConfirmationRequired(isConfirmationRequired).build();
|
.setConfirmationRequired(isConfirmationRequired).build();
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|||||||
Reference in New Issue
Block a user