bayesline.api.IncidentSummary#

pydantic model bayesline.api.IncidentSummary#

A summary of incidents within a date and index range.

Parameters#

itemslist[IncidentSummaryItem]

List of incident summary items.

start_datedatetime.datetime

The start date of the range.

end_datedatetime.datetime

The end date of the range.

n_startint

The starting index number.

n_endint

The ending index number.

n_moreint

The number of additional incidents beyond the requested range.

Show JSON schema
{
   "title": "IncidentSummary",
   "description": "A summary of incidents within a date and index range.\n\nParameters\n----------\nitems : list[IncidentSummaryItem]\n    List of incident summary items.\nstart_date : datetime.datetime\n    The start date of the range.\nend_date : datetime.datetime\n    The end date of the range.\nn_start : int\n    The starting index number.\nn_end : int\n    The ending index number.\nn_more : int\n    The number of additional incidents beyond the requested range.",
   "type": "object",
   "properties": {
      "items": {
         "items": {
            "$ref": "#/$defs/IncidentSummaryItem"
         },
         "title": "Items",
         "type": "array"
      },
      "start_date": {
         "format": "date-time",
         "title": "Start Date",
         "type": "string"
      },
      "end_date": {
         "format": "date-time",
         "title": "End Date",
         "type": "string"
      },
      "n_start": {
         "title": "N Start",
         "type": "integer"
      },
      "n_end": {
         "title": "N End",
         "type": "integer"
      },
      "n_more": {
         "title": "N More",
         "type": "integer"
      }
   },
   "$defs": {
      "IncidentSummaryItem": {
         "description": "A single incident summary item.\n\nParameters\n----------\ndatetime : datetime.datetime\n    The datetime when the incident occurred.\nincident_id : str\n    The unique identifier for the incident.\nsource : str\n    The source system that reported the incident.",
         "properties": {
            "datetime": {
               "format": "date-time",
               "title": "Datetime",
               "type": "string"
            },
            "incident_id": {
               "title": "Incident Id",
               "type": "string"
            },
            "source": {
               "title": "Source",
               "type": "string"
            }
         },
         "required": [
            "datetime",
            "incident_id",
            "source"
         ],
         "title": "IncidentSummaryItem",
         "type": "object"
      }
   },
   "required": [
      "items",
      "start_date",
      "end_date",
      "n_start",
      "n_end",
      "n_more"
   ]
}

Fields:
  • end_date (datetime.datetime)

  • items (list[bayesline.api._src.maintenance.IncidentSummaryItem])

  • n_end (int)

  • n_more (int)

  • n_start (int)

  • start_date (datetime.datetime)

field items: list[IncidentSummaryItem] [Required]#
field start_date: datetime [Required]#
field end_date: datetime [Required]#
field n_start: int [Required]#
field n_end: int [Required]#
field n_more: int [Required]#