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.
  int64 start = 1 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER, (sebuf.http.query) = { name: "start" }];
  // End of time range (inclusive), Unix epoch milliseconds.
  int64 end = 2 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER, (sebuf.http.query) = { name: "end" }];
  // Maximum items per page (1-100).
  int32 page_size = 3 [(sebuf.http.query) = { name: "page_size" }];
  // Cursor for next page.
  string cursor = 4 [(sebuf.http.query) = { name: "cursor" }];
  // North-east latitude of bounding box.
  double ne_lat = 5 [(sebuf.http.query) = { name: "ne_lat" }];
  // North-east longitude of bounding box.
  double ne_lon = 6 [(sebuf.http.query) = { name: "ne_lon" }];
  // South-west latitude of bounding box.
  double sw_lat = 7 [(sebuf.http.query) = { name: "sw_lat" }];
  // South-west longitude of bounding box.
  double sw_lon = 8 [(sebuf.http.query) = { name: "sw_lon" }];
}

// 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;
}
