{
  "swagger": "2.0",
  "info": {
    "title": "Event service",
    "version": "0.1507.0",
    "description": "Send your API key as a bearer token: `Authorization: Bearer <api key>`."
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Your API key as a bearer token: `Authorization: Bearer <api key>`."
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/event/v1/events": {
      "post": {
        "operationId": "EventService_createEvent",
        "summary": "Create event",
        "tags": [
          "Event Service"
        ],
        "description": "Creates an event.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateEvent"
            },
            "required": true,
            "x-example": {
              "timestamp": {
                "seconds": 1,
                "nanos": 1
              },
              "duration": {
                "seconds": 1,
                "nanos": 1
              },
              "name": "<name>",
              "type": "INFO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Event"
            },
            "x-example": {
              "uuid": "<uuid>",
              "rid": "<event rid>",
              "assetRids": [
                "<asset rid>"
              ],
              "origins": [
                {
                  "type": "workbook",
                  "workbook": {
                    "rid": "<notebook rid>",
                    "data": [
                      {
                        "type": "timeSeriesChannel",
                        "timeSeriesChannel": {
                          "variableName": "<variable name>",
                          "tags": {
                            "<key>": "<value>"
                          }
                        }
                      }
                    ]
                  }
                }
              ],
              "timestamp": {
                "seconds": 1,
                "nanos": 1
              },
              "duration": {
                "seconds": 1,
                "nanos": 1
              },
              "name": "<name>",
              "description": "<description>",
              "type": "INFO",
              "labels": [
                "<label>"
              ],
              "properties": {
                "<key>": "<property value>"
              },
              "typedProperties": {
                "<key>": {
                  "type": "stringValue",
                  "stringValue": "<property value>"
                }
              },
              "isArchived": true,
              "createdBy": "<user rid>",
              "disposition": {
                "priority": "P0",
                "state": {
                  "type": "pendingReview",
                  "pendingReview": {
                    "openedBy": "<user rid>"
                  }
                },
                "assignees": [
                  "<user rid>"
                ]
              }
            }
          }
        }
      }
    },
    "/event/v1/get-events": {
      "post": {
        "operationId": "EventService_getEvents",
        "summary": "Get events",
        "tags": [
          "Event Service"
        ],
        "description": "Gets a set of events by UUIDs",
        "deprecated": true,
        "x-deprecated": "This endpoint is deprecated. Use the batchGetEvents endpoint instead.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/GetEvents"
            },
            "required": true,
            "x-example": {
              "uuids": [
                "<uuids>"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Event"
              },
              "uniqueItems": true
            },
            "x-example": [
              {
                "uuid": "<uuid>",
                "rid": "<event rid>",
                "assetRids": [
                  "<asset rid>"
                ],
                "origins": [
                  {
                    "type": "workbook",
                    "workbook": {
                      "rid": "<notebook rid>",
                      "data": [
                        {
                          "type": "timeSeriesChannel",
                          "timeSeriesChannel": {
                            "variableName": "<variable name>",
                            "tags": {
                              "<key>": "<value>"
                            }
                          }
                        }
                      ]
                    }
                  }
                ],
                "timestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "duration": {
                  "seconds": 1,
                  "nanos": 1
                },
                "name": "<name>",
                "description": "<description>",
                "type": "INFO",
                "labels": [
                  "<label>"
                ],
                "properties": {
                  "<key>": "<property value>"
                },
                "typedProperties": {
                  "<key>": {
                    "type": "stringValue",
                    "stringValue": "<property value>"
                  }
                },
                "isArchived": true,
                "createdBy": "<user rid>",
                "disposition": {
                  "priority": "P0",
                  "state": {
                    "type": "pendingReview",
                    "pendingReview": {
                      "openedBy": "<user rid>"
                    }
                  },
                  "assignees": [
                    "<user rid>"
                  ]
                }
              }
            ]
          }
        }
      }
    },
    "/event/v1/events/batch-get": {
      "post": {
        "operationId": "EventService_batchGetEvents",
        "summary": "Batch get events",
        "tags": [
          "Event Service"
        ],
        "description": "Gets a set of events by RID.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "rid",
                "x-alias": "EventRid"
              },
              "uniqueItems": true,
              "example": [
                "<event rid>"
              ]
            },
            "required": false,
            "x-example": [
              "<event rid>"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Event"
              },
              "uniqueItems": true
            },
            "x-example": [
              {
                "uuid": "<uuid>",
                "rid": "<event rid>",
                "assetRids": [
                  "<asset rid>"
                ],
                "origins": [
                  {
                    "type": "workbook",
                    "workbook": {
                      "rid": "<notebook rid>",
                      "data": [
                        {
                          "type": "timeSeriesChannel",
                          "timeSeriesChannel": {
                            "variableName": "<variable name>",
                            "tags": {
                              "<key>": "<value>"
                            }
                          }
                        }
                      ]
                    }
                  }
                ],
                "timestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "duration": {
                  "seconds": 1,
                  "nanos": 1
                },
                "name": "<name>",
                "description": "<description>",
                "type": "INFO",
                "labels": [
                  "<label>"
                ],
                "properties": {
                  "<key>": "<property value>"
                },
                "typedProperties": {
                  "<key>": {
                    "type": "stringValue",
                    "stringValue": "<property value>"
                  }
                },
                "isArchived": true,
                "createdBy": "<user rid>",
                "disposition": {
                  "priority": "P0",
                  "state": {
                    "type": "pendingReview",
                    "pendingReview": {
                      "openedBy": "<user rid>"
                    }
                  },
                  "assignees": [
                    "<user rid>"
                  ]
                }
              }
            ]
          }
        }
      }
    },
    "/event/v1/events/batch-filter-get": {
      "post": {
        "operationId": "EventService_batchFilterEvents",
        "summary": "Batch filter events",
        "tags": [
          "Event Service"
        ],
        "description": "Gets a filtered set of events by RID and search filters.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/BatchFilterEventsRequest"
            },
            "required": true,
            "x-example": {
              "filterQuery": {
                "type": "archived",
                "archived": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Event"
              },
              "uniqueItems": true
            },
            "x-example": [
              {
                "uuid": "<uuid>",
                "rid": "<event rid>",
                "assetRids": [
                  "<asset rid>"
                ],
                "origins": [
                  {
                    "type": "workbook",
                    "workbook": {
                      "rid": "<notebook rid>",
                      "data": [
                        {
                          "type": "timeSeriesChannel",
                          "timeSeriesChannel": {
                            "variableName": "<variable name>",
                            "tags": {
                              "<key>": "<value>"
                            }
                          }
                        }
                      ]
                    }
                  }
                ],
                "timestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "duration": {
                  "seconds": 1,
                  "nanos": 1
                },
                "name": "<name>",
                "description": "<description>",
                "type": "INFO",
                "labels": [
                  "<label>"
                ],
                "properties": {
                  "<key>": "<property value>"
                },
                "typedProperties": {
                  "<key>": {
                    "type": "stringValue",
                    "stringValue": "<property value>"
                  }
                },
                "isArchived": true,
                "createdBy": "<user rid>",
                "disposition": {
                  "priority": "P0",
                  "state": {
                    "type": "pendingReview",
                    "pendingReview": {
                      "openedBy": "<user rid>"
                    }
                  },
                  "assignees": [
                    "<user rid>"
                  ]
                }
              }
            ]
          }
        }
      }
    },
    "/event/v1/update-event": {
      "post": {
        "operationId": "EventService_updateEvent",
        "summary": "Update event",
        "tags": [
          "Event Service"
        ],
        "description": "Updates the fields of an event. Empty fields are left unchanged.",
        "deprecated": true,
        "x-deprecated": "This endpoint is deprecated. Use the batchUpdateEvent endpoint instead.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateEvent"
            },
            "required": true,
            "x-example": {
              "uuid": "<uuid>"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Event"
            },
            "x-example": {
              "uuid": "<uuid>",
              "rid": "<event rid>",
              "assetRids": [
                "<asset rid>"
              ],
              "origins": [
                {
                  "type": "workbook",
                  "workbook": {
                    "rid": "<notebook rid>",
                    "data": [
                      {
                        "type": "timeSeriesChannel",
                        "timeSeriesChannel": {
                          "variableName": "<variable name>",
                          "tags": {
                            "<key>": "<value>"
                          }
                        }
                      }
                    ]
                  }
                }
              ],
              "timestamp": {
                "seconds": 1,
                "nanos": 1
              },
              "duration": {
                "seconds": 1,
                "nanos": 1
              },
              "name": "<name>",
              "description": "<description>",
              "type": "INFO",
              "labels": [
                "<label>"
              ],
              "properties": {
                "<key>": "<property value>"
              },
              "typedProperties": {
                "<key>": {
                  "type": "stringValue",
                  "stringValue": "<property value>"
                }
              },
              "isArchived": true,
              "createdBy": "<user rid>",
              "disposition": {
                "priority": "P0",
                "state": {
                  "type": "pendingReview",
                  "pendingReview": {
                    "openedBy": "<user rid>"
                  }
                },
                "assignees": [
                  "<user rid>"
                ]
              }
            }
          }
        }
      }
    },
    "/event/v1/events/batch-update": {
      "post": {
        "operationId": "EventService_batchUpdateEvent",
        "summary": "Batch update event",
        "tags": [
          "Event Service"
        ],
        "description": "Updates the fields of an event specified by each request in the batch. Empty fields in the UpdateEventRequest are left unchanged.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/BatchUpdateEventRequest"
            },
            "required": true,
            "x-example": {
              "requests": [
                {
                  "rid": "<event rid>"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchUpdateEventResponse"
            },
            "x-example": {
              "events": [
                {
                  "uuid": "<uuid>",
                  "rid": "<event rid>",
                  "assetRids": [
                    "<asset rid>"
                  ],
                  "origins": [
                    {
                      "type": "workbook",
                      "workbook": {
                        "rid": "<notebook rid>",
                        "data": [
                          {
                            "type": "timeSeriesChannel",
                            "timeSeriesChannel": {
                              "variableName": "<variable name>",
                              "tags": {
                                "<key>": "<value>"
                              }
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "timestamp": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "duration": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "name": "<name>",
                  "description": "<description>",
                  "type": "INFO",
                  "labels": [
                    "<label>"
                  ],
                  "properties": {
                    "<key>": "<property value>"
                  },
                  "typedProperties": {
                    "<key>": {
                      "type": "stringValue",
                      "stringValue": "<property value>"
                    }
                  },
                  "isArchived": true,
                  "createdBy": "<user rid>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "type": "pendingReview",
                      "pendingReview": {
                        "openedBy": "<user rid>"
                      }
                    },
                    "assignees": [
                      "<user rid>"
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    },
    "/event/v1/update-disposition": {
      "post": {
        "operationId": "EventService_batchUpdateDisposition",
        "summary": "Batch update disposition",
        "tags": [
          "Event Service"
        ],
        "description": "Updates the disposition of an event.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/BatchUpdateDispositionRequest"
            },
            "required": true,
            "x-example": {
              "requests": [
                {
                  "rid": "<event rid>"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchUpdateDispositionResponse"
            },
            "x-example": {
              "events": [
                {
                  "uuid": "<uuid>",
                  "rid": "<event rid>",
                  "assetRids": [
                    "<asset rid>"
                  ],
                  "origins": [
                    {
                      "type": "workbook",
                      "workbook": {
                        "rid": "<notebook rid>",
                        "data": [
                          {
                            "type": "timeSeriesChannel",
                            "timeSeriesChannel": {
                              "variableName": "<variable name>",
                              "tags": {
                                "<key>": "<value>"
                              }
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "timestamp": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "duration": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "name": "<name>",
                  "description": "<description>",
                  "type": "INFO",
                  "labels": [
                    "<label>"
                  ],
                  "properties": {
                    "<key>": "<property value>"
                  },
                  "typedProperties": {
                    "<key>": {
                      "type": "stringValue",
                      "stringValue": "<property value>"
                    }
                  },
                  "isArchived": true,
                  "createdBy": "<user rid>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "type": "pendingReview",
                      "pendingReview": {
                        "openedBy": "<user rid>"
                      }
                    },
                    "assignees": [
                      "<user rid>"
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    },
    "/event/v1/archive-event": {
      "post": {
        "operationId": "EventService_archiveEvent",
        "summary": "Archive event",
        "tags": [
          "Event Service"
        ],
        "description": "Archives an event",
        "deprecated": true,
        "x-deprecated": "This endpoint is deprecated. Use the batchArchiveEvents endpoint instead.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/ArchiveEvent"
            },
            "required": true,
            "x-example": {
              "uuid": "<uuid>"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/event/v1/batch-archive-events": {
      "post": {
        "operationId": "EventService_batchArchiveEvent",
        "summary": "Batch archive event",
        "tags": [
          "Event Service"
        ],
        "description": "Archives a set of events",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "rid",
                "x-alias": "EventRid"
              },
              "uniqueItems": true,
              "example": [
                "<event rid>"
              ]
            },
            "required": false,
            "x-example": [
              "<event rid>"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/event/v1/batch-unarchive-events": {
      "post": {
        "operationId": "EventService_batchUnarchiveEvent",
        "summary": "Batch unarchive event",
        "tags": [
          "Event Service"
        ],
        "description": "Unarchives a set of events",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "rid",
                "x-alias": "EventRid"
              },
              "uniqueItems": true,
              "example": [
                "<event rid>"
              ]
            },
            "required": false,
            "x-example": [
              "<event rid>"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/event/v1/search-events": {
      "post": {
        "operationId": "EventService_searchEvents",
        "summary": "Search events",
        "tags": [
          "Event Service"
        ],
        "description": "Searches for events that match the given filters.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/SearchEventsRequest"
            },
            "required": true,
            "x-example": {
              "sort": {
                "isDescending": true,
                "field": "START_TIME"
              },
              "pageSize": 1,
              "query": {
                "type": "archived",
                "archived": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SearchEventsResponse"
            },
            "x-example": {
              "results": [
                {
                  "uuid": "<uuid>",
                  "rid": "<event rid>",
                  "assetRids": [
                    "<asset rid>"
                  ],
                  "origins": [
                    {
                      "type": "workbook",
                      "workbook": {
                        "rid": "<notebook rid>",
                        "data": [
                          {
                            "type": "timeSeriesChannel",
                            "timeSeriesChannel": {
                              "variableName": "<variable name>",
                              "tags": {
                                "<key>": "<value>"
                              }
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "timestamp": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "duration": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "name": "<name>",
                  "description": "<description>",
                  "type": "INFO",
                  "labels": [
                    "<label>"
                  ],
                  "properties": {
                    "<key>": "<property value>"
                  },
                  "typedProperties": {
                    "<key>": {
                      "type": "stringValue",
                      "stringValue": "<property value>"
                    }
                  },
                  "isArchived": true,
                  "createdBy": "<user rid>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "type": "pendingReview",
                      "pendingReview": {
                        "openedBy": "<user rid>"
                      }
                    },
                    "assignees": [
                      "<user rid>"
                    ]
                  }
                }
              ],
              "nextPageToken": "<token>"
            }
          }
        }
      }
    },
    "/event/v1/aggregate-events": {
      "post": {
        "operationId": "EventService_aggregateEvents",
        "summary": "Aggregate events",
        "tags": [
          "Event Service"
        ],
        "description": "Searches for events matching the given filter and aggregates them based on the requested functions.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AggregateEventsRequest"
            },
            "required": true,
            "x-example": {
              "query": {
                "type": "archived",
                "archived": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AggregateEventsResponse"
            },
            "x-example": {
              "values": {
                "<key>": {
                  "type": "duration",
                  "duration": {
                    "seconds": 1,
                    "nanos": 1
                  }
                }
              }
            }
          }
        }
      }
    },
    "/event/v1/aggregate-events/batch": {
      "post": {
        "operationId": "EventService_batchAggregateEvents",
        "summary": "Batch aggregate events",
        "tags": [
          "Event Service"
        ],
        "description": "Searches for events matching the given filter and aggregates them based on the requested functions. Returns a list of responses in same order as the batched requests.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/BatchAggregateEventsRequest"
            },
            "required": true,
            "x-example": {
              "requests": [
                {
                  "query": {
                    "type": "archived",
                    "archived": true
                  }
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchAggregateEventsResponse"
            },
            "x-example": {
              "responses": [
                {
                  "values": {
                    "<key>": {
                      "type": "duration",
                      "duration": {
                        "seconds": 1,
                        "nanos": 1
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    "/event/v1/histogram": {
      "post": {
        "operationId": "EventService_getEventsHistogram",
        "summary": "Get events histogram",
        "tags": [
          "Event Service"
        ],
        "description": "Gets a histogram of events that match the given filters.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/EventsHistogramRequest"
            },
            "required": true,
            "x-example": {
              "startInclusive": {
                "seconds": 1,
                "nanos": 1
              },
              "endExclusive": {
                "seconds": 1,
                "nanos": 1
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/EventsHistogramResponse"
            },
            "x-example": {
              "buckets": [
                {
                  "startInclusive": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "endExclusive": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "count": 1
                }
              ]
            }
          }
        }
      }
    },
    "/event/v1/list-properties-labels": {
      "post": {
        "operationId": "EventService_listPropertiesAndLabels",
        "summary": "List properties and labels",
        "tags": [
          "Event Service"
        ],
        "description": "Lists the properties and labels of active events in the provided workspaces. Returns up to 500 of the most-used labels, and up to 500 of the most-used values for each property key. Property keys are not capped. Response maps and sets are unordered.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/ListPropertiesAndLabelsRequest"
            },
            "required": true,
            "x-example": {
              "workspaces": [
                "<workspace rid>"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListPropertiesAndLabelsResponse"
            },
            "x-example": {
              "properties": {
                "<key>": [
                  "<property value>"
                ]
              },
              "labels": [
                "<label>"
              ]
            }
          }
        }
      }
    }
  },
  "definitions": {
    "ArchivedStatus": {
      "type": "string",
      "enum": [
        "NOT_ARCHIVED",
        "ARCHIVED"
      ]
    },
    "NumericPropertyPredicate": {
      "description": "Matches resources that have a numeric value for the named property and whose value satisfies the operator. NEQ excludes resources that lack the property or store a string value under the same name.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "value": {
          "type": "number",
          "format": "double"
        },
        "operator": {
          "$ref": "#/definitions/PropertyComparisonOperator"
        }
      },
      "required": [
        "name",
        "value",
        "operator"
      ]
    },
    "NumericPropertyRangeOperator": {
      "type": "string",
      "enum": [
        "BETWEEN",
        "NOT_BETWEEN"
      ]
    },
    "NumericPropertyRangePredicate": {
      "description": "Inclusive range on a numeric property. At least one bound is required. BETWEEN: min <= x <= max. An absent bound is unbounded on that side. NOT_BETWEEN: x < min OR x > max. An absent bound drops that side. Both operators require a numeric value for `name`. Missing properties and string values never match. Bounds are closed [min, max] to match the number chip (is between / is not between), not half-open.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "min": {
          "type": "number",
          "format": "double"
        },
        "max": {
          "type": "number",
          "format": "double"
        },
        "operator": {
          "$ref": "#/definitions/NumericPropertyRangeOperator"
        }
      },
      "required": [
        "name",
        "operator"
      ]
    },
    "Property": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "value": {
          "type": "string",
          "x-alias": "PropertyValue"
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "PropertyComparisonOperator": {
      "type": "string",
      "enum": [
        "EQ",
        "NEQ",
        "GT",
        "GTE",
        "LT",
        "LTE"
      ]
    },
    "SetOperator": {
      "type": "string",
      "enum": [
        "AND",
        "OR"
      ]
    },
    "Timestamp": {
      "description": "Deprecated for new APIs. Use google.protobuf.Timestamp for absolute instants in proto APIs.\n\nThis legacy nanosecond precision timestamp type is represented by an epoch time in seconds and a nanosecond offset. The nanosecond offset is from the start of the epoch second, so must be less than 1 billion.",
      "type": "object",
      "properties": {
        "seconds": {
          "type": "integer",
          "format": "int64"
        },
        "nanos": {
          "type": "integer",
          "format": "int64"
        }
      },
      "required": [
        "seconds",
        "nanos"
      ]
    },
    "TypedPropertyValue": {
      "description": "Typed metadata value. Additional variants may be added as property types expand.\n\nSet `type` to the name of one of the other fields, and set only that field.",
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "stringValue",
            "numericValue"
          ]
        },
        "stringValue": {
          "type": "string",
          "x-alias": "PropertyValue"
        },
        "numericValue": {
          "type": "number",
          "format": "double"
        }
      },
      "required": [
        "type"
      ],
      "example": {
        "type": "stringValue",
        "stringValue": "string"
      }
    },
    "AggregateEventsRequest": {
      "type": "object",
      "properties": {
        "query": {
          "$ref": "#/definitions/SearchQuery"
        },
        "aggregateTypes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AggregateType"
          },
          "uniqueItems": true
        }
      },
      "required": [
        "query"
      ],
      "example": {
        "query": {
          "type": "archived",
          "archived": true
        }
      }
    },
    "AggregateEventsResponse": {
      "type": "object",
      "properties": {
        "values": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/AggregateValue"
          }
        }
      }
    },
    "AggregateType": {
      "type": "string",
      "enum": [
        "TOTAL_DURATION",
        "TOTAL_COUNT"
      ]
    },
    "AggregateValue": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "duration",
            "count"
          ]
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "count": {
          "type": "integer",
          "format": "int32"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "duration",
        "duration": {
          "seconds": 1,
          "nanos": 1
        }
      }
    },
    "ApiEventOrigin": {
      "type": "object",
      "properties": {}
    },
    "ArchiveEvent": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid"
        }
      },
      "required": [
        "uuid"
      ],
      "example": {
        "uuid": "<uuid>"
      }
    },
    "AssetsFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "assets": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid"
          }
        }
      },
      "required": [
        "operator"
      ]
    },
    "AssigneesFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "assignees": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "UserRid"
          }
        }
      },
      "required": [
        "operator"
      ]
    },
    "BatchAggregateEventsRequest": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AggregateEventsRequest"
          }
        }
      },
      "example": {
        "requests": [
          {
            "query": {
              "type": "archived",
              "archived": true
            }
          }
        ]
      }
    },
    "BatchAggregateEventsResponse": {
      "type": "object",
      "properties": {
        "responses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AggregateEventsResponse"
          }
        }
      }
    },
    "BatchFilterEventsRequest": {
      "type": "object",
      "properties": {
        "eventRids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "EventRid"
          },
          "uniqueItems": true
        },
        "filterQuery": {
          "$ref": "#/definitions/SearchQuery"
        }
      },
      "required": [
        "filterQuery"
      ],
      "example": {
        "filterQuery": {
          "type": "archived",
          "archived": true
        }
      }
    },
    "BatchUpdateDispositionRequest": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UpdateDispositionRequest"
          },
          "uniqueItems": true
        }
      },
      "example": {
        "requests": [
          {
            "rid": "<event rid>"
          }
        ]
      }
    },
    "BatchUpdateDispositionResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Event"
          },
          "uniqueItems": true
        }
      }
    },
    "BatchUpdateEventRequest": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UpdateEventRequest"
          }
        }
      },
      "example": {
        "requests": [
          {
            "rid": "<event rid>"
          }
        ]
      }
    },
    "BatchUpdateEventResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Event"
          }
        }
      }
    },
    "CheckOriginMetadata": {
      "type": "object",
      "properties": {
        "checkEvaluationRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "AutomaticCheckEvaluationRid"
        },
        "checkRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "CheckRid"
        },
        "checkLineageRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "CheckLineageRid"
        },
        "implementationIndex": {
          "type": "integer",
          "format": "int32"
        }
      },
      "required": [
        "checkEvaluationRid",
        "checkRid",
        "checkLineageRid"
      ]
    },
    "CreateEvent": {
      "type": "object",
      "properties": {
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid"
          },
          "uniqueItems": true,
          "description": "Must contain at least one asset rid."
        },
        "origins": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventOrigin"
          },
          "uniqueItems": true,
          "description": "If empty, will default to set<EventOrigin.api>."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string",
          "description": "If not provided, will default to an empty string."
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "x-map-key": "PropertyName",
          "x-deprecated": "use typedProperties"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          },
          "x-map-key": "PropertyName"
        },
        "disposition": {
          "$ref": "#/definitions/EventDisposition"
        }
      },
      "required": [
        "timestamp",
        "duration",
        "name",
        "type"
      ],
      "example": {
        "timestamp": {
          "seconds": 1,
          "nanos": 1
        },
        "duration": {
          "seconds": 1,
          "nanos": 1
        },
        "name": "<name>",
        "type": "INFO"
      }
    },
    "DataReviewChecksFilter": {
      "type": "object",
      "properties": {
        "dataReviewChecks": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "CheckRid"
          }
        }
      }
    },
    "DataReviewEventOrigin": {
      "type": "object",
      "properties": {
        "dataReviewRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "DataReviewRid"
        },
        "checkMetadata": {
          "allOf": [
            {
              "$ref": "#/definitions/CheckOriginMetadata"
            }
          ],
          "description": "Metadata about the check that created this event."
        }
      },
      "required": [
        "dataReviewRid",
        "checkMetadata"
      ]
    },
    "DataReviewsFilter": {
      "type": "object",
      "properties": {
        "dataReviews": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "DataReviewRid"
          }
        }
      }
    },
    "Event": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid",
          "x-deprecated": "This field is deprecated. Use the rid field instead."
        },
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "EventRid"
        },
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid"
          },
          "uniqueItems": true,
          "description": "A set of asset rids associated with the event."
        },
        "origins": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventOrigin"
          },
          "uniqueItems": true,
          "description": "A set of origins associated with the event."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "x-map-key": "PropertyName",
          "x-deprecated": "use typedProperties"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          },
          "x-map-key": "PropertyName"
        },
        "isArchived": {
          "type": "boolean"
        },
        "createdBy": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid",
          "description": "The user who created the event. This field may be missing for legacy events."
        },
        "disposition": {
          "$ref": "#/definitions/EventDisposition"
        }
      },
      "required": [
        "uuid",
        "rid",
        "timestamp",
        "duration",
        "name",
        "description",
        "type",
        "isArchived"
      ]
    },
    "EventDisposition": {
      "description": "Describes the review status for an event. This is used to track the disposition status of an event.",
      "type": "object",
      "properties": {
        "priority": {
          "$ref": "#/definitions/Priority"
        },
        "state": {
          "$ref": "#/definitions/DispositionState"
        },
        "assignees": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "UserRid"
          },
          "uniqueItems": true
        }
      },
      "required": [
        "priority",
        "state"
      ]
    },
    "EventDispositionStatus": {
      "type": "string",
      "enum": [
        "PENDING_REVIEW",
        "CLOSED_IGNORED",
        "CLOSED_REQUIRES_FURTHER_ACTION",
        "NO_DISPOSITION"
      ]
    },
    "EventOrigin": {
      "description": "Describes where an event came from.\n\nSet `type` to the name of one of the other fields, and set only that field.",
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workbook",
            "template",
            "api",
            "dataReview",
            "procedure",
            "streamingChecklist"
          ]
        },
        "workbook": {
          "allOf": [
            {
              "$ref": "#/definitions/WorkbookEventOrigin"
            }
          ],
          "description": "This event was created in this workbook"
        },
        "template": {
          "allOf": [
            {
              "$ref": "#/definitions/TemplateEventOrigin"
            }
          ],
          "description": "This event was created in this template"
        },
        "api": {
          "allOf": [
            {
              "$ref": "#/definitions/ApiEventOrigin"
            }
          ],
          "description": "This event was created programmatically via the API"
        },
        "dataReview": {
          "allOf": [
            {
              "$ref": "#/definitions/DataReviewEventOrigin"
            }
          ],
          "description": "This event was created automatically from a checklist execution."
        },
        "procedure": {
          "allOf": [
            {
              "$ref": "#/definitions/ProcedureEventOrigin"
            }
          ],
          "description": "This event was created automatically from a procedure execution."
        },
        "streamingChecklist": {
          "allOf": [
            {
              "$ref": "#/definitions/StreamingChecklistEventOrigin"
            }
          ],
          "description": "This event was created automatically from the execution of a streaming checklist."
        }
      },
      "required": [
        "type"
      ],
      "example": {
        "type": "workbook",
        "workbook": {
          "rid": "string",
          "data": [
            {
              "type": "timeSeriesChannel",
              "timeSeriesChannel": {
                "variableName": "string",
                "tags": {
                  "key": "string"
                }
              }
            }
          ]
        }
      }
    },
    "EventTimeFilter": {
      "type": "object",
      "properties": {
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "timestampCondition": {
          "$ref": "#/definitions/EventTimeFilterCondition"
        }
      },
      "required": [
        "timestamp",
        "timestampCondition"
      ]
    },
    "EventTimeFilterCondition": {
      "type": "string",
      "enum": [
        "START_TIME_BEFORE_INCLUSIVE",
        "START_TIME_BEFORE_EXCLUSIVE",
        "START_TIME_AFTER_INCLUSIVE",
        "START_TIME_AFTER_EXCLUSIVE",
        "END_TIME_BEFORE_INCLUSIVE",
        "END_TIME_BEFORE_EXCLUSIVE",
        "END_TIME_AFTER_INCLUSIVE",
        "END_TIME_AFTER_EXCLUSIVE"
      ]
    },
    "EventType": {
      "type": "string",
      "enum": [
        "INFO",
        "FLAG",
        "ERROR",
        "SUCCESS"
      ]
    },
    "EventsHistogramBucket": {
      "type": "object",
      "properties": {
        "startInclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "endExclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "count": {
          "type": "integer",
          "format": "int32"
        }
      },
      "required": [
        "startInclusive",
        "endExclusive",
        "count"
      ]
    },
    "EventsHistogramRequest": {
      "type": "object",
      "properties": {
        "startInclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "endExclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "filterQuery": {
          "allOf": [
            {
              "$ref": "#/definitions/HistogramFilterQuery"
            }
          ],
          "description": "The query to filter the events to be included in the histogram."
        },
        "archivedStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ArchivedStatus"
          },
          "uniqueItems": true,
          "description": "Filters search on check alerts based on the archived statuses provided. Default is NOT_ARCHIVED only if none are provided."
        },
        "numBins": {
          "type": "integer",
          "format": "int32",
          "description": "Defaults to 100. Throws if larger than 1_000. The resulting histogram may have fewer bins than requested if the requested time window is too small."
        },
        "eventLimit": {
          "type": "integer",
          "format": "int32",
          "description": "Limits the number of events to be included in the histogram. Defaults to 1_000. Throws if larger than 10_000."
        }
      },
      "required": [
        "startInclusive",
        "endExclusive"
      ],
      "example": {
        "startInclusive": {
          "seconds": 1,
          "nanos": 1
        },
        "endExclusive": {
          "seconds": 1,
          "nanos": 1
        }
      }
    },
    "EventsHistogramResponse": {
      "type": "object",
      "properties": {
        "buckets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventsHistogramBucket"
          }
        }
      }
    },
    "GetEvents": {
      "type": "object",
      "properties": {
        "uuids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "uniqueItems": true
        }
      },
      "example": {
        "uuids": [
          "<uuids>"
        ]
      }
    },
    "HistogramFilterQuery": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "searchText",
            "asset",
            "template",
            "workbook",
            "dataReview",
            "originType",
            "dataReviewCheck",
            "dispositionStatus",
            "priority",
            "assignee",
            "eventType",
            "createdBy",
            "label",
            "property",
            "and",
            "or",
            "not",
            "workspace",
            "procedure",
            "procedureExecution",
            "stepId"
          ]
        },
        "searchText": {
          "type": "string"
        },
        "asset": {
          "type": "string",
          "format": "rid",
          "x-alias": "AssetRid"
        },
        "template": {
          "type": "string",
          "format": "rid",
          "x-alias": "TemplateRid"
        },
        "workbook": {
          "type": "string",
          "format": "rid",
          "x-alias": "NotebookRid"
        },
        "dataReview": {
          "type": "string",
          "format": "rid",
          "x-alias": "DataReviewRid"
        },
        "originType": {
          "$ref": "#/definitions/SearchEventOriginType"
        },
        "dataReviewCheck": {
          "type": "string",
          "format": "rid",
          "x-alias": "CheckRid"
        },
        "dispositionStatus": {
          "$ref": "#/definitions/EventDispositionStatus"
        },
        "priority": {
          "$ref": "#/definitions/Priority"
        },
        "assignee": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid"
        },
        "eventType": {
          "$ref": "#/definitions/EventType"
        },
        "createdBy": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid"
        },
        "label": {
          "type": "string",
          "x-alias": "Label"
        },
        "property": {
          "$ref": "#/definitions/Property"
        },
        "and": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HistogramFilterQuery"
          }
        },
        "or": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HistogramFilterQuery"
          }
        },
        "not": {
          "$ref": "#/definitions/HistogramFilterQuery"
        },
        "workspace": {
          "type": "string",
          "format": "rid",
          "x-alias": "WorkspaceRid"
        },
        "procedure": {
          "type": "string",
          "format": "rid",
          "x-alias": "ProcedureRid"
        },
        "procedureExecution": {
          "type": "string",
          "format": "rid",
          "x-alias": "ProcedureExecutionRid"
        },
        "stepId": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "searchText",
        "searchText": "string"
      }
    },
    "ListPropertiesAndLabelsRequest": {
      "type": "object",
      "properties": {
        "workspaces": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "WorkspaceRid"
          },
          "uniqueItems": true,
          "description": "If omitted, results will come from all workspaces the user belongs to."
        }
      },
      "example": {
        "workspaces": [
          "<workspace rid>"
        ]
      }
    },
    "OriginTypesFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "originTypes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchEventOriginType"
          }
        }
      },
      "required": [
        "operator"
      ]
    },
    "ProcedureEventOrigin": {
      "type": "object",
      "properties": {
        "procedureExecutionRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "ProcedureExecutionRid"
        },
        "procedureRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "ProcedureRid"
        },
        "stepId": {
          "type": "string"
        }
      },
      "required": [
        "procedureExecutionRid",
        "procedureRid",
        "stepId"
      ]
    },
    "SearchEventOriginType": {
      "type": "string",
      "enum": [
        "WORKBOOK",
        "TEMPLATE",
        "API",
        "DATA_REVIEW",
        "PROCEDURE",
        "STREAMING_CHECKLIST"
      ]
    },
    "SearchEventsRequest": {
      "type": "object",
      "properties": {
        "sort": {
          "$ref": "#/definitions/SortOptions"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "description": "Will reject page sizes greater than 10k."
        },
        "nextPageToken": {
          "type": "string",
          "x-alias": "Token"
        },
        "query": {
          "$ref": "#/definitions/SearchQuery"
        },
        "archivedStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ArchivedStatus"
          },
          "uniqueItems": true,
          "description": "Default search status is NOT_ARCHIVED if none are provided. Allows for including archived events in search."
        }
      },
      "required": [
        "sort",
        "pageSize",
        "query"
      ],
      "example": {
        "sort": {
          "isDescending": true,
          "field": "START_TIME"
        },
        "pageSize": 1,
        "query": {
          "type": "archived",
          "archived": true
        }
      }
    },
    "SearchEventsResponse": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Event"
          }
        },
        "nextPageToken": {
          "type": "string",
          "x-alias": "Token"
        }
      }
    },
    "SearchQuery": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "archived",
            "searchText",
            "exactMatch",
            "after",
            "before",
            "advancedTimeFilter",
            "asset",
            "assets",
            "template",
            "workbook",
            "dataReview",
            "dataReviews",
            "originType",
            "originTypes",
            "dataReviewCheck",
            "dataReviewChecks",
            "dispositionStatus",
            "dispositionStatuses",
            "priority",
            "priorities",
            "assignee",
            "assignees",
            "eventType",
            "eventTypes",
            "createdBy",
            "createdByAnyOf",
            "label",
            "labels",
            "property",
            "properties",
            "and",
            "or",
            "not",
            "workspace",
            "procedure",
            "procedureExecution",
            "stepId",
            "streamingChecklist",
            "streamingCheck",
            "numericProperty",
            "numericPropertyRange"
          ]
        },
        "archived": {
          "type": "boolean"
        },
        "searchText": {
          "type": "string",
          "description": "Search text to perform fuzzy searching against."
        },
        "exactMatch": {
          "type": "string",
          "description": "Search text to perform exact matching against on the event name and description."
        },
        "after": {
          "allOf": [
            {
              "$ref": "#/definitions/Timestamp"
            }
          ],
          "description": "Filters to events after this timestamp, exclusive. This includes events that start before, but end after this time."
        },
        "before": {
          "allOf": [
            {
              "$ref": "#/definitions/Timestamp"
            }
          ],
          "description": "Filters to events before this timestamp, exclusive. This includes events that start before, but end after this time."
        },
        "advancedTimeFilter": {
          "$ref": "#/definitions/EventTimeFilter"
        },
        "asset": {
          "type": "string",
          "format": "rid",
          "x-alias": "AssetRid",
          "x-deprecated": "use assetRids"
        },
        "assets": {
          "$ref": "#/definitions/AssetsFilter"
        },
        "template": {
          "type": "string",
          "format": "rid",
          "x-alias": "TemplateRid"
        },
        "workbook": {
          "type": "string",
          "format": "rid",
          "x-alias": "NotebookRid"
        },
        "dataReview": {
          "type": "string",
          "format": "rid",
          "x-alias": "DataReviewRid",
          "x-deprecated": "use dataReviews instead"
        },
        "dataReviews": {
          "$ref": "#/definitions/DataReviewsFilter"
        },
        "originType": {
          "allOf": [
            {
              "$ref": "#/definitions/SearchEventOriginType"
            }
          ],
          "x-deprecated": "use originTypes instead"
        },
        "originTypes": {
          "$ref": "#/definitions/OriginTypesFilter"
        },
        "dataReviewCheck": {
          "type": "string",
          "format": "rid",
          "x-alias": "CheckRid",
          "x-deprecated": "use dataReviewChecks instead"
        },
        "dataReviewChecks": {
          "$ref": "#/definitions/DataReviewChecksFilter"
        },
        "dispositionStatus": {
          "allOf": [
            {
              "$ref": "#/definitions/EventDispositionStatus"
            }
          ],
          "x-deprecated": "use dispositionStatuses instead"
        },
        "dispositionStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventDispositionStatus"
          }
        },
        "priority": {
          "allOf": [
            {
              "$ref": "#/definitions/Priority"
            }
          ],
          "x-deprecated": "use priorities instead"
        },
        "priorities": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Priority"
          }
        },
        "assignee": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid",
          "x-deprecated": "use assignees instead"
        },
        "assignees": {
          "$ref": "#/definitions/AssigneesFilter"
        },
        "eventType": {
          "allOf": [
            {
              "$ref": "#/definitions/EventType"
            }
          ],
          "x-deprecated": "use eventTypes instead"
        },
        "eventTypes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventType"
          }
        },
        "createdBy": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid"
        },
        "createdByAnyOf": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "UserRid"
          }
        },
        "label": {
          "type": "string",
          "x-alias": "Label",
          "x-deprecated": "use labels instead"
        },
        "labels": {
          "$ref": "#/definitions/LabelsFilter"
        },
        "property": {
          "allOf": [
            {
              "$ref": "#/definitions/Property"
            }
          ],
          "x-deprecated": "use properties instead"
        },
        "properties": {
          "$ref": "#/definitions/PropertiesFilter"
        },
        "and": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchQuery"
          }
        },
        "or": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchQuery"
          }
        },
        "not": {
          "$ref": "#/definitions/SearchQuery"
        },
        "workspace": {
          "type": "string",
          "format": "rid",
          "x-alias": "WorkspaceRid"
        },
        "procedure": {
          "type": "string",
          "format": "rid",
          "x-alias": "ProcedureRid"
        },
        "procedureExecution": {
          "type": "string",
          "format": "rid",
          "x-alias": "ProcedureExecutionRid"
        },
        "stepId": {
          "type": "string"
        },
        "streamingChecklist": {
          "type": "string",
          "format": "rid",
          "x-alias": "ChecklistRid",
          "description": "Filters to events created from a checklist executing in streaming. Use `assets` to further filter to a specific streaming checklist instance."
        },
        "streamingCheck": {
          "type": "string",
          "format": "rid",
          "x-alias": "CheckRid",
          "description": "Filters to events created from the check of a checklist executing in streaming. Use `assets` to further filter to a specific streaming checklist instance."
        },
        "numericProperty": {
          "allOf": [
            {
              "$ref": "#/definitions/NumericPropertyPredicate"
            }
          ],
          "description": "Matches events using a numeric property comparison."
        },
        "numericPropertyRange": {
          "allOf": [
            {
              "$ref": "#/definitions/NumericPropertyRangePredicate"
            }
          ],
          "description": "Matches events using an inclusive numeric property range."
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "archived",
        "archived": true
      }
    },
    "SortField": {
      "type": "string",
      "enum": [
        "START_TIME",
        "END_TIME",
        "DURATION",
        "DISPOSITION_STATUS",
        "PRIORITY",
        "EVENT_NAME"
      ]
    },
    "SortOptions": {
      "type": "object",
      "properties": {
        "isDescending": {
          "type": "boolean"
        },
        "field": {
          "$ref": "#/definitions/SortField"
        }
      },
      "required": [
        "isDescending",
        "field"
      ]
    },
    "StreamingCheckOriginMetadata": {
      "type": "object",
      "properties": {
        "checkRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "CheckRid"
        },
        "checkLineageRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "CheckLineageRid"
        },
        "implementationIndex": {
          "type": "integer",
          "format": "int32"
        }
      },
      "required": [
        "checkRid",
        "checkLineageRid"
      ]
    },
    "StreamingChecklistEventOrigin": {
      "type": "object",
      "properties": {
        "checklistRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "ChecklistRid"
        },
        "checkMetadata": {
          "allOf": [
            {
              "$ref": "#/definitions/StreamingCheckOriginMetadata"
            }
          ],
          "description": "Metadata about the check that created this event."
        }
      },
      "required": [
        "checklistRid",
        "checkMetadata"
      ]
    },
    "TemplateEventOrigin": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "TemplateRid"
        }
      },
      "required": [
        "rid"
      ]
    },
    "TimeSeriesChannelAssociation": {
      "description": "A singular time series to associate the event with.",
      "type": "object",
      "properties": {
        "variableName": {
          "type": "string"
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "If this variable is grouped, the tags within the groupings this event should associate with"
        }
      },
      "required": [
        "variableName"
      ]
    },
    "UpdateDispositionRequest": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "EventRid"
        },
        "disposition": {
          "allOf": [
            {
              "$ref": "#/definitions/EventDisposition"
            }
          ],
          "description": "The new disposition for the event. If empty, will remove the disposition from the event."
        }
      },
      "required": [
        "rid"
      ]
    },
    "UpdateEvent": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid",
          "x-deprecated": "This field is deprecated. Use the rid field instead."
        },
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "EventRid",
          "description": "The unique identifier for the event. This field is required if the uuid field is not provided."
        },
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid"
          },
          "uniqueItems": true,
          "description": "If provided, will replace the existing asset rids. If provided, must contain at least one asset rid."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "x-map-key": "PropertyName",
          "x-deprecated": "use typedProperties"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          },
          "x-map-key": "PropertyName"
        }
      },
      "required": [
        "uuid"
      ],
      "example": {
        "uuid": "<uuid>"
      }
    },
    "UpdateEventRequest": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "EventRid"
        },
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid"
          },
          "uniqueItems": true,
          "description": "If provided, will replace the existing asset rids. If provided, must contain at least one asset rid."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "x-map-key": "PropertyName",
          "x-deprecated": "use typedProperties"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          },
          "x-map-key": "PropertyName"
        }
      },
      "required": [
        "rid"
      ]
    },
    "WorkbookDataAssociation": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "timeSeriesChannel"
          ]
        },
        "timeSeriesChannel": {
          "$ref": "#/definitions/TimeSeriesChannelAssociation"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "timeSeriesChannel",
        "timeSeriesChannel": {
          "variableName": "string",
          "tags": {
            "key": "string"
          }
        }
      }
    },
    "WorkbookEventOrigin": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "NotebookRid"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/WorkbookDataAssociation"
          },
          "description": "Data visualizations to associate this event with"
        }
      },
      "required": [
        "rid"
      ]
    },
    "ClosedWithFurtherActionDispositionState": {
      "type": "object",
      "properties": {
        "closedBy": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid"
        }
      },
      "required": [
        "closedBy"
      ]
    },
    "ClosedWithIgnoreDispositionState": {
      "type": "object",
      "properties": {
        "closedBy": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid"
        }
      },
      "required": [
        "closedBy"
      ]
    },
    "DispositionState": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "pendingReview",
            "closedWithFurtherAction",
            "closedWithIgnore"
          ]
        },
        "pendingReview": {
          "$ref": "#/definitions/PendingReviewDispositionState"
        },
        "closedWithFurtherAction": {
          "$ref": "#/definitions/ClosedWithFurtherActionDispositionState"
        },
        "closedWithIgnore": {
          "$ref": "#/definitions/ClosedWithIgnoreDispositionState"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "pendingReview",
        "pendingReview": {
          "openedBy": "string"
        }
      }
    },
    "PendingReviewDispositionState": {
      "type": "object",
      "properties": {
        "openedBy": {
          "type": "string",
          "format": "rid",
          "x-alias": "UserRid"
        }
      },
      "required": [
        "openedBy"
      ]
    },
    "Priority": {
      "type": "string",
      "enum": [
        "P0",
        "P1",
        "P2",
        "P3",
        "P4"
      ]
    },
    "ListPropertiesAndLabelsResponse": {
      "type": "object",
      "properties": {
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string",
              "x-alias": "PropertyValue"
            },
            "uniqueItems": true
          },
          "x-map-key": "PropertyName",
          "description": "Legacy string-only property values.",
          "x-deprecated": "Use the paginated searchPropertyKeys and searchPropertyValues methods instead."
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        }
      }
    },
    "LabelsFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          }
        }
      },
      "required": [
        "operator"
      ]
    },
    "PropertiesFilter": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "PropertyValue"
          }
        }
      },
      "required": [
        "name"
      ]
    },
    "Duration": {
      "type": "object",
      "properties": {
        "seconds": {
          "type": "integer",
          "format": "int64"
        },
        "nanos": {
          "type": "integer",
          "format": "int64"
        }
      },
      "required": [
        "seconds",
        "nanos"
      ]
    }
  },
  "tags": [
    {
      "name": "Event Service",
      "x-displayName": "Event service",
      "description": "An Event is an annotated moment or time range. The Event Service is responsible for creating and retrieving events for a particular data source.",
      "x-errors": [
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Scout:MissingAssetRid"
        },
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "Scout:EventNotFound"
        },
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "Scout:EventsNotFound"
        },
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "Scout:RidsNotFound"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Scout:IllegalEventLimitRequested"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Scout:IllegalBinCountRequested"
        }
      ]
    }
  ]
}
