Skip to content

Commit f016468

Browse files
updated onelens backend python client
1 parent 4f854c3 commit f016468

2 files changed

Lines changed: 133 additions & 4 deletions

File tree

onelens_backend_client_v2/models.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: <stdin>
3-
# timestamp: 2025-12-16T11:03:55+00:00
3+
# timestamp: 2025-12-18T13:55:15+00:00
44

55
from __future__ import annotations
66

@@ -3063,6 +3063,11 @@ class GetTicketByIdPolicyDetailsRequest(BaseModel):
30633063
ticket_id: UUID4 = Field(
30643064
..., description="The unique identifier of the ticket", title="Ticket Id"
30653065
)
3066+
can_fetch_hierarchy_details: Optional[bool] = Field(
3067+
True,
3068+
description="Flag to check if the hierarchy details can be fetched",
3069+
title="Can Fetch Hierarchy Details",
3070+
)
30663071

30673072

30683073
class GetTicketClosureEvidenceDataAPIRequest(BaseModel):
@@ -3384,6 +3389,9 @@ class KubernetesPodComputeLabel(str, Enum):
33843389
ol_arm_mini = "ol_arm_mini"
33853390
ol_arm_small = "ol_arm_small"
33863391
ol_arm_medium = "ol_arm_medium"
3392+
ol_amd_mini = "ol_amd_mini"
3393+
ol_amd_small = "ol_amd_small"
3394+
ol_amd_medium = "ol_amd_medium"
33873395

33883396

33893397
class KubernetesProcessorPayload(BaseModel):
@@ -19172,17 +19180,17 @@ class CreateCustomTenantTicketRequestMixin(BaseModel):
1917219180
title="Post Policy Execution Last Run",
1917319181
)
1917419182
last_run_id: Optional[UUID4] = Field(
19175-
"1946c8ef-4434-40c3-a4c7-8477988b831f",
19183+
"fff463ac-4311-4c8a-9226-6bfa9e64ce04",
1917619184
description="Id of the last policy violation/anomaly run",
1917719185
title="Last Run Id",
1917819186
)
1917919187
last_run_at: Optional[datetime] = Field(
19180-
"2025-12-16T16:30:12.459193",
19188+
"2025-12-18T19:24:27.126300",
1918119189
description="Datetime of the last policy violation/anomaly run",
1918219190
title="Last Run At",
1918319191
)
1918419192
first_run_at: Optional[datetime] = Field(
19185-
"2025-12-16T16:30:12.459206",
19193+
"2025-12-18T19:24:27.126314",
1918619194
description="Datetime of the first policy violation/anomaly run",
1918719195
title="First Run At",
1918819196
)

onelens_backend_client_v2/rpc/tenant_account_service_rpc_handler.py

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,127 @@ def _fetch_accounts_serialize(
153153
_request_auth=_request_auth,
154154
)
155155

156+
@validate_call
157+
def fetch_non_aws_accounts(
158+
self,
159+
request: FetchAccountsRequest,
160+
_request_timeout: Union[
161+
None,
162+
Annotated[StrictFloat, Field(gt=0)],
163+
Tuple[
164+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
165+
],
166+
] = None,
167+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
168+
_content_type: Optional[StrictStr] = None,
169+
_headers: Optional[Dict[StrictStr, Any]] = None,
170+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
171+
) -> FetchAccountsResponse:
172+
"""Fetch Non Aws Accounts
173+
174+
175+
176+
:param request: (required)
177+
:type request: FetchAccountsRequest
178+
:param _request_timeout: timeout setting for this request. If one
179+
number provided, it will be total request
180+
timeout. It can also be a pair (tuple) of
181+
(connection, read) timeouts.
182+
:type _request_timeout: int, tuple(int, int), optional
183+
:param _request_auth: set to override the auth_settings for an a single
184+
request; this effectively ignores the
185+
authentication in the spec for a single request.
186+
:type _request_auth: dict, optional
187+
:param _content_type: force content-type for the request.
188+
:type _content_type: str, Optional
189+
:param _headers: set to override the headers for a single
190+
request; this effectively ignores the headers
191+
in the spec for a single request.
192+
:type _headers: dict, optional
193+
:param _host_index: set to override the host_index for a single
194+
request; this effectively ignores the host_index
195+
in the spec for a single request.
196+
:type _host_index: int, optional
197+
:return: Returns the result object.
198+
"""
199+
200+
_param = self._fetch_non_aws_accounts_serialize(
201+
request=request,
202+
_request_auth=_request_auth,
203+
_content_type=_content_type,
204+
_headers=_headers,
205+
_host_index=_host_index,
206+
)
207+
208+
_response_types_map: Dict[str, Optional[str]] = {
209+
"200": "FetchAccountsResponse",
210+
"422": "HTTPValidationError",
211+
}
212+
response_data = self.api_client.call_api(
213+
*_param, _request_timeout=_request_timeout
214+
)
215+
response_data.read()
216+
return self.api_client.response_deserialize(
217+
response_data=response_data,
218+
response_types_map=_response_types_map,
219+
).data
220+
221+
def _fetch_non_aws_accounts_serialize(
222+
self,
223+
request: FetchAccountsRequest,
224+
_request_auth,
225+
_content_type,
226+
_headers,
227+
_host_index,
228+
) -> RequestSerialized:
229+
_host = None
230+
231+
_collection_formats: Dict[str, str] = {}
232+
233+
_path_params: Dict[str, str] = {}
234+
_query_params: List[Tuple[str, str]] = []
235+
_header_params: Dict[str, Optional[str]] = _headers or {}
236+
_form_params: List[Tuple[str, str]] = []
237+
_files: Dict[str, Union[str, bytes]] = {}
238+
_body_params: Optional[bytes] = None
239+
240+
# process the body parameter
241+
if request is not None:
242+
_body_params = request
243+
244+
# set the HTTP header `Accept`
245+
_header_params["Accept"] = self.api_client.select_header_accept(
246+
["application/json"]
247+
)
248+
249+
# set the HTTP header `Content-Type`
250+
if _content_type:
251+
_header_params["Content-Type"] = _content_type
252+
else:
253+
_default_content_type = self.api_client.select_header_content_type(
254+
["application/json"]
255+
)
256+
if _default_content_type is not None:
257+
_header_params["Content-Type"] = _default_content_type
258+
259+
# authentication setting
260+
_auth_settings: List[str] = []
261+
262+
return self.api_client.param_serialize(
263+
method="POST",
264+
resource_path="/rpc/tenant_account_service/fetch_non_aws_accounts",
265+
path_params=_path_params,
266+
query_params=_query_params,
267+
header_params=_header_params,
268+
body=_body_params,
269+
post_params=_form_params,
270+
files=_files,
271+
auth_settings=_auth_settings,
272+
collection_formats=_collection_formats,
273+
_host=_host,
274+
_request_auth=_request_auth,
275+
)
276+
156277
@validate_call
157278
def get_account_details_with_memory_metrics(
158279
self,

0 commit comments

Comments
 (0)