package com.dji.sample.manage.model.receiver;
|
|
import com.dji.sample.manage.model.enums.DroneRcLostActionEnum;
|
import com.dji.sample.manage.model.enums.ThermalPaletteStyleEnum;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
import lombok.AllArgsConstructor;
|
import lombok.Data;
|
import lombok.EqualsAndHashCode;
|
import lombok.NoArgsConstructor;
|
|
import javax.validation.Valid;
|
import javax.validation.constraints.NotNull;
|
import java.util.Map;
|
import java.util.Objects;
|
|
/**
|
* @author sean
|
* @version 1.4
|
* @date 2023/3/3
|
*/
|
@EqualsAndHashCode(callSuper = true)
|
@Data
|
@AllArgsConstructor
|
public class ThermalCurrentPaletteStyleReceiver extends BasicDeviceProperty {
|
|
@NotNull
|
@Valid
|
private String payloadIndex;
|
|
@NotNull
|
private ThermalPaletteStyleEnum thermalCurrentPaletteStyle;
|
|
public ThermalCurrentPaletteStyleReceiver() {
|
}
|
|
@Override
|
public String toString() {
|
return "ThermalCurrentPaletteStyleSet{" +
|
"payloadIndex=" + payloadIndex +
|
", thermalCurrentPaletteStyle=" + thermalCurrentPaletteStyle +
|
'}';
|
}
|
|
@JsonValue
|
public Map<String, Object> toMap() {
|
return Map.of(payloadIndex.toString(), Map.of("thermal_current_palette_style", thermalCurrentPaletteStyle.getStyle()));
|
}
|
|
}
|