syntax = "proto3";

package worldmonitor.wildfire.v1;

import "sebuf/http/annotations.proto";
import "worldmonitor/core/v1/pagination.proto";
import "worldmonitor/wildfire/v1/fire_detection.proto";

// ListFireDetectionsRequest specifies filters for retrieving fire detections from NASA FIRMS.
message ListFireDetectionsRequest {
  // Start of time range (inclusive), Unix epoch milliseconds.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  int64 start = 1 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER, (sebuf.http.query) = { name: "start" }, (sebuf.http.unimplemented) = true];
  // End of time range (inclusive), Unix epoch milliseconds.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  int64 end = 2 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER, (sebuf.http.query) = { name: "end" }, (sebuf.http.unimplemented) = true];
  // Maximum items per page (1-100).
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  int32 page_size = 3 [(sebuf.http.query) = { name: "page_size" }, (sebuf.http.unimplemented) = true];
  // Cursor for next page.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  string cursor = 4 [(sebuf.http.query) = { name: "cursor" }, (sebuf.http.unimplemented) = true];
  // North-east latitude of bounding box.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  double ne_lat = 5 [(sebuf.http.query) = { name: "ne_lat" }, (sebuf.http.unimplemented) = true];
  // North-east longitude of bounding box.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  double ne_lon = 6 [(sebuf.http.query) = { name: "ne_lon" }, (sebuf.http.unimplemented) = true];
  // South-west latitude of bounding box.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  double sw_lat = 7 [(sebuf.http.query) = { name: "sw_lat" }, (sebuf.http.unimplemented) = true];
  // South-west longitude of bounding box.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  double sw_lon = 8 [(sebuf.http.query) = { name: "sw_lon" }, (sebuf.http.unimplemented) = true];
}

// ListFireDetectionsResponse contains the list of fire detections matching the request filters.
message ListFireDetectionsResponse {
  // The list of fire detections.
  repeated FireDetection fire_detections = 1;
  // Pagination metadata.
  worldmonitor.core.v1.PaginationResponse pagination = 2;
  // Time the seed snapshot was fetched, as Unix epoch milliseconds. A value of
  // 0 means the snapshot is unavailable/degraded, not that there are confirmed
  // zero active fires.
  int64 fetched_at = 3 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER];
  // True when fire_detections came from a seed snapshot. False means an empty
  // payload is graceful degradation because the snapshot is unavailable.
  bool data_available = 4;
}
