| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- package com.usky.ai.dto;
- import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
- import com.fasterxml.jackson.annotation.JsonProperty;
- import com.fasterxml.jackson.databind.JsonNode;
- import lombok.Data;
- import java.util.List;
- @Data
- @JsonIgnoreProperties(ignoreUnknown = true)
- public class AlgAbilityFetchResponseDTO {
- @JsonProperty("BoardId")
- private String boardId;
- @JsonProperty("BoardIp")
- private String boardIp;
- @JsonProperty("Ability")
- private List<Algorithm> ability;
- @JsonProperty("Result")
- private Result result;
- private long time = System.currentTimeMillis();
- public boolean isSuccess() {
- return result != null && Integer.valueOf(0).equals(result.getCode());
- }
- @Data
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static class Algorithm {
- @JsonProperty("attribute")
- private JsonNode attribute;
- @JsonProperty("parameters")
- private List<Parameter> parameters;
- @JsonProperty("permitted")
- private boolean permitted;
- @JsonProperty("code")
- private int code;
- @JsonProperty("sub")
- private boolean sub;
- @JsonProperty("name")
- private String name;
- @JsonProperty("desc")
- private String desc;
- @JsonProperty("item")
- private int item;
- @JsonProperty("policy")
- private List<Policy> policy;
- @Data
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static class Parameter {
- @JsonProperty("class")
- private String classType;
- @JsonProperty("type")
- private int type;
- @JsonProperty("max")
- private Object max;
- @JsonProperty("min")
- private Object min;
- @JsonProperty("default")
- private Object defaultValue;
- @JsonProperty("key")
- private String key;
- @JsonProperty("name")
- private String name;
- @JsonProperty("required")
- private boolean required;
- @JsonProperty("value")
- private Object value;
- @JsonProperty("options")
- private List<Option> options;
- @Data
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static class Option {
- @JsonProperty("enable")
- private boolean enable;
- @JsonProperty("key")
- private String key;
- @JsonProperty("value")
- private int value;
- @JsonProperty("name")
- private String name;
- }
- }
- @Data
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static class Policy {
- @JsonProperty("property")
- private String property;
- @JsonProperty("name")
- private String name;
- }
- }
- @Data
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static class Result {
- @JsonProperty("Code")
- private int code;
- @JsonProperty("Desc")
- private String desc;
- }
- }
|