hatchet-sdk 1.11.1__py3-none-any.whl → 1.12.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hatchet-sdk might be problematic. Click here for more details.
- hatchet_sdk/__init__.py +2 -0
- hatchet_sdk/client.py +2 -0
- hatchet_sdk/clients/events.py +42 -3
- hatchet_sdk/clients/rest/__init__.py +5 -0
- hatchet_sdk/clients/rest/api/event_api.py +490 -0
- hatchet_sdk/clients/rest/api/filter_api.py +339 -0
- hatchet_sdk/clients/rest/api/tenant_api.py +275 -0
- hatchet_sdk/clients/rest/api/workflow_runs_api.py +310 -0
- hatchet_sdk/clients/rest/models/__init__.py +5 -0
- hatchet_sdk/clients/rest/models/create_tenant_request.py +22 -2
- hatchet_sdk/clients/rest/models/tenant.py +6 -0
- hatchet_sdk/clients/rest/models/tenant_ui_version.py +37 -0
- hatchet_sdk/clients/rest/models/update_tenant_request.py +6 -0
- hatchet_sdk/clients/rest/models/v1_event.py +42 -0
- hatchet_sdk/clients/rest/models/v1_event_triggered_run.py +94 -0
- hatchet_sdk/clients/rest/models/v1_update_filter_request.py +98 -0
- hatchet_sdk/contracts/v1/workflows_pb2.py +26 -24
- hatchet_sdk/contracts/v1/workflows_pb2.pyi +14 -2
- hatchet_sdk/features/filters.py +36 -0
- hatchet_sdk/features/runs.py +22 -3
- hatchet_sdk/features/tenant.py +32 -0
- hatchet_sdk/hatchet.py +51 -8
- hatchet_sdk/runnables/action.py +1 -1
- hatchet_sdk/runnables/types.py +22 -4
- hatchet_sdk/runnables/workflow.py +413 -188
- hatchet_sdk/waits.py +2 -2
- {hatchet_sdk-1.11.1.dist-info → hatchet_sdk-1.12.1.dist-info}/METADATA +1 -1
- {hatchet_sdk-1.11.1.dist-info → hatchet_sdk-1.12.1.dist-info}/RECORD +30 -27
- hatchet_sdk/runnables/standalone.py +0 -391
- {hatchet_sdk-1.11.1.dist-info → hatchet_sdk-1.12.1.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.11.1.dist-info → hatchet_sdk-1.12.1.dist-info}/entry_points.txt +0 -0
|
@@ -24,6 +24,9 @@ from hatchet_sdk.clients.rest.models.v1_create_filter_request import (
|
|
|
24
24
|
)
|
|
25
25
|
from hatchet_sdk.clients.rest.models.v1_filter import V1Filter
|
|
26
26
|
from hatchet_sdk.clients.rest.models.v1_filter_list import V1FilterList
|
|
27
|
+
from hatchet_sdk.clients.rest.models.v1_update_filter_request import (
|
|
28
|
+
V1UpdateFilterRequest,
|
|
29
|
+
)
|
|
27
30
|
from hatchet_sdk.clients.rest.rest import RESTResponseType
|
|
28
31
|
|
|
29
32
|
|
|
@@ -1303,3 +1306,339 @@ class FilterApi:
|
|
|
1303
1306
|
_host=_host,
|
|
1304
1307
|
_request_auth=_request_auth,
|
|
1305
1308
|
)
|
|
1309
|
+
|
|
1310
|
+
@validate_call
|
|
1311
|
+
def v1_filter_update(
|
|
1312
|
+
self,
|
|
1313
|
+
tenant: Annotated[
|
|
1314
|
+
str,
|
|
1315
|
+
Field(
|
|
1316
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1317
|
+
),
|
|
1318
|
+
],
|
|
1319
|
+
v1_filter: Annotated[
|
|
1320
|
+
str,
|
|
1321
|
+
Field(
|
|
1322
|
+
min_length=36,
|
|
1323
|
+
strict=True,
|
|
1324
|
+
max_length=36,
|
|
1325
|
+
description="The filter id to update",
|
|
1326
|
+
),
|
|
1327
|
+
],
|
|
1328
|
+
v1_update_filter_request: Annotated[
|
|
1329
|
+
V1UpdateFilterRequest, Field(description="The input to the filter update")
|
|
1330
|
+
],
|
|
1331
|
+
_request_timeout: Union[
|
|
1332
|
+
None,
|
|
1333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1334
|
+
Tuple[
|
|
1335
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1336
|
+
],
|
|
1337
|
+
] = None,
|
|
1338
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1339
|
+
_content_type: Optional[StrictStr] = None,
|
|
1340
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1341
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1342
|
+
) -> V1Filter:
|
|
1343
|
+
"""v1_filter_update
|
|
1344
|
+
|
|
1345
|
+
Update a filter
|
|
1346
|
+
|
|
1347
|
+
:param tenant: The tenant id (required)
|
|
1348
|
+
:type tenant: str
|
|
1349
|
+
:param v1_filter: The filter id to update (required)
|
|
1350
|
+
:type v1_filter: str
|
|
1351
|
+
:param v1_update_filter_request: The input to the filter update (required)
|
|
1352
|
+
:type v1_update_filter_request: V1UpdateFilterRequest
|
|
1353
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1354
|
+
number provided, it will be total request
|
|
1355
|
+
timeout. It can also be a pair (tuple) of
|
|
1356
|
+
(connection, read) timeouts.
|
|
1357
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1358
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1359
|
+
request; this effectively ignores the
|
|
1360
|
+
authentication in the spec for a single request.
|
|
1361
|
+
:type _request_auth: dict, optional
|
|
1362
|
+
:param _content_type: force content-type for the request.
|
|
1363
|
+
:type _content_type: str, Optional
|
|
1364
|
+
:param _headers: set to override the headers for a single
|
|
1365
|
+
request; this effectively ignores the headers
|
|
1366
|
+
in the spec for a single request.
|
|
1367
|
+
:type _headers: dict, optional
|
|
1368
|
+
:param _host_index: set to override the host_index for a single
|
|
1369
|
+
request; this effectively ignores the host_index
|
|
1370
|
+
in the spec for a single request.
|
|
1371
|
+
:type _host_index: int, optional
|
|
1372
|
+
:return: Returns the result object.
|
|
1373
|
+
""" # noqa: E501
|
|
1374
|
+
|
|
1375
|
+
_param = self._v1_filter_update_serialize(
|
|
1376
|
+
tenant=tenant,
|
|
1377
|
+
v1_filter=v1_filter,
|
|
1378
|
+
v1_update_filter_request=v1_update_filter_request,
|
|
1379
|
+
_request_auth=_request_auth,
|
|
1380
|
+
_content_type=_content_type,
|
|
1381
|
+
_headers=_headers,
|
|
1382
|
+
_host_index=_host_index,
|
|
1383
|
+
)
|
|
1384
|
+
|
|
1385
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1386
|
+
"200": "V1Filter",
|
|
1387
|
+
"400": "APIErrors",
|
|
1388
|
+
"403": "APIErrors",
|
|
1389
|
+
"404": "APIErrors",
|
|
1390
|
+
}
|
|
1391
|
+
response_data = self.api_client.call_api(
|
|
1392
|
+
*_param, _request_timeout=_request_timeout
|
|
1393
|
+
)
|
|
1394
|
+
response_data.read()
|
|
1395
|
+
return self.api_client.response_deserialize(
|
|
1396
|
+
response_data=response_data,
|
|
1397
|
+
response_types_map=_response_types_map,
|
|
1398
|
+
).data
|
|
1399
|
+
|
|
1400
|
+
@validate_call
|
|
1401
|
+
def v1_filter_update_with_http_info(
|
|
1402
|
+
self,
|
|
1403
|
+
tenant: Annotated[
|
|
1404
|
+
str,
|
|
1405
|
+
Field(
|
|
1406
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1407
|
+
),
|
|
1408
|
+
],
|
|
1409
|
+
v1_filter: Annotated[
|
|
1410
|
+
str,
|
|
1411
|
+
Field(
|
|
1412
|
+
min_length=36,
|
|
1413
|
+
strict=True,
|
|
1414
|
+
max_length=36,
|
|
1415
|
+
description="The filter id to update",
|
|
1416
|
+
),
|
|
1417
|
+
],
|
|
1418
|
+
v1_update_filter_request: Annotated[
|
|
1419
|
+
V1UpdateFilterRequest, Field(description="The input to the filter update")
|
|
1420
|
+
],
|
|
1421
|
+
_request_timeout: Union[
|
|
1422
|
+
None,
|
|
1423
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1424
|
+
Tuple[
|
|
1425
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1426
|
+
],
|
|
1427
|
+
] = None,
|
|
1428
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1429
|
+
_content_type: Optional[StrictStr] = None,
|
|
1430
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1431
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1432
|
+
) -> ApiResponse[V1Filter]:
|
|
1433
|
+
"""v1_filter_update
|
|
1434
|
+
|
|
1435
|
+
Update a filter
|
|
1436
|
+
|
|
1437
|
+
:param tenant: The tenant id (required)
|
|
1438
|
+
:type tenant: str
|
|
1439
|
+
:param v1_filter: The filter id to update (required)
|
|
1440
|
+
:type v1_filter: str
|
|
1441
|
+
:param v1_update_filter_request: The input to the filter update (required)
|
|
1442
|
+
:type v1_update_filter_request: V1UpdateFilterRequest
|
|
1443
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1444
|
+
number provided, it will be total request
|
|
1445
|
+
timeout. It can also be a pair (tuple) of
|
|
1446
|
+
(connection, read) timeouts.
|
|
1447
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1448
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1449
|
+
request; this effectively ignores the
|
|
1450
|
+
authentication in the spec for a single request.
|
|
1451
|
+
:type _request_auth: dict, optional
|
|
1452
|
+
:param _content_type: force content-type for the request.
|
|
1453
|
+
:type _content_type: str, Optional
|
|
1454
|
+
:param _headers: set to override the headers for a single
|
|
1455
|
+
request; this effectively ignores the headers
|
|
1456
|
+
in the spec for a single request.
|
|
1457
|
+
:type _headers: dict, optional
|
|
1458
|
+
:param _host_index: set to override the host_index for a single
|
|
1459
|
+
request; this effectively ignores the host_index
|
|
1460
|
+
in the spec for a single request.
|
|
1461
|
+
:type _host_index: int, optional
|
|
1462
|
+
:return: Returns the result object.
|
|
1463
|
+
""" # noqa: E501
|
|
1464
|
+
|
|
1465
|
+
_param = self._v1_filter_update_serialize(
|
|
1466
|
+
tenant=tenant,
|
|
1467
|
+
v1_filter=v1_filter,
|
|
1468
|
+
v1_update_filter_request=v1_update_filter_request,
|
|
1469
|
+
_request_auth=_request_auth,
|
|
1470
|
+
_content_type=_content_type,
|
|
1471
|
+
_headers=_headers,
|
|
1472
|
+
_host_index=_host_index,
|
|
1473
|
+
)
|
|
1474
|
+
|
|
1475
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1476
|
+
"200": "V1Filter",
|
|
1477
|
+
"400": "APIErrors",
|
|
1478
|
+
"403": "APIErrors",
|
|
1479
|
+
"404": "APIErrors",
|
|
1480
|
+
}
|
|
1481
|
+
response_data = self.api_client.call_api(
|
|
1482
|
+
*_param, _request_timeout=_request_timeout
|
|
1483
|
+
)
|
|
1484
|
+
response_data.read()
|
|
1485
|
+
return self.api_client.response_deserialize(
|
|
1486
|
+
response_data=response_data,
|
|
1487
|
+
response_types_map=_response_types_map,
|
|
1488
|
+
)
|
|
1489
|
+
|
|
1490
|
+
@validate_call
|
|
1491
|
+
def v1_filter_update_without_preload_content(
|
|
1492
|
+
self,
|
|
1493
|
+
tenant: Annotated[
|
|
1494
|
+
str,
|
|
1495
|
+
Field(
|
|
1496
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1497
|
+
),
|
|
1498
|
+
],
|
|
1499
|
+
v1_filter: Annotated[
|
|
1500
|
+
str,
|
|
1501
|
+
Field(
|
|
1502
|
+
min_length=36,
|
|
1503
|
+
strict=True,
|
|
1504
|
+
max_length=36,
|
|
1505
|
+
description="The filter id to update",
|
|
1506
|
+
),
|
|
1507
|
+
],
|
|
1508
|
+
v1_update_filter_request: Annotated[
|
|
1509
|
+
V1UpdateFilterRequest, Field(description="The input to the filter update")
|
|
1510
|
+
],
|
|
1511
|
+
_request_timeout: Union[
|
|
1512
|
+
None,
|
|
1513
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1514
|
+
Tuple[
|
|
1515
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1516
|
+
],
|
|
1517
|
+
] = None,
|
|
1518
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1519
|
+
_content_type: Optional[StrictStr] = None,
|
|
1520
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1521
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1522
|
+
) -> RESTResponseType:
|
|
1523
|
+
"""v1_filter_update
|
|
1524
|
+
|
|
1525
|
+
Update a filter
|
|
1526
|
+
|
|
1527
|
+
:param tenant: The tenant id (required)
|
|
1528
|
+
:type tenant: str
|
|
1529
|
+
:param v1_filter: The filter id to update (required)
|
|
1530
|
+
:type v1_filter: str
|
|
1531
|
+
:param v1_update_filter_request: The input to the filter update (required)
|
|
1532
|
+
:type v1_update_filter_request: V1UpdateFilterRequest
|
|
1533
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1534
|
+
number provided, it will be total request
|
|
1535
|
+
timeout. It can also be a pair (tuple) of
|
|
1536
|
+
(connection, read) timeouts.
|
|
1537
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1538
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1539
|
+
request; this effectively ignores the
|
|
1540
|
+
authentication in the spec for a single request.
|
|
1541
|
+
:type _request_auth: dict, optional
|
|
1542
|
+
:param _content_type: force content-type for the request.
|
|
1543
|
+
:type _content_type: str, Optional
|
|
1544
|
+
:param _headers: set to override the headers for a single
|
|
1545
|
+
request; this effectively ignores the headers
|
|
1546
|
+
in the spec for a single request.
|
|
1547
|
+
:type _headers: dict, optional
|
|
1548
|
+
:param _host_index: set to override the host_index for a single
|
|
1549
|
+
request; this effectively ignores the host_index
|
|
1550
|
+
in the spec for a single request.
|
|
1551
|
+
:type _host_index: int, optional
|
|
1552
|
+
:return: Returns the result object.
|
|
1553
|
+
""" # noqa: E501
|
|
1554
|
+
|
|
1555
|
+
_param = self._v1_filter_update_serialize(
|
|
1556
|
+
tenant=tenant,
|
|
1557
|
+
v1_filter=v1_filter,
|
|
1558
|
+
v1_update_filter_request=v1_update_filter_request,
|
|
1559
|
+
_request_auth=_request_auth,
|
|
1560
|
+
_content_type=_content_type,
|
|
1561
|
+
_headers=_headers,
|
|
1562
|
+
_host_index=_host_index,
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1566
|
+
"200": "V1Filter",
|
|
1567
|
+
"400": "APIErrors",
|
|
1568
|
+
"403": "APIErrors",
|
|
1569
|
+
"404": "APIErrors",
|
|
1570
|
+
}
|
|
1571
|
+
response_data = self.api_client.call_api(
|
|
1572
|
+
*_param, _request_timeout=_request_timeout
|
|
1573
|
+
)
|
|
1574
|
+
return response_data.response
|
|
1575
|
+
|
|
1576
|
+
def _v1_filter_update_serialize(
|
|
1577
|
+
self,
|
|
1578
|
+
tenant,
|
|
1579
|
+
v1_filter,
|
|
1580
|
+
v1_update_filter_request,
|
|
1581
|
+
_request_auth,
|
|
1582
|
+
_content_type,
|
|
1583
|
+
_headers,
|
|
1584
|
+
_host_index,
|
|
1585
|
+
) -> RequestSerialized:
|
|
1586
|
+
|
|
1587
|
+
_host = None
|
|
1588
|
+
|
|
1589
|
+
_collection_formats: Dict[str, str] = {}
|
|
1590
|
+
|
|
1591
|
+
_path_params: Dict[str, str] = {}
|
|
1592
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1593
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1594
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1595
|
+
_files: Dict[
|
|
1596
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1597
|
+
] = {}
|
|
1598
|
+
_body_params: Optional[bytes] = None
|
|
1599
|
+
|
|
1600
|
+
# process the path parameters
|
|
1601
|
+
if tenant is not None:
|
|
1602
|
+
_path_params["tenant"] = tenant
|
|
1603
|
+
if v1_filter is not None:
|
|
1604
|
+
_path_params["v1-filter"] = v1_filter
|
|
1605
|
+
# process the query parameters
|
|
1606
|
+
# process the header parameters
|
|
1607
|
+
# process the form parameters
|
|
1608
|
+
# process the body parameter
|
|
1609
|
+
if v1_update_filter_request is not None:
|
|
1610
|
+
_body_params = v1_update_filter_request
|
|
1611
|
+
|
|
1612
|
+
# set the HTTP header `Accept`
|
|
1613
|
+
if "Accept" not in _header_params:
|
|
1614
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1615
|
+
["application/json"]
|
|
1616
|
+
)
|
|
1617
|
+
|
|
1618
|
+
# set the HTTP header `Content-Type`
|
|
1619
|
+
if _content_type:
|
|
1620
|
+
_header_params["Content-Type"] = _content_type
|
|
1621
|
+
else:
|
|
1622
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
1623
|
+
["application/json"]
|
|
1624
|
+
)
|
|
1625
|
+
if _default_content_type is not None:
|
|
1626
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1627
|
+
|
|
1628
|
+
# authentication setting
|
|
1629
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1630
|
+
|
|
1631
|
+
return self.api_client.param_serialize(
|
|
1632
|
+
method="PATCH",
|
|
1633
|
+
resource_path="/api/v1/stable/tenants/{tenant}/filters/{v1-filter}",
|
|
1634
|
+
path_params=_path_params,
|
|
1635
|
+
query_params=_query_params,
|
|
1636
|
+
header_params=_header_params,
|
|
1637
|
+
body=_body_params,
|
|
1638
|
+
post_params=_form_params,
|
|
1639
|
+
files=_files,
|
|
1640
|
+
auth_settings=_auth_settings,
|
|
1641
|
+
collection_formats=_collection_formats,
|
|
1642
|
+
_host=_host,
|
|
1643
|
+
_request_auth=_request_auth,
|
|
1644
|
+
)
|
|
@@ -1730,6 +1730,281 @@ class TenantApi:
|
|
|
1730
1730
|
_request_auth=_request_auth,
|
|
1731
1731
|
)
|
|
1732
1732
|
|
|
1733
|
+
@validate_call
|
|
1734
|
+
def tenant_get(
|
|
1735
|
+
self,
|
|
1736
|
+
tenant: Annotated[
|
|
1737
|
+
str,
|
|
1738
|
+
Field(
|
|
1739
|
+
min_length=36,
|
|
1740
|
+
strict=True,
|
|
1741
|
+
max_length=36,
|
|
1742
|
+
description="The tenant id to get details for",
|
|
1743
|
+
),
|
|
1744
|
+
],
|
|
1745
|
+
_request_timeout: Union[
|
|
1746
|
+
None,
|
|
1747
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1748
|
+
Tuple[
|
|
1749
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1750
|
+
],
|
|
1751
|
+
] = None,
|
|
1752
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1753
|
+
_content_type: Optional[StrictStr] = None,
|
|
1754
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1755
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1756
|
+
) -> Tenant:
|
|
1757
|
+
"""Get tenant
|
|
1758
|
+
|
|
1759
|
+
Get the details of a tenant
|
|
1760
|
+
|
|
1761
|
+
:param tenant: The tenant id to get details for (required)
|
|
1762
|
+
:type tenant: str
|
|
1763
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1764
|
+
number provided, it will be total request
|
|
1765
|
+
timeout. It can also be a pair (tuple) of
|
|
1766
|
+
(connection, read) timeouts.
|
|
1767
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1768
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1769
|
+
request; this effectively ignores the
|
|
1770
|
+
authentication in the spec for a single request.
|
|
1771
|
+
:type _request_auth: dict, optional
|
|
1772
|
+
:param _content_type: force content-type for the request.
|
|
1773
|
+
:type _content_type: str, Optional
|
|
1774
|
+
:param _headers: set to override the headers for a single
|
|
1775
|
+
request; this effectively ignores the headers
|
|
1776
|
+
in the spec for a single request.
|
|
1777
|
+
:type _headers: dict, optional
|
|
1778
|
+
:param _host_index: set to override the host_index for a single
|
|
1779
|
+
request; this effectively ignores the host_index
|
|
1780
|
+
in the spec for a single request.
|
|
1781
|
+
:type _host_index: int, optional
|
|
1782
|
+
:return: Returns the result object.
|
|
1783
|
+
""" # noqa: E501
|
|
1784
|
+
|
|
1785
|
+
_param = self._tenant_get_serialize(
|
|
1786
|
+
tenant=tenant,
|
|
1787
|
+
_request_auth=_request_auth,
|
|
1788
|
+
_content_type=_content_type,
|
|
1789
|
+
_headers=_headers,
|
|
1790
|
+
_host_index=_host_index,
|
|
1791
|
+
)
|
|
1792
|
+
|
|
1793
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1794
|
+
"200": "Tenant",
|
|
1795
|
+
"400": "APIErrors",
|
|
1796
|
+
"403": "APIError",
|
|
1797
|
+
"404": "APIErrors",
|
|
1798
|
+
}
|
|
1799
|
+
response_data = self.api_client.call_api(
|
|
1800
|
+
*_param, _request_timeout=_request_timeout
|
|
1801
|
+
)
|
|
1802
|
+
response_data.read()
|
|
1803
|
+
return self.api_client.response_deserialize(
|
|
1804
|
+
response_data=response_data,
|
|
1805
|
+
response_types_map=_response_types_map,
|
|
1806
|
+
).data
|
|
1807
|
+
|
|
1808
|
+
@validate_call
|
|
1809
|
+
def tenant_get_with_http_info(
|
|
1810
|
+
self,
|
|
1811
|
+
tenant: Annotated[
|
|
1812
|
+
str,
|
|
1813
|
+
Field(
|
|
1814
|
+
min_length=36,
|
|
1815
|
+
strict=True,
|
|
1816
|
+
max_length=36,
|
|
1817
|
+
description="The tenant id to get details for",
|
|
1818
|
+
),
|
|
1819
|
+
],
|
|
1820
|
+
_request_timeout: Union[
|
|
1821
|
+
None,
|
|
1822
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1823
|
+
Tuple[
|
|
1824
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1825
|
+
],
|
|
1826
|
+
] = None,
|
|
1827
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1828
|
+
_content_type: Optional[StrictStr] = None,
|
|
1829
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1830
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1831
|
+
) -> ApiResponse[Tenant]:
|
|
1832
|
+
"""Get tenant
|
|
1833
|
+
|
|
1834
|
+
Get the details of a tenant
|
|
1835
|
+
|
|
1836
|
+
:param tenant: The tenant id to get details for (required)
|
|
1837
|
+
:type tenant: str
|
|
1838
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1839
|
+
number provided, it will be total request
|
|
1840
|
+
timeout. It can also be a pair (tuple) of
|
|
1841
|
+
(connection, read) timeouts.
|
|
1842
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1843
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1844
|
+
request; this effectively ignores the
|
|
1845
|
+
authentication in the spec for a single request.
|
|
1846
|
+
:type _request_auth: dict, optional
|
|
1847
|
+
:param _content_type: force content-type for the request.
|
|
1848
|
+
:type _content_type: str, Optional
|
|
1849
|
+
:param _headers: set to override the headers for a single
|
|
1850
|
+
request; this effectively ignores the headers
|
|
1851
|
+
in the spec for a single request.
|
|
1852
|
+
:type _headers: dict, optional
|
|
1853
|
+
:param _host_index: set to override the host_index for a single
|
|
1854
|
+
request; this effectively ignores the host_index
|
|
1855
|
+
in the spec for a single request.
|
|
1856
|
+
:type _host_index: int, optional
|
|
1857
|
+
:return: Returns the result object.
|
|
1858
|
+
""" # noqa: E501
|
|
1859
|
+
|
|
1860
|
+
_param = self._tenant_get_serialize(
|
|
1861
|
+
tenant=tenant,
|
|
1862
|
+
_request_auth=_request_auth,
|
|
1863
|
+
_content_type=_content_type,
|
|
1864
|
+
_headers=_headers,
|
|
1865
|
+
_host_index=_host_index,
|
|
1866
|
+
)
|
|
1867
|
+
|
|
1868
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1869
|
+
"200": "Tenant",
|
|
1870
|
+
"400": "APIErrors",
|
|
1871
|
+
"403": "APIError",
|
|
1872
|
+
"404": "APIErrors",
|
|
1873
|
+
}
|
|
1874
|
+
response_data = self.api_client.call_api(
|
|
1875
|
+
*_param, _request_timeout=_request_timeout
|
|
1876
|
+
)
|
|
1877
|
+
response_data.read()
|
|
1878
|
+
return self.api_client.response_deserialize(
|
|
1879
|
+
response_data=response_data,
|
|
1880
|
+
response_types_map=_response_types_map,
|
|
1881
|
+
)
|
|
1882
|
+
|
|
1883
|
+
@validate_call
|
|
1884
|
+
def tenant_get_without_preload_content(
|
|
1885
|
+
self,
|
|
1886
|
+
tenant: Annotated[
|
|
1887
|
+
str,
|
|
1888
|
+
Field(
|
|
1889
|
+
min_length=36,
|
|
1890
|
+
strict=True,
|
|
1891
|
+
max_length=36,
|
|
1892
|
+
description="The tenant id to get details for",
|
|
1893
|
+
),
|
|
1894
|
+
],
|
|
1895
|
+
_request_timeout: Union[
|
|
1896
|
+
None,
|
|
1897
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1898
|
+
Tuple[
|
|
1899
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1900
|
+
],
|
|
1901
|
+
] = None,
|
|
1902
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1903
|
+
_content_type: Optional[StrictStr] = None,
|
|
1904
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1905
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1906
|
+
) -> RESTResponseType:
|
|
1907
|
+
"""Get tenant
|
|
1908
|
+
|
|
1909
|
+
Get the details of a tenant
|
|
1910
|
+
|
|
1911
|
+
:param tenant: The tenant id to get details for (required)
|
|
1912
|
+
:type tenant: str
|
|
1913
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1914
|
+
number provided, it will be total request
|
|
1915
|
+
timeout. It can also be a pair (tuple) of
|
|
1916
|
+
(connection, read) timeouts.
|
|
1917
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1918
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1919
|
+
request; this effectively ignores the
|
|
1920
|
+
authentication in the spec for a single request.
|
|
1921
|
+
:type _request_auth: dict, optional
|
|
1922
|
+
:param _content_type: force content-type for the request.
|
|
1923
|
+
:type _content_type: str, Optional
|
|
1924
|
+
:param _headers: set to override the headers for a single
|
|
1925
|
+
request; this effectively ignores the headers
|
|
1926
|
+
in the spec for a single request.
|
|
1927
|
+
:type _headers: dict, optional
|
|
1928
|
+
:param _host_index: set to override the host_index for a single
|
|
1929
|
+
request; this effectively ignores the host_index
|
|
1930
|
+
in the spec for a single request.
|
|
1931
|
+
:type _host_index: int, optional
|
|
1932
|
+
:return: Returns the result object.
|
|
1933
|
+
""" # noqa: E501
|
|
1934
|
+
|
|
1935
|
+
_param = self._tenant_get_serialize(
|
|
1936
|
+
tenant=tenant,
|
|
1937
|
+
_request_auth=_request_auth,
|
|
1938
|
+
_content_type=_content_type,
|
|
1939
|
+
_headers=_headers,
|
|
1940
|
+
_host_index=_host_index,
|
|
1941
|
+
)
|
|
1942
|
+
|
|
1943
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1944
|
+
"200": "Tenant",
|
|
1945
|
+
"400": "APIErrors",
|
|
1946
|
+
"403": "APIError",
|
|
1947
|
+
"404": "APIErrors",
|
|
1948
|
+
}
|
|
1949
|
+
response_data = self.api_client.call_api(
|
|
1950
|
+
*_param, _request_timeout=_request_timeout
|
|
1951
|
+
)
|
|
1952
|
+
return response_data.response
|
|
1953
|
+
|
|
1954
|
+
def _tenant_get_serialize(
|
|
1955
|
+
self,
|
|
1956
|
+
tenant,
|
|
1957
|
+
_request_auth,
|
|
1958
|
+
_content_type,
|
|
1959
|
+
_headers,
|
|
1960
|
+
_host_index,
|
|
1961
|
+
) -> RequestSerialized:
|
|
1962
|
+
|
|
1963
|
+
_host = None
|
|
1964
|
+
|
|
1965
|
+
_collection_formats: Dict[str, str] = {}
|
|
1966
|
+
|
|
1967
|
+
_path_params: Dict[str, str] = {}
|
|
1968
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1969
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1970
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1971
|
+
_files: Dict[
|
|
1972
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1973
|
+
] = {}
|
|
1974
|
+
_body_params: Optional[bytes] = None
|
|
1975
|
+
|
|
1976
|
+
# process the path parameters
|
|
1977
|
+
if tenant is not None:
|
|
1978
|
+
_path_params["tenant"] = tenant
|
|
1979
|
+
# process the query parameters
|
|
1980
|
+
# process the header parameters
|
|
1981
|
+
# process the form parameters
|
|
1982
|
+
# process the body parameter
|
|
1983
|
+
|
|
1984
|
+
# set the HTTP header `Accept`
|
|
1985
|
+
if "Accept" not in _header_params:
|
|
1986
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1987
|
+
["application/json"]
|
|
1988
|
+
)
|
|
1989
|
+
|
|
1990
|
+
# authentication setting
|
|
1991
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1992
|
+
|
|
1993
|
+
return self.api_client.param_serialize(
|
|
1994
|
+
method="GET",
|
|
1995
|
+
resource_path="/api/v1/tenants/{tenant}",
|
|
1996
|
+
path_params=_path_params,
|
|
1997
|
+
query_params=_query_params,
|
|
1998
|
+
header_params=_header_params,
|
|
1999
|
+
body=_body_params,
|
|
2000
|
+
post_params=_form_params,
|
|
2001
|
+
files=_files,
|
|
2002
|
+
auth_settings=_auth_settings,
|
|
2003
|
+
collection_formats=_collection_formats,
|
|
2004
|
+
_host=_host,
|
|
2005
|
+
_request_auth=_request_auth,
|
|
2006
|
+
)
|
|
2007
|
+
|
|
1733
2008
|
@validate_call
|
|
1734
2009
|
def tenant_get_step_run_queue_metrics(
|
|
1735
2010
|
self,
|