wangmengmeng
2024-12-24 24432a361d5c6bd6f3d8c008693e9f1155d62517
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
package com.dji.sdk.cloudapi.wayline;
 
import com.dji.sdk.cloudapi.device.DeviceEnum;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
 
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
 
/**
 * @author sean
 * @version 1.7
 * @date 2023/6/8
 */
@Schema(description = "Query parameter to get list of wayline files")
public class GetWaylineListRequest {
 
    /**
     * Is the wayline file favorited?
     */
    @Parameter(name = "favorited", description = "Is the wayline file favorited?")
    private Boolean favorited;
 
    /**
     * order(xxx_column desc or xxx_column asc)
     * Pilot2 optional value: <span>name</span><span>update_time</span><span>create_time</span>
     */
    @NotNull
    @JsonProperty("order_by")
    @Parameter(name = "order_by", description = "sort field name", example = "update_time desc",
            schema = @Schema(allowableValues = {"name desc", "name asc", "update_time desc", "update_time asc", "create_time desc", "create_time asc"}))
    @Valid
    private GetWaylineListOrderBy orderBy;
 
    /**
     * current page
     */
    @Min(1)
    @Parameter(name = "page", description = "current page", schema = @Schema(defaultValue = "1", type = "int"))
    private int page = 1;
 
    /**
     * page size
     */
    @Min(1)
    @JsonProperty("page_size")
    @Parameter(name = "page_size", description = "page size", schema = @Schema(defaultValue = "10", type = "int"))
    private int pageSize = 10;
 
    /**
     * wayline template type collection
     */
    @Size(min = 1)
    @JsonProperty("template_type")
    @Parameter(name = "template_type", description = "wayline template type collection", example = "[0]")
    private List<WaylineTypeEnum> templateType;
 
    /**
     * 1: Enable AI Spot-Check wayline. Without this field means all waylines.
     */
    @JsonProperty("action_type")
    @Parameter(name = "action_type", description = "wayline template type collection", example = "1")
    private ActionTypeEnum actionType;
 
    /**
     * Selected aircraft models
     */
    @JsonProperty("drone_model_keys")
    @Schema(name = "drone_model_keys", description = "drone device product enum", example = "[\"0-67-0\"]")
    private List<DeviceEnum> droneModelKeys;
 
    /**
     * Selected payload models
     */
    @JsonProperty("payload_model_key")
    @Schema(name = "payload_model_key", description = "payload device product enum", example = "[\"1-53-0\"]")
    private List<DeviceEnum> payloadModelKey;
 
    /**
     * Filter by wayline name
     */
    @JsonProperty("key")
    @Schema(name = "key", description = "wayline file name", example = "waypoint")
    private String key;
 
    public GetWaylineListRequest() {
    }
 
    @Override
    public String toString() {
        return "GetWaylineListRequest{" +
                "favorited=" + favorited +
                ", orderBy='" + orderBy + '\'' +
                ", page=" + page +
                ", pageSize=" + pageSize +
                ", templateType=" + templateType +
                ", actionType=" + actionType +
                ", droneModelKeys=" + droneModelKeys +
                ", payloadModelKey=" + payloadModelKey +
                ", key='" + key + '\'' +
                '}';
    }
 
    public Boolean getFavorited() {
        return favorited;
    }
 
    public GetWaylineListRequest setFavorited(Boolean favorited) {
        this.favorited = favorited;
        return this;
    }
 
    public GetWaylineListOrderBy getOrderBy() {
        return orderBy;
    }
 
    public GetWaylineListRequest setOrderBy(GetWaylineListOrderBy orderBy) {
        this.orderBy = orderBy;
        return this;
    }
 
    public int getPage() {
        return page;
    }
 
    public GetWaylineListRequest setPage(int page) {
        this.page = page;
        return this;
    }
 
    public int getPageSize() {
        return pageSize;
    }
 
    public GetWaylineListRequest setPageSize(int pageSize) {
        this.pageSize = pageSize;
        return this;
    }
 
    public List<WaylineTypeEnum> getTemplateType() {
        return templateType;
    }
 
    public GetWaylineListRequest setTemplateType(List<WaylineTypeEnum> templateType) {
        this.templateType = templateType;
        return this;
    }
 
    public ActionTypeEnum getActionType() {
        return actionType;
    }
 
    public GetWaylineListRequest setActionType(ActionTypeEnum actionType) {
        this.actionType = actionType;
        return this;
    }
 
    public List<DeviceEnum> getDroneModelKeys() {
        return droneModelKeys;
    }
 
    public GetWaylineListRequest setDroneModelKeys(List<DeviceEnum> droneModelKeys) {
        this.droneModelKeys = droneModelKeys;
        return this;
    }
 
    public List<DeviceEnum> getPayloadModelKey() {
        return payloadModelKey;
    }
 
    public GetWaylineListRequest setPayloadModelKey(List<DeviceEnum> payloadModelKey) {
        this.payloadModelKey = payloadModelKey;
        return this;
    }
 
    public String getKey() {
        return key;
    }
 
    public GetWaylineListRequest setKey(String key) {
        this.key = key;
        return this;
    }
}