public Builder<T> on(Date date) { getRequest().setEventDate(date); return this; }
public Builder<T> trackState() { getRequest().setUpdateState(true); return this; } }
/** * Convert generic device event create request from GRPC to API. * * @param grpc * @return * @throws SiteWhereException */ public static DeviceEventCreateRequest asApiDeviceEventCreateRequest(GDeviceEventCreateRequest grpc) throws SiteWhereException { DeviceEventCreateRequest api = new DeviceEventCreateRequest(); EventModelConverter.copyApiDeviceEventCreateRequest(grpc, api); return api; }
/** * Copy common device event create request fields from GRPC to API. * * @param grpc * @param api * @throws SiteWhereException */ public static void copyApiDeviceEventCreateRequest(GDeviceEventCreateRequest grpc, DeviceEventCreateRequest api) throws SiteWhereException { api.setAlternateId(grpc.hasAlternateId() ? grpc.getAlternateId().getValue() : null); api.setEventDate(CommonModelConverter.asApiDate(grpc.getEventDate())); api.setUpdateState(grpc.hasUpdateState() ? grpc.getUpdateState().getValue() : false); api.setMetadata(grpc.getMetadataMap()); }
public Builder<T> trackState() { getRequest().setUpdateState(true); return this; } }
public Builder<T> on(Date date) { getRequest().setEventDate(date); return this; }