-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmodels.py
More file actions
79 lines (63 loc) · 2.39 KB
/
models.py
File metadata and controls
79 lines (63 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from __future__ import annotations
from enum import Enum
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from pydantic import BaseModel
from pydantic import Field
from _incydr_sdk.core.models import Model
from _incydr_sdk.core.models import ResponseModel
class UserTypes(str, Enum):
USER = "USER"
SUPPORT_USER = "SUPPORT_USER"
API_CLIENT = "API_CLIENT"
SYSTEM = "SYSTEM"
UNKNOWN = "UNKNOWN"
class DateRange(BaseModel):
endTime: Optional[float]
startTime: Optional[float]
class AuditEventsPage(ResponseModel):
"""
A model representing a page of audit events.
**Fields**:
* **events**: `List[Dict[Optional[str], Any]]` A list of zero or more events matching the given criteria.
Each event is represented as a dictionary of property names associated with that event. These fields may differ
from event to event.
* **pagination_range_end_index**: `int` The index of the last result returned, in relation to total results found.
* **pagination_range_start_index**: `int` The index of the first result returned, in relation to total results found.
"""
events: List[Dict[Optional[str], Any]] = Field(
None, description="A list of zero or more events matching the given criteria."
)
pagination_range_end_index: int = Field(
None,
description="The index of the last result returned, in relation to total results found",
example=62,
alias="paginationRangeEndIndex",
)
pagination_range_start_index: int = Field(
None,
description="The index of the first result returned, in relation to total results found",
example=0,
alias="paginationRangeStartIndex",
)
class QueryExportRequest(Model):
actorIds: Optional[List[str]]
actorIpAddresses: Optional[List[str]]
actorNames: Optional[List[str]]
dateRange: Optional[DateRange]
eventTypes: Optional[List[str]]
resourceIds: Optional[List[str]]
userTypes: Optional[List[Union[UserTypes, str]]]
class QueryAuditLogRequest(Model):
actorIds: Optional[List[str]]
actorIpAddresses: Optional[List[str]]
actorNames: Optional[List[str]]
dateRange: Optional[DateRange]
eventTypes: Optional[List[str]]
page: int
pageSize: int
resourceIds: Optional[List[str]]
userTypes: Optional[List[Union[UserTypes, str]]]