main
py 39 lines 783 Bytes
Raw
1 from typing import List
2 from typing import Optional
3
4 from pydantic import BaseModel
5 from pydantic import Field
6
7
8 class Rule(BaseModel):
9 description: Optional[str] = None
10 field: str
11 id: str
12 inverted: bool
13 stream_id: str
14 type: int
15 value: str
16
17
18 class Stream(BaseModel):
19 content_pack: Optional[str] = None
20 created_at: str
21 creator_user_id: str
22 description: Optional[str] = Field("No description provided")
23 disabled: bool
24 id: str
25 index_set_id: str
26 is_default: bool
27 is_editable: bool
28 matching_type: str
29 outputs: list
30 remove_matches_from_default_stream: bool
31 rules: List[Rule]
32 title: str
33
34
35 class GraylogStreamsResponse(BaseModel):
36 message: str
37 streams: List[Stream]
38 total: int
39 success: bool