Commit d1974e9b04b9cfeb46a7b0d3c975fead32094a51

Authored by Dima Landiak
1 parent 8cb0622d

swagger description for event controller

@@ -169,6 +169,8 @@ public abstract class BaseController { @@ -169,6 +169,8 @@ public abstract class BaseController {
169 public static final String CUSTOMER_ID_PARAM_DESCRIPTION = "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'"; 169 public static final String CUSTOMER_ID_PARAM_DESCRIPTION = "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
170 public static final String ASSET_ID_PARAM_DESCRIPTION = "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'"; 170 public static final String ASSET_ID_PARAM_DESCRIPTION = "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
171 171
  172 + protected static final String ENTITY_ID_PARAM_DESCRIPTION = "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
  173 + protected static final String ENTITY_TYPE_DESCRIPTION = "A string value representing the entity type. For example, 'DEVICE'";
172 174
173 protected final String PAGE_SIZE_DESCRIPTION = "Maximum amount of entities in a one page"; 175 protected final String PAGE_SIZE_DESCRIPTION = "Maximum amount of entities in a one page";
174 protected final String PAGE_NUMBER_DESCRIPTION = "Sequence number of page starting from 0"; 176 protected final String PAGE_NUMBER_DESCRIPTION = "Sequence number of page starting from 0";
@@ -179,11 +181,13 @@ public abstract class BaseController { @@ -179,11 +181,13 @@ public abstract class BaseController {
179 protected final String DASHBOARD_TEXT_SEARCH_DESCRIPTION = "The case insensitive 'startsWith' filter based on the dashboard title."; 181 protected final String DASHBOARD_TEXT_SEARCH_DESCRIPTION = "The case insensitive 'startsWith' filter based on the dashboard title.";
180 protected final String DEVICE_TEXT_SEARCH_DESCRIPTION = "The case insensitive 'startsWith' filter based on the device name."; 182 protected final String DEVICE_TEXT_SEARCH_DESCRIPTION = "The case insensitive 'startsWith' filter based on the device name.";
181 protected final String CUSTOMER_TEXT_SEARCH_DESCRIPTION = "The case insensitive 'startsWith' filter based on the customer title."; 183 protected final String CUSTOMER_TEXT_SEARCH_DESCRIPTION = "The case insensitive 'startsWith' filter based on the customer title.";
  184 + protected final String EVENT_TEXT_SEARCH_DESCRIPTION = "The value is not used in searching.";
182 protected final String SORT_PROPERTY_DESCRIPTION = "Property of entity to sort by"; 185 protected final String SORT_PROPERTY_DESCRIPTION = "Property of entity to sort by";
183 protected final String DASHBOARD_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, title"; 186 protected final String DASHBOARD_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, title";
184 protected final String CUSTOMER_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, title, email, country, city"; 187 protected final String CUSTOMER_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, title, email, country, city";
185 protected final String DEVICE_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, name, deviceProfileName, label, customerTitle"; 188 protected final String DEVICE_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, name, deviceProfileName, label, customerTitle";
186 protected final String ASSET_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, name, type, label, customerTitle"; 189 protected final String ASSET_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, name, type, label, customerTitle";
  190 + protected final String EVENT_SORT_PROPERTY_ALLOWABLE_VALUES = "createdTime, id";
187 protected final String SORT_ORDER_DESCRIPTION = "Sort order. ASC (ASCENDING) or DESC (DESCENDING)"; 191 protected final String SORT_ORDER_DESCRIPTION = "Sort order. ASC (ASCENDING) or DESC (DESCENDING)";
188 protected final String SORT_ORDER_ALLOWABLE_VALUES = "ASC, DESC"; 192 protected final String SORT_ORDER_ALLOWABLE_VALUES = "ASC, DESC";
189 protected final String DEVICE_INFO_DESCRIPTION = "Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. "; 193 protected final String DEVICE_INFO_DESCRIPTION = "Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. ";
@@ -193,6 +197,9 @@ public abstract class BaseController { @@ -193,6 +197,9 @@ public abstract class BaseController {
193 protected final String DEVICE_NAME_DESCRIPTION = "A string value representing the Device name."; 197 protected final String DEVICE_NAME_DESCRIPTION = "A string value representing the Device name.";
194 protected final String ASSET_NAME_DESCRIPTION = "A string value representing the Asset name."; 198 protected final String ASSET_NAME_DESCRIPTION = "A string value representing the Asset name.";
195 199
  200 + protected final String EVENT_START_TIME_DESCRIPTION = "Timestamp. Events with creation time before it won't be queried.";
  201 + protected final String EVENT_END_TIME_DESCRIPTION = "Timestamp. Events with creation time after it won't be queried.";
  202 +
196 public static final String INCORRECT_TENANT_ID = "Incorrect tenantId "; 203 public static final String INCORRECT_TENANT_ID = "Incorrect tenantId ";
197 protected static final String DEFAULT_DASHBOARD = "defaultDashboardId"; 204 protected static final String DEFAULT_DASHBOARD = "defaultDashboardId";
198 protected static final String HOME_DASHBOARD = "homeDashboardId"; 205 protected static final String HOME_DASHBOARD = "homeDashboardId";
@@ -15,7 +15,10 @@ @@ -15,7 +15,10 @@
15 */ 15 */
16 package org.thingsboard.server.controller; 16 package org.thingsboard.server.controller;
17 17
  18 +import io.swagger.annotations.ApiOperation;
  19 +import io.swagger.annotations.ApiParam;
18 import org.springframework.beans.factory.annotation.Autowired; 20 import org.springframework.beans.factory.annotation.Autowired;
  21 +import org.springframework.http.MediaType;
19 import org.springframework.security.access.prepost.PreAuthorize; 22 import org.springframework.security.access.prepost.PreAuthorize;
20 import org.springframework.web.bind.annotation.PathVariable; 23 import org.springframework.web.bind.annotation.PathVariable;
21 import org.springframework.web.bind.annotation.RequestBody; 24 import org.springframework.web.bind.annotation.RequestBody;
@@ -45,20 +48,34 @@ public class EventController extends BaseController { @@ -45,20 +48,34 @@ public class EventController extends BaseController {
45 @Autowired 48 @Autowired
46 private EventService eventService; 49 private EventService eventService;
47 50
  51 + @ApiOperation(value = "Get Events (getEvents)",
  52 + notes = "Returns a page of events for specified entity by specifying event type." +
  53 + PAGE_DATA_PARAMETERS, produces = MediaType.APPLICATION_JSON_VALUE)
48 @PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')") 54 @PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')")
49 @RequestMapping(value = "/events/{entityType}/{entityId}/{eventType}", method = RequestMethod.GET) 55 @RequestMapping(value = "/events/{entityType}/{entityId}/{eventType}", method = RequestMethod.GET)
50 @ResponseBody 56 @ResponseBody
51 public PageData<Event> getEvents( 57 public PageData<Event> getEvents(
  58 + @ApiParam(value = ENTITY_TYPE_DESCRIPTION, required = true)
52 @PathVariable("entityType") String strEntityType, 59 @PathVariable("entityType") String strEntityType,
  60 + @ApiParam(value = ENTITY_ID_PARAM_DESCRIPTION, required = true)
53 @PathVariable("entityId") String strEntityId, 61 @PathVariable("entityId") String strEntityId,
  62 + @ApiParam(value = "A string value representing event type", example = "STATS", required = true)
54 @PathVariable("eventType") String eventType, 63 @PathVariable("eventType") String eventType,
  64 + @ApiParam(value = TENANT_ID_PARAM_DESCRIPTION, required = true)
55 @RequestParam("tenantId") String strTenantId, 65 @RequestParam("tenantId") String strTenantId,
  66 + @ApiParam(value = PAGE_SIZE_DESCRIPTION, required = true)
56 @RequestParam int pageSize, 67 @RequestParam int pageSize,
  68 + @ApiParam(value = PAGE_NUMBER_DESCRIPTION, required = true)
57 @RequestParam int page, 69 @RequestParam int page,
  70 + @ApiParam(value = EVENT_TEXT_SEARCH_DESCRIPTION)
58 @RequestParam(required = false) String textSearch, 71 @RequestParam(required = false) String textSearch,
  72 + @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = EVENT_SORT_PROPERTY_ALLOWABLE_VALUES)
59 @RequestParam(required = false) String sortProperty, 73 @RequestParam(required = false) String sortProperty,
  74 + @ApiParam(value = SORT_ORDER_DESCRIPTION, allowableValues = SORT_ORDER_ALLOWABLE_VALUES)
60 @RequestParam(required = false) String sortOrder, 75 @RequestParam(required = false) String sortOrder,
  76 + @ApiParam(value = EVENT_START_TIME_DESCRIPTION)
61 @RequestParam(required = false) Long startTime, 77 @RequestParam(required = false) Long startTime,
  78 + @ApiParam(value = EVENT_END_TIME_DESCRIPTION)
62 @RequestParam(required = false) Long endTime) throws ThingsboardException { 79 @RequestParam(required = false) Long endTime) throws ThingsboardException {
63 checkParameter("EntityId", strEntityId); 80 checkParameter("EntityId", strEntityId);
64 checkParameter("EntityType", strEntityType); 81 checkParameter("EntityType", strEntityType);
@@ -74,19 +91,32 @@ public class EventController extends BaseController { @@ -74,19 +91,32 @@ public class EventController extends BaseController {
74 } 91 }
75 } 92 }
76 93
  94 + @ApiOperation(value = "Get Events (getEvents)",
  95 + notes = "Returns a page of events for specified entity." +
  96 + PAGE_DATA_PARAMETERS, produces = MediaType.APPLICATION_JSON_VALUE)
77 @PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')") 97 @PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')")
78 @RequestMapping(value = "/events/{entityType}/{entityId}", method = RequestMethod.GET) 98 @RequestMapping(value = "/events/{entityType}/{entityId}", method = RequestMethod.GET)
79 @ResponseBody 99 @ResponseBody
80 public PageData<Event> getEvents( 100 public PageData<Event> getEvents(
  101 + @ApiParam(value = ENTITY_TYPE_DESCRIPTION, required = true)
81 @PathVariable("entityType") String strEntityType, 102 @PathVariable("entityType") String strEntityType,
  103 + @ApiParam(value = ENTITY_ID_PARAM_DESCRIPTION, required = true)
82 @PathVariable("entityId") String strEntityId, 104 @PathVariable("entityId") String strEntityId,
  105 + @ApiParam(value = TENANT_ID_PARAM_DESCRIPTION, required = true)
83 @RequestParam("tenantId") String strTenantId, 106 @RequestParam("tenantId") String strTenantId,
  107 + @ApiParam(value = PAGE_SIZE_DESCRIPTION, required = true)
84 @RequestParam int pageSize, 108 @RequestParam int pageSize,
  109 + @ApiParam(value = PAGE_NUMBER_DESCRIPTION, required = true)
85 @RequestParam int page, 110 @RequestParam int page,
  111 + @ApiParam(value = EVENT_TEXT_SEARCH_DESCRIPTION)
86 @RequestParam(required = false) String textSearch, 112 @RequestParam(required = false) String textSearch,
  113 + @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = EVENT_SORT_PROPERTY_ALLOWABLE_VALUES)
87 @RequestParam(required = false) String sortProperty, 114 @RequestParam(required = false) String sortProperty,
  115 + @ApiParam(value = SORT_ORDER_DESCRIPTION, allowableValues = SORT_ORDER_ALLOWABLE_VALUES)
88 @RequestParam(required = false) String sortOrder, 116 @RequestParam(required = false) String sortOrder,
  117 + @ApiParam(value = EVENT_START_TIME_DESCRIPTION)
89 @RequestParam(required = false) Long startTime, 118 @RequestParam(required = false) Long startTime,
  119 + @ApiParam(value = EVENT_END_TIME_DESCRIPTION)
90 @RequestParam(required = false) Long endTime) throws ThingsboardException { 120 @RequestParam(required = false) Long endTime) throws ThingsboardException {
91 checkParameter("EntityId", strEntityId); 121 checkParameter("EntityId", strEntityId);
92 checkParameter("EntityType", strEntityType); 122 checkParameter("EntityType", strEntityType);
@@ -104,20 +134,34 @@ public class EventController extends BaseController { @@ -104,20 +134,34 @@ public class EventController extends BaseController {
104 } 134 }
105 } 135 }
106 136
  137 + @ApiOperation(value = "Get Events (getEvents)",
  138 + notes = "Returns a page of events for specified entity by specifying event filter." +
  139 + PAGE_DATA_PARAMETERS, produces = MediaType.APPLICATION_JSON_VALUE)
107 @PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')") 140 @PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')")
108 @RequestMapping(value = "/events/{entityType}/{entityId}", method = RequestMethod.POST) 141 @RequestMapping(value = "/events/{entityType}/{entityId}", method = RequestMethod.POST)
109 @ResponseBody 142 @ResponseBody
110 public PageData<Event> getEvents( 143 public PageData<Event> getEvents(
  144 + @ApiParam(value = ENTITY_TYPE_DESCRIPTION, required = true)
111 @PathVariable("entityType") String strEntityType, 145 @PathVariable("entityType") String strEntityType,
  146 + @ApiParam(value = ENTITY_ID_PARAM_DESCRIPTION, required = true)
112 @PathVariable("entityId") String strEntityId, 147 @PathVariable("entityId") String strEntityId,
  148 + @ApiParam(value = TENANT_ID_PARAM_DESCRIPTION, required = true)
113 @RequestParam("tenantId") String strTenantId, 149 @RequestParam("tenantId") String strTenantId,
  150 + @ApiParam(value = PAGE_SIZE_DESCRIPTION, required = true)
114 @RequestParam int pageSize, 151 @RequestParam int pageSize,
  152 + @ApiParam(value = PAGE_NUMBER_DESCRIPTION, required = true)
115 @RequestParam int page, 153 @RequestParam int page,
  154 + @ApiParam(value = "A JSON value representing the event filter.", required = true)
116 @RequestBody EventFilter eventFilter, 155 @RequestBody EventFilter eventFilter,
  156 + @ApiParam(value = EVENT_TEXT_SEARCH_DESCRIPTION)
117 @RequestParam(required = false) String textSearch, 157 @RequestParam(required = false) String textSearch,
  158 + @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = EVENT_SORT_PROPERTY_ALLOWABLE_VALUES)
118 @RequestParam(required = false) String sortProperty, 159 @RequestParam(required = false) String sortProperty,
  160 + @ApiParam(value = SORT_ORDER_DESCRIPTION, allowableValues = SORT_ORDER_ALLOWABLE_VALUES)
119 @RequestParam(required = false) String sortOrder, 161 @RequestParam(required = false) String sortOrder,
  162 + @ApiParam(value = EVENT_START_TIME_DESCRIPTION)
120 @RequestParam(required = false) Long startTime, 163 @RequestParam(required = false) Long startTime,
  164 + @ApiParam(value = EVENT_END_TIME_DESCRIPTION)
121 @RequestParam(required = false) Long endTime) throws ThingsboardException { 165 @RequestParam(required = false) Long endTime) throws ThingsboardException {
122 checkParameter("EntityId", strEntityId); 166 checkParameter("EntityId", strEntityId);
123 checkParameter("EntityType", strEntityType); 167 checkParameter("EntityType", strEntityType);
@@ -127,7 +171,7 @@ public class EventController extends BaseController { @@ -127,7 +171,7 @@ public class EventController extends BaseController {
127 EntityId entityId = EntityIdFactory.getByTypeAndId(strEntityType, strEntityId); 171 EntityId entityId = EntityIdFactory.getByTypeAndId(strEntityType, strEntityId);
128 checkEntityId(entityId, Operation.READ); 172 checkEntityId(entityId, Operation.READ);
129 173
130 - if(sortProperty != null && sortProperty.equals("createdTime") && eventFilter.hasFilterForJsonBody()) { 174 + if (sortProperty != null && sortProperty.equals("createdTime") && eventFilter.hasFilterForJsonBody()) {
131 sortProperty = ModelConstants.CREATED_TIME_PROPERTY; 175 sortProperty = ModelConstants.CREATED_TIME_PROPERTY;
132 } 176 }
133 177
@@ -16,6 +16,8 @@ @@ -16,6 +16,8 @@
16 package org.thingsboard.server.common.data; 16 package org.thingsboard.server.common.data;
17 17
18 import com.fasterxml.jackson.databind.JsonNode; 18 import com.fasterxml.jackson.databind.JsonNode;
  19 +import io.swagger.annotations.ApiModel;
  20 +import io.swagger.annotations.ApiModelProperty;
19 import lombok.Data; 21 import lombok.Data;
20 import org.thingsboard.server.common.data.id.EntityId; 22 import org.thingsboard.server.common.data.id.EntityId;
21 import org.thingsboard.server.common.data.id.EventId; 23 import org.thingsboard.server.common.data.id.EventId;
@@ -25,12 +27,18 @@ import org.thingsboard.server.common.data.id.TenantId; @@ -25,12 +27,18 @@ import org.thingsboard.server.common.data.id.TenantId;
25 * @author Andrew Shvayka 27 * @author Andrew Shvayka
26 */ 28 */
27 @Data 29 @Data
  30 +@ApiModel
28 public class Event extends BaseData<EventId> { 31 public class Event extends BaseData<EventId> {
29 32
  33 + @ApiModelProperty(position = 1, value = "JSON object with Tenant Id.", readOnly = true)
30 private TenantId tenantId; 34 private TenantId tenantId;
  35 + @ApiModelProperty(position = 2, value = "Event type", example = "STATS")
31 private String type; 36 private String type;
  37 + @ApiModelProperty(position = 3, value = "string", example = "784f394c-42b6-435a-983c-b7beff2784f9")
32 private String uid; 38 private String uid;
  39 + @ApiModelProperty(position = 4, value = "JSON object with Entity Id for which event is created.", readOnly = true)
33 private EntityId entityId; 40 private EntityId entityId;
  41 + @ApiModelProperty(position = 5, value = "Event body.", dataType = "com.fasterxml.jackson.databind.JsonNode")
34 private transient JsonNode body; 42 private transient JsonNode body;
35 43
36 public Event() { 44 public Event() {
@@ -45,4 +53,9 @@ public class Event extends BaseData<EventId> { @@ -45,4 +53,9 @@ public class Event extends BaseData<EventId> {
45 super(event); 53 super(event);
46 } 54 }
47 55
  56 + @ApiModelProperty(position = 6, value = "Timestamp of the event creation, in milliseconds", example = "1609459200000", readOnly = true)
  57 + @Override
  58 + public long getCreatedTime() {
  59 + return super.getCreatedTime();
  60 + }
48 } 61 }
@@ -15,10 +15,12 @@ @@ -15,10 +15,12 @@
15 */ 15 */
16 package org.thingsboard.server.common.data.event; 16 package org.thingsboard.server.common.data.event;
17 17
  18 +import io.swagger.annotations.ApiModel;
18 import lombok.Data; 19 import lombok.Data;
19 import org.thingsboard.server.common.data.StringUtils; 20 import org.thingsboard.server.common.data.StringUtils;
20 21
21 @Data 22 @Data
  23 +@ApiModel
22 public abstract class DebugEvent implements EventFilter { 24 public abstract class DebugEvent implements EventFilter {
23 25
24 private String msgDirectionType; 26 private String msgDirectionType;
@@ -15,6 +15,9 @@ @@ -15,6 +15,9 @@
15 */ 15 */
16 package org.thingsboard.server.common.data.event; 16 package org.thingsboard.server.common.data.event;
17 17
  18 +import io.swagger.annotations.ApiModel;
  19 +
  20 +@ApiModel
18 public class DebugRuleChainEventFilter extends DebugEvent { 21 public class DebugRuleChainEventFilter extends DebugEvent {
19 @Override 22 @Override
20 public EventType getEventType() { 23 public EventType getEventType() {
@@ -15,6 +15,9 @@ @@ -15,6 +15,9 @@
15 */ 15 */
16 package org.thingsboard.server.common.data.event; 16 package org.thingsboard.server.common.data.event;
17 17
  18 +import io.swagger.annotations.ApiModel;
  19 +
  20 +@ApiModel
18 public class DebugRuleNodeEventFilter extends DebugEvent { 21 public class DebugRuleNodeEventFilter extends DebugEvent {
19 @Override 22 @Override
20 public EventType getEventType() { 23 public EventType getEventType() {
@@ -15,10 +15,12 @@ @@ -15,10 +15,12 @@
15 */ 15 */
16 package org.thingsboard.server.common.data.event; 16 package org.thingsboard.server.common.data.event;
17 17
  18 +import io.swagger.annotations.ApiModel;
18 import lombok.Data; 19 import lombok.Data;
19 import org.thingsboard.server.common.data.StringUtils; 20 import org.thingsboard.server.common.data.StringUtils;
20 21
21 @Data 22 @Data
  23 +@ApiModel
22 public class ErrorEventFilter implements EventFilter { 24 public class ErrorEventFilter implements EventFilter {
23 private String server; 25 private String server;
24 private String method; 26 private String method;
@@ -16,10 +16,11 @@ @@ -16,10 +16,11 @@
16 package org.thingsboard.server.common.data.event; 16 package org.thingsboard.server.common.data.event;
17 17
18 import com.fasterxml.jackson.annotation.JsonIgnore; 18 import com.fasterxml.jackson.annotation.JsonIgnore;
19 -import com.fasterxml.jackson.annotation.JsonIgnoreProperties;  
20 import com.fasterxml.jackson.annotation.JsonSubTypes; 19 import com.fasterxml.jackson.annotation.JsonSubTypes;
21 import com.fasterxml.jackson.annotation.JsonTypeInfo; 20 import com.fasterxml.jackson.annotation.JsonTypeInfo;
  21 +import io.swagger.annotations.ApiModel;
22 22
  23 +@ApiModel
23 @JsonTypeInfo( 24 @JsonTypeInfo(
24 use = JsonTypeInfo.Id.NAME, 25 use = JsonTypeInfo.Id.NAME,
25 include = JsonTypeInfo.As.PROPERTY, 26 include = JsonTypeInfo.As.PROPERTY,
@@ -15,10 +15,12 @@ @@ -15,10 +15,12 @@
15 */ 15 */
16 package org.thingsboard.server.common.data.event; 16 package org.thingsboard.server.common.data.event;
17 17
  18 +import io.swagger.annotations.ApiModel;
18 import lombok.Data; 19 import lombok.Data;
19 import org.thingsboard.server.common.data.StringUtils; 20 import org.thingsboard.server.common.data.StringUtils;
20 21
21 @Data 22 @Data
  23 +@ApiModel
22 public class LifeCycleEventFilter implements EventFilter { 24 public class LifeCycleEventFilter implements EventFilter {
23 private String server; 25 private String server;
24 private String event; 26 private String event;
@@ -15,10 +15,12 @@ @@ -15,10 +15,12 @@
15 */ 15 */
16 package org.thingsboard.server.common.data.event; 16 package org.thingsboard.server.common.data.event;
17 17
  18 +import io.swagger.annotations.ApiModel;
18 import lombok.Data; 19 import lombok.Data;
19 import org.thingsboard.server.common.data.StringUtils; 20 import org.thingsboard.server.common.data.StringUtils;
20 21
21 @Data 22 @Data
  23 +@ApiModel
22 public class StatisticsEventFilter implements EventFilter { 24 public class StatisticsEventFilter implements EventFilter {
23 private String server; 25 private String server;
24 private Integer messagesProcessed; 26 private Integer messagesProcessed;