11from http import HTTPStatus
2- from typing import Any , Dict , List , Optional , Union
2+ from typing import Any
33
44import httpx
55
1212
1313def _get_kwargs (
1414 * ,
15- username : Union [ Unset , str ] = UNSET ,
16- entity_type : Union [ Unset , ListEventsEntityType ] = UNSET ,
17- entity_id : Union [ Unset , str ] = UNSET ,
18- ) -> Dict [str , Any ]:
19- params : Dict [str , Any ] = {}
15+ username : str | Unset = UNSET ,
16+ entity_type : ListEventsEntityType | Unset = UNSET ,
17+ entity_id : str | Unset = UNSET ,
18+ ) -> dict [str , Any ]:
19+ params : dict [str , Any ] = {}
2020
2121 params ["username" ] = username
2222
23- json_entity_type : Union [ Unset , str ] = UNSET
23+ json_entity_type : str | Unset = UNSET
2424 if not isinstance (entity_type , Unset ):
2525 json_entity_type = entity_type .value
2626
@@ -30,7 +30,7 @@ def _get_kwargs(
3030
3131 params = {k : v for k , v in params .items () if v is not UNSET and v is not None }
3232
33- _kwargs : Dict [str , Any ] = {
33+ _kwargs : dict [str , Any ] = {
3434 "method" : "get" ,
3535 "url" : "/audit-events" ,
3636 "params" : params ,
@@ -39,8 +39,8 @@ def _get_kwargs(
3939 return _kwargs
4040
4141
42- def _parse_response (* , client : Client , response : httpx .Response ) -> Optional [ List [ " AuditEvent" ]] :
43- if response .status_code == HTTPStatus . OK :
42+ def _parse_response (* , client : Client , response : httpx .Response ) -> list [ AuditEvent ] | None :
43+ if response .status_code == 200 :
4444 response_200 = []
4545 _response_200 = response .json ()
4646 for response_200_item_data in _response_200 :
@@ -53,7 +53,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis
5353 errors .handle_error_response (response , client .raise_on_unexpected_status )
5454
5555
56- def _build_response (* , client : Client , response : httpx .Response ) -> Response [List [ " AuditEvent" ]]:
56+ def _build_response (* , client : Client , response : httpx .Response ) -> Response [list [ AuditEvent ]]:
5757 return Response (
5858 status_code = HTTPStatus (response .status_code ),
5959 content = response .content ,
@@ -65,26 +65,26 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis
6565def sync_detailed (
6666 * ,
6767 client : Client ,
68- username : Union [ Unset , str ] = UNSET ,
69- entity_type : Union [ Unset , ListEventsEntityType ] = UNSET ,
70- entity_id : Union [ Unset , str ] = UNSET ,
71- ) -> Response [List [ " AuditEvent" ]]:
68+ username : str | Unset = UNSET ,
69+ entity_type : ListEventsEntityType | Unset = UNSET ,
70+ entity_id : str | Unset = UNSET ,
71+ ) -> Response [list [ AuditEvent ]]:
7272 """List audit events
7373
7474 Gets a list of audit events
7575
7676 Args:
77- username (Union[Unset, str] ):
78- entity_type (Union[Unset, ListEventsEntityType] ):
79- entity_id (Union[Unset, str] ):
77+ username (str | Unset ):
78+ entity_type (ListEventsEntityType | Unset ):
79+ entity_id (str | Unset ):
8080 client (Client): instance of the API client
8181
8282 Raises:
8383 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
8484 httpx.TimeoutException: If the request takes longer than Client.timeout.
8585
8686 Returns:
87- Response[List[' AuditEvent' ]]
87+ Response[list[ AuditEvent]]
8888 """
8989
9090 kwargs = _get_kwargs (
@@ -104,26 +104,26 @@ def sync_detailed(
104104def sync (
105105 * ,
106106 client : Client ,
107- username : Union [ Unset , str ] = UNSET ,
108- entity_type : Union [ Unset , ListEventsEntityType ] = UNSET ,
109- entity_id : Union [ Unset , str ] = UNSET ,
110- ) -> Optional [ List [ " AuditEvent" ]] :
107+ username : str | Unset = UNSET ,
108+ entity_type : ListEventsEntityType | Unset = UNSET ,
109+ entity_id : str | Unset = UNSET ,
110+ ) -> list [ AuditEvent ] | None :
111111 """List audit events
112112
113113 Gets a list of audit events
114114
115115 Args:
116- username (Union[Unset, str] ):
117- entity_type (Union[Unset, ListEventsEntityType] ):
118- entity_id (Union[Unset, str] ):
116+ username (str | Unset ):
117+ entity_type (ListEventsEntityType | Unset ):
118+ entity_id (str | Unset ):
119119 client (Client): instance of the API client
120120
121121 Raises:
122122 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
123123 httpx.TimeoutException: If the request takes longer than Client.timeout.
124124
125125 Returns:
126- List[' AuditEvent' ]
126+ list[ AuditEvent]
127127 """
128128
129129 try :
@@ -140,26 +140,26 @@ def sync(
140140async def asyncio_detailed (
141141 * ,
142142 client : Client ,
143- username : Union [ Unset , str ] = UNSET ,
144- entity_type : Union [ Unset , ListEventsEntityType ] = UNSET ,
145- entity_id : Union [ Unset , str ] = UNSET ,
146- ) -> Response [List [ " AuditEvent" ]]:
143+ username : str | Unset = UNSET ,
144+ entity_type : ListEventsEntityType | Unset = UNSET ,
145+ entity_id : str | Unset = UNSET ,
146+ ) -> Response [list [ AuditEvent ]]:
147147 """List audit events
148148
149149 Gets a list of audit events
150150
151151 Args:
152- username (Union[Unset, str] ):
153- entity_type (Union[Unset, ListEventsEntityType] ):
154- entity_id (Union[Unset, str] ):
152+ username (str | Unset ):
153+ entity_type (ListEventsEntityType | Unset ):
154+ entity_id (str | Unset ):
155155 client (Client): instance of the API client
156156
157157 Raises:
158158 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
159159 httpx.TimeoutException: If the request takes longer than Client.timeout.
160160
161161 Returns:
162- Response[List[' AuditEvent' ]]
162+ Response[list[ AuditEvent]]
163163 """
164164
165165 kwargs = _get_kwargs (
@@ -176,26 +176,26 @@ async def asyncio_detailed(
176176async def asyncio (
177177 * ,
178178 client : Client ,
179- username : Union [ Unset , str ] = UNSET ,
180- entity_type : Union [ Unset , ListEventsEntityType ] = UNSET ,
181- entity_id : Union [ Unset , str ] = UNSET ,
182- ) -> Optional [ List [ " AuditEvent" ]] :
179+ username : str | Unset = UNSET ,
180+ entity_type : ListEventsEntityType | Unset = UNSET ,
181+ entity_id : str | Unset = UNSET ,
182+ ) -> list [ AuditEvent ] | None :
183183 """List audit events
184184
185185 Gets a list of audit events
186186
187187 Args:
188- username (Union[Unset, str] ):
189- entity_type (Union[Unset, ListEventsEntityType] ):
190- entity_id (Union[Unset, str] ):
188+ username (str | Unset ):
189+ entity_type (ListEventsEntityType | Unset ):
190+ entity_id (str | Unset ):
191191 client (Client): instance of the API client
192192
193193 Raises:
194194 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
195195 httpx.TimeoutException: If the request takes longer than Client.timeout.
196196
197197 Returns:
198- List[' AuditEvent' ]
198+ list[ AuditEvent]
199199 """
200200
201201 try :
0 commit comments