nominal-api 0.605.0__py3-none-any.whl → 0.606.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 nominal-api might be problematic. Click here for more details.

nominal_api/_impl.py CHANGED
@@ -1240,6 +1240,1589 @@ attachments_api_UpdateAttachmentRequest.__qualname__ = "UpdateAttachmentRequest"
1240
1240
  attachments_api_UpdateAttachmentRequest.__module__ = "nominal_api.attachments_api"
1241
1241
 
1242
1242
 
1243
+ class authentication_api_AppearanceSetting(ConjureEnumType):
1244
+
1245
+ SYSTEM = 'SYSTEM'
1246
+ '''SYSTEM'''
1247
+ LIGHT = 'LIGHT'
1248
+ '''LIGHT'''
1249
+ DARK = 'DARK'
1250
+ '''DARK'''
1251
+ UNKNOWN = 'UNKNOWN'
1252
+ '''UNKNOWN'''
1253
+
1254
+ def __reduce_ex__(self, proto):
1255
+ return self.__class__, (self.name,)
1256
+
1257
+
1258
+ authentication_api_AppearanceSetting.__name__ = "AppearanceSetting"
1259
+ authentication_api_AppearanceSetting.__qualname__ = "AppearanceSetting"
1260
+ authentication_api_AppearanceSetting.__module__ = "nominal_api.authentication_api"
1261
+
1262
+
1263
+ class authentication_api_AuthenticationServiceV2(Service):
1264
+ """
1265
+ This service provides operations for managing user and org profiles/settings.
1266
+ Its name is a bit of a misnomer.
1267
+ """
1268
+
1269
+ def get_my_profile(self, auth_header: str) -> "authentication_api_UserV2":
1270
+ """
1271
+ Gets the profile of the authenticated user.
1272
+ """
1273
+
1274
+ _headers: Dict[str, Any] = {
1275
+ 'Accept': 'application/json',
1276
+ 'Authorization': auth_header,
1277
+ }
1278
+
1279
+ _params: Dict[str, Any] = {
1280
+ }
1281
+
1282
+ _path_params: Dict[str, Any] = {
1283
+ }
1284
+
1285
+ _json: Any = None
1286
+
1287
+ _path = '/authentication/v2/my/profile'
1288
+ _path = _path.format(**_path_params)
1289
+
1290
+ _response: Response = self._request(
1291
+ 'GET',
1292
+ self._uri + _path,
1293
+ params=_params,
1294
+ headers=_headers,
1295
+ json=_json)
1296
+
1297
+ _decoder = ConjureDecoder()
1298
+ return _decoder.decode(_response.json(), authentication_api_UserV2, self._return_none_for_unknown_union_types)
1299
+
1300
+ def update_my_profile(self, auth_header: str, update_my_profile_request: "authentication_api_UpdateMyProfileRequest") -> "authentication_api_UserV2":
1301
+ """
1302
+ Updates the profile of the authenticated user.
1303
+ """
1304
+
1305
+ _headers: Dict[str, Any] = {
1306
+ 'Accept': 'application/json',
1307
+ 'Content-Type': 'application/json',
1308
+ 'Authorization': auth_header,
1309
+ }
1310
+
1311
+ _params: Dict[str, Any] = {
1312
+ }
1313
+
1314
+ _path_params: Dict[str, Any] = {
1315
+ }
1316
+
1317
+ _json: Any = ConjureEncoder().default(update_my_profile_request)
1318
+
1319
+ _path = '/authentication/v2/my/profile'
1320
+ _path = _path.format(**_path_params)
1321
+
1322
+ _response: Response = self._request(
1323
+ 'PUT',
1324
+ self._uri + _path,
1325
+ params=_params,
1326
+ headers=_headers,
1327
+ json=_json)
1328
+
1329
+ _decoder = ConjureDecoder()
1330
+ return _decoder.decode(_response.json(), authentication_api_UserV2, self._return_none_for_unknown_union_types)
1331
+
1332
+ def get_my_settings(self, auth_header: str) -> "authentication_api_UserSettings":
1333
+ """
1334
+ Gets the settings of the authenticated user.
1335
+ """
1336
+
1337
+ _headers: Dict[str, Any] = {
1338
+ 'Accept': 'application/json',
1339
+ 'Authorization': auth_header,
1340
+ }
1341
+
1342
+ _params: Dict[str, Any] = {
1343
+ }
1344
+
1345
+ _path_params: Dict[str, Any] = {
1346
+ }
1347
+
1348
+ _json: Any = None
1349
+
1350
+ _path = '/authentication/v2/my/settings'
1351
+ _path = _path.format(**_path_params)
1352
+
1353
+ _response: Response = self._request(
1354
+ 'GET',
1355
+ self._uri + _path,
1356
+ params=_params,
1357
+ headers=_headers,
1358
+ json=_json)
1359
+
1360
+ _decoder = ConjureDecoder()
1361
+ return _decoder.decode(_response.json(), authentication_api_UserSettings, self._return_none_for_unknown_union_types)
1362
+
1363
+ def update_my_settings(self, auth_header: str, user_settings: "authentication_api_UserSettings") -> "authentication_api_UserSettings":
1364
+ """
1365
+ Updates the settings of the authenticated user.
1366
+ """
1367
+
1368
+ _headers: Dict[str, Any] = {
1369
+ 'Accept': 'application/json',
1370
+ 'Content-Type': 'application/json',
1371
+ 'Authorization': auth_header,
1372
+ }
1373
+
1374
+ _params: Dict[str, Any] = {
1375
+ }
1376
+
1377
+ _path_params: Dict[str, Any] = {
1378
+ }
1379
+
1380
+ _json: Any = ConjureEncoder().default(user_settings)
1381
+
1382
+ _path = '/authentication/v2/my/settings'
1383
+ _path = _path.format(**_path_params)
1384
+
1385
+ _response: Response = self._request(
1386
+ 'PUT',
1387
+ self._uri + _path,
1388
+ params=_params,
1389
+ headers=_headers,
1390
+ json=_json)
1391
+
1392
+ _decoder = ConjureDecoder()
1393
+ return _decoder.decode(_response.json(), authentication_api_UserSettings, self._return_none_for_unknown_union_types)
1394
+
1395
+ def get_my_org_settings(self, auth_header: str) -> "authentication_api_OrgSettings":
1396
+ """
1397
+ Gets the settings of the org of the authenticated user.
1398
+ """
1399
+
1400
+ _headers: Dict[str, Any] = {
1401
+ 'Accept': 'application/json',
1402
+ 'Authorization': auth_header,
1403
+ }
1404
+
1405
+ _params: Dict[str, Any] = {
1406
+ }
1407
+
1408
+ _path_params: Dict[str, Any] = {
1409
+ }
1410
+
1411
+ _json: Any = None
1412
+
1413
+ _path = '/authentication/v2/org/settings'
1414
+ _path = _path.format(**_path_params)
1415
+
1416
+ _response: Response = self._request(
1417
+ 'GET',
1418
+ self._uri + _path,
1419
+ params=_params,
1420
+ headers=_headers,
1421
+ json=_json)
1422
+
1423
+ _decoder = ConjureDecoder()
1424
+ return _decoder.decode(_response.json(), authentication_api_OrgSettings, self._return_none_for_unknown_union_types)
1425
+
1426
+ def update_my_org_settings(self, auth_header: str, org_settings: "authentication_api_OrgSettings") -> "authentication_api_OrgSettings":
1427
+ """
1428
+ Updates the settings of the org of the authenticated user.
1429
+ """
1430
+
1431
+ _headers: Dict[str, Any] = {
1432
+ 'Accept': 'application/json',
1433
+ 'Content-Type': 'application/json',
1434
+ 'Authorization': auth_header,
1435
+ }
1436
+
1437
+ _params: Dict[str, Any] = {
1438
+ }
1439
+
1440
+ _path_params: Dict[str, Any] = {
1441
+ }
1442
+
1443
+ _json: Any = ConjureEncoder().default(org_settings)
1444
+
1445
+ _path = '/authentication/v2/org/settings'
1446
+ _path = _path.format(**_path_params)
1447
+
1448
+ _response: Response = self._request(
1449
+ 'PUT',
1450
+ self._uri + _path,
1451
+ params=_params,
1452
+ headers=_headers,
1453
+ json=_json)
1454
+
1455
+ _decoder = ConjureDecoder()
1456
+ return _decoder.decode(_response.json(), authentication_api_OrgSettings, self._return_none_for_unknown_union_types)
1457
+
1458
+ def search_users_v2(self, auth_header: str, request: "authentication_api_SearchUsersRequest") -> "authentication_api_SearchUsersResponseV2":
1459
+ """
1460
+ Searches for users by email and displayName.
1461
+ """
1462
+
1463
+ _headers: Dict[str, Any] = {
1464
+ 'Accept': 'application/json',
1465
+ 'Content-Type': 'application/json',
1466
+ 'Authorization': auth_header,
1467
+ }
1468
+
1469
+ _params: Dict[str, Any] = {
1470
+ }
1471
+
1472
+ _path_params: Dict[str, Any] = {
1473
+ }
1474
+
1475
+ _json: Any = ConjureEncoder().default(request)
1476
+
1477
+ _path = '/authentication/v2/users'
1478
+ _path = _path.format(**_path_params)
1479
+
1480
+ _response: Response = self._request(
1481
+ 'POST',
1482
+ self._uri + _path,
1483
+ params=_params,
1484
+ headers=_headers,
1485
+ json=_json)
1486
+
1487
+ _decoder = ConjureDecoder()
1488
+ return _decoder.decode(_response.json(), authentication_api_SearchUsersResponseV2, self._return_none_for_unknown_union_types)
1489
+
1490
+ def get_users(self, auth_header: str, user_rids: List[str] = None) -> List["authentication_api_UserV2"]:
1491
+ """
1492
+ Get users by RID.
1493
+ """
1494
+ user_rids = user_rids if user_rids is not None else []
1495
+
1496
+ _headers: Dict[str, Any] = {
1497
+ 'Accept': 'application/json',
1498
+ 'Content-Type': 'application/json',
1499
+ 'Authorization': auth_header,
1500
+ }
1501
+
1502
+ _params: Dict[str, Any] = {
1503
+ }
1504
+
1505
+ _path_params: Dict[str, Any] = {
1506
+ }
1507
+
1508
+ _json: Any = ConjureEncoder().default(user_rids)
1509
+
1510
+ _path = '/authentication/v2/users/batch'
1511
+ _path = _path.format(**_path_params)
1512
+
1513
+ _response: Response = self._request(
1514
+ 'POST',
1515
+ self._uri + _path,
1516
+ params=_params,
1517
+ headers=_headers,
1518
+ json=_json)
1519
+
1520
+ _decoder = ConjureDecoder()
1521
+ return _decoder.decode(_response.json(), List[authentication_api_UserV2], self._return_none_for_unknown_union_types)
1522
+
1523
+ def get_user(self, auth_header: str, user_rid: str) -> "authentication_api_UserV2":
1524
+ """
1525
+ Gets a user by RID.
1526
+ """
1527
+
1528
+ _headers: Dict[str, Any] = {
1529
+ 'Accept': 'application/json',
1530
+ 'Authorization': auth_header,
1531
+ }
1532
+
1533
+ _params: Dict[str, Any] = {
1534
+ }
1535
+
1536
+ _path_params: Dict[str, Any] = {
1537
+ 'userRid': user_rid,
1538
+ }
1539
+
1540
+ _json: Any = None
1541
+
1542
+ _path = '/authentication/v2/users/{userRid}'
1543
+ _path = _path.format(**_path_params)
1544
+
1545
+ _response: Response = self._request(
1546
+ 'GET',
1547
+ self._uri + _path,
1548
+ params=_params,
1549
+ headers=_headers,
1550
+ json=_json)
1551
+
1552
+ _decoder = ConjureDecoder()
1553
+ return _decoder.decode(_response.json(), authentication_api_UserV2, self._return_none_for_unknown_union_types)
1554
+
1555
+
1556
+ authentication_api_AuthenticationServiceV2.__name__ = "AuthenticationServiceV2"
1557
+ authentication_api_AuthenticationServiceV2.__qualname__ = "AuthenticationServiceV2"
1558
+ authentication_api_AuthenticationServiceV2.__module__ = "nominal_api.authentication_api"
1559
+
1560
+
1561
+ class authentication_api_DefaultTimeRangeTypeSetting(ConjureEnumType):
1562
+
1563
+ DEFAULT = 'DEFAULT'
1564
+ '''DEFAULT'''
1565
+ ABSOLUTE = 'ABSOLUTE'
1566
+ '''ABSOLUTE'''
1567
+ RELATIVE = 'RELATIVE'
1568
+ '''RELATIVE'''
1569
+ UNKNOWN = 'UNKNOWN'
1570
+ '''UNKNOWN'''
1571
+
1572
+ def __reduce_ex__(self, proto):
1573
+ return self.__class__, (self.name,)
1574
+
1575
+
1576
+ authentication_api_DefaultTimeRangeTypeSetting.__name__ = "DefaultTimeRangeTypeSetting"
1577
+ authentication_api_DefaultTimeRangeTypeSetting.__qualname__ = "DefaultTimeRangeTypeSetting"
1578
+ authentication_api_DefaultTimeRangeTypeSetting.__module__ = "nominal_api.authentication_api"
1579
+
1580
+
1581
+ class authentication_api_OrgSettings(ConjureBeanType):
1582
+
1583
+ @builtins.classmethod
1584
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1585
+ return {
1586
+ 'default_time_range_type': ConjureFieldDefinition('defaultTimeRangeType', OptionalTypeWrapper[authentication_api_DefaultTimeRangeTypeSetting])
1587
+ }
1588
+
1589
+ __slots__: List[str] = ['_default_time_range_type']
1590
+
1591
+ def __init__(self, default_time_range_type: Optional["authentication_api_DefaultTimeRangeTypeSetting"] = None) -> None:
1592
+ self._default_time_range_type = default_time_range_type
1593
+
1594
+ @builtins.property
1595
+ def default_time_range_type(self) -> Optional["authentication_api_DefaultTimeRangeTypeSetting"]:
1596
+ return self._default_time_range_type
1597
+
1598
+
1599
+ authentication_api_OrgSettings.__name__ = "OrgSettings"
1600
+ authentication_api_OrgSettings.__qualname__ = "OrgSettings"
1601
+ authentication_api_OrgSettings.__module__ = "nominal_api.authentication_api"
1602
+
1603
+
1604
+ class authentication_api_SearchUsersQuery(ConjureUnionType):
1605
+ _and_: Optional[List["authentication_api_SearchUsersQuery"]] = None
1606
+ _or_: Optional[List["authentication_api_SearchUsersQuery"]] = None
1607
+ _exact_match: Optional[str] = None
1608
+ _search_text: Optional[str] = None
1609
+
1610
+ @builtins.classmethod
1611
+ def _options(cls) -> Dict[str, ConjureFieldDefinition]:
1612
+ return {
1613
+ 'and_': ConjureFieldDefinition('and', List[authentication_api_SearchUsersQuery]),
1614
+ 'or_': ConjureFieldDefinition('or', List[authentication_api_SearchUsersQuery]),
1615
+ 'exact_match': ConjureFieldDefinition('exactMatch', str),
1616
+ 'search_text': ConjureFieldDefinition('searchText', str)
1617
+ }
1618
+
1619
+ def __init__(
1620
+ self,
1621
+ and_: Optional[List["authentication_api_SearchUsersQuery"]] = None,
1622
+ or_: Optional[List["authentication_api_SearchUsersQuery"]] = None,
1623
+ exact_match: Optional[str] = None,
1624
+ search_text: Optional[str] = None,
1625
+ type_of_union: Optional[str] = None
1626
+ ) -> None:
1627
+ if type_of_union is None:
1628
+ if (and_ is not None) + (or_ is not None) + (exact_match is not None) + (search_text is not None) != 1:
1629
+ raise ValueError('a union must contain a single member')
1630
+
1631
+ if and_ is not None:
1632
+ self._and_ = and_
1633
+ self._type = 'and'
1634
+ if or_ is not None:
1635
+ self._or_ = or_
1636
+ self._type = 'or'
1637
+ if exact_match is not None:
1638
+ self._exact_match = exact_match
1639
+ self._type = 'exactMatch'
1640
+ if search_text is not None:
1641
+ self._search_text = search_text
1642
+ self._type = 'searchText'
1643
+
1644
+ elif type_of_union == 'and':
1645
+ if and_ is None:
1646
+ raise ValueError('a union value must not be None')
1647
+ self._and_ = and_
1648
+ self._type = 'and'
1649
+ elif type_of_union == 'or':
1650
+ if or_ is None:
1651
+ raise ValueError('a union value must not be None')
1652
+ self._or_ = or_
1653
+ self._type = 'or'
1654
+ elif type_of_union == 'exactMatch':
1655
+ if exact_match is None:
1656
+ raise ValueError('a union value must not be None')
1657
+ self._exact_match = exact_match
1658
+ self._type = 'exactMatch'
1659
+ elif type_of_union == 'searchText':
1660
+ if search_text is None:
1661
+ raise ValueError('a union value must not be None')
1662
+ self._search_text = search_text
1663
+ self._type = 'searchText'
1664
+
1665
+ @builtins.property
1666
+ def and_(self) -> Optional[List["authentication_api_SearchUsersQuery"]]:
1667
+ return self._and_
1668
+
1669
+ @builtins.property
1670
+ def or_(self) -> Optional[List["authentication_api_SearchUsersQuery"]]:
1671
+ return self._or_
1672
+
1673
+ @builtins.property
1674
+ def exact_match(self) -> Optional[str]:
1675
+ """
1676
+ Performs case insensitive exact match on email
1677
+ """
1678
+ return self._exact_match
1679
+
1680
+ @builtins.property
1681
+ def search_text(self) -> Optional[str]:
1682
+ """
1683
+ Searches email and display name
1684
+ """
1685
+ return self._search_text
1686
+
1687
+ def accept(self, visitor) -> Any:
1688
+ if not isinstance(visitor, authentication_api_SearchUsersQueryVisitor):
1689
+ raise ValueError('{} is not an instance of authentication_api_SearchUsersQueryVisitor'.format(visitor.__class__.__name__))
1690
+ if self._type == 'and' and self.and_ is not None:
1691
+ return visitor._and(self.and_)
1692
+ if self._type == 'or' and self.or_ is not None:
1693
+ return visitor._or(self.or_)
1694
+ if self._type == 'exactMatch' and self.exact_match is not None:
1695
+ return visitor._exact_match(self.exact_match)
1696
+ if self._type == 'searchText' and self.search_text is not None:
1697
+ return visitor._search_text(self.search_text)
1698
+
1699
+
1700
+ authentication_api_SearchUsersQuery.__name__ = "SearchUsersQuery"
1701
+ authentication_api_SearchUsersQuery.__qualname__ = "SearchUsersQuery"
1702
+ authentication_api_SearchUsersQuery.__module__ = "nominal_api.authentication_api"
1703
+
1704
+
1705
+ class authentication_api_SearchUsersQueryVisitor:
1706
+
1707
+ @abstractmethod
1708
+ def _and(self, and_: List["authentication_api_SearchUsersQuery"]) -> Any:
1709
+ pass
1710
+
1711
+ @abstractmethod
1712
+ def _or(self, or_: List["authentication_api_SearchUsersQuery"]) -> Any:
1713
+ pass
1714
+
1715
+ @abstractmethod
1716
+ def _exact_match(self, exact_match: str) -> Any:
1717
+ pass
1718
+
1719
+ @abstractmethod
1720
+ def _search_text(self, search_text: str) -> Any:
1721
+ pass
1722
+
1723
+
1724
+ authentication_api_SearchUsersQueryVisitor.__name__ = "SearchUsersQueryVisitor"
1725
+ authentication_api_SearchUsersQueryVisitor.__qualname__ = "SearchUsersQueryVisitor"
1726
+ authentication_api_SearchUsersQueryVisitor.__module__ = "nominal_api.authentication_api"
1727
+
1728
+
1729
+ class authentication_api_SearchUsersRequest(ConjureBeanType):
1730
+
1731
+ @builtins.classmethod
1732
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1733
+ return {
1734
+ 'query': ConjureFieldDefinition('query', authentication_api_SearchUsersQuery),
1735
+ 'sort_by': ConjureFieldDefinition('sortBy', OptionalTypeWrapper[authentication_api_SortBy]),
1736
+ 'next_page_token': ConjureFieldDefinition('nextPageToken', OptionalTypeWrapper[api_Token]),
1737
+ 'page_size': ConjureFieldDefinition('pageSize', OptionalTypeWrapper[int])
1738
+ }
1739
+
1740
+ __slots__: List[str] = ['_query', '_sort_by', '_next_page_token', '_page_size']
1741
+
1742
+ def __init__(self, query: "authentication_api_SearchUsersQuery", next_page_token: Optional[str] = None, page_size: Optional[int] = None, sort_by: Optional["authentication_api_SortBy"] = None) -> None:
1743
+ self._query = query
1744
+ self._sort_by = sort_by
1745
+ self._next_page_token = next_page_token
1746
+ self._page_size = page_size
1747
+
1748
+ @builtins.property
1749
+ def query(self) -> "authentication_api_SearchUsersQuery":
1750
+ return self._query
1751
+
1752
+ @builtins.property
1753
+ def sort_by(self) -> Optional["authentication_api_SortBy"]:
1754
+ """
1755
+ UPDATED_AT descending by default
1756
+ """
1757
+ return self._sort_by
1758
+
1759
+ @builtins.property
1760
+ def next_page_token(self) -> Optional[str]:
1761
+ return self._next_page_token
1762
+
1763
+ @builtins.property
1764
+ def page_size(self) -> Optional[int]:
1765
+ """
1766
+ Defaults to 100. Will throw if larger than 1_000.
1767
+ """
1768
+ return self._page_size
1769
+
1770
+
1771
+ authentication_api_SearchUsersRequest.__name__ = "SearchUsersRequest"
1772
+ authentication_api_SearchUsersRequest.__qualname__ = "SearchUsersRequest"
1773
+ authentication_api_SearchUsersRequest.__module__ = "nominal_api.authentication_api"
1774
+
1775
+
1776
+ class authentication_api_SearchUsersResponseV2(ConjureBeanType):
1777
+
1778
+ @builtins.classmethod
1779
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1780
+ return {
1781
+ 'results': ConjureFieldDefinition('results', List[authentication_api_UserV2]),
1782
+ 'next_page_token': ConjureFieldDefinition('nextPageToken', OptionalTypeWrapper[api_Token])
1783
+ }
1784
+
1785
+ __slots__: List[str] = ['_results', '_next_page_token']
1786
+
1787
+ def __init__(self, results: List["authentication_api_UserV2"], next_page_token: Optional[str] = None) -> None:
1788
+ self._results = results
1789
+ self._next_page_token = next_page_token
1790
+
1791
+ @builtins.property
1792
+ def results(self) -> List["authentication_api_UserV2"]:
1793
+ return self._results
1794
+
1795
+ @builtins.property
1796
+ def next_page_token(self) -> Optional[str]:
1797
+ return self._next_page_token
1798
+
1799
+
1800
+ authentication_api_SearchUsersResponseV2.__name__ = "SearchUsersResponseV2"
1801
+ authentication_api_SearchUsersResponseV2.__qualname__ = "SearchUsersResponseV2"
1802
+ authentication_api_SearchUsersResponseV2.__module__ = "nominal_api.authentication_api"
1803
+
1804
+
1805
+ class authentication_api_SortBy(ConjureBeanType):
1806
+
1807
+ @builtins.classmethod
1808
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1809
+ return {
1810
+ 'is_descending': ConjureFieldDefinition('isDescending', bool),
1811
+ 'field': ConjureFieldDefinition('field', authentication_api_SortByField)
1812
+ }
1813
+
1814
+ __slots__: List[str] = ['_is_descending', '_field']
1815
+
1816
+ def __init__(self, field: "authentication_api_SortByField", is_descending: bool) -> None:
1817
+ self._is_descending = is_descending
1818
+ self._field = field
1819
+
1820
+ @builtins.property
1821
+ def is_descending(self) -> bool:
1822
+ return self._is_descending
1823
+
1824
+ @builtins.property
1825
+ def field(self) -> "authentication_api_SortByField":
1826
+ return self._field
1827
+
1828
+
1829
+ authentication_api_SortBy.__name__ = "SortBy"
1830
+ authentication_api_SortBy.__qualname__ = "SortBy"
1831
+ authentication_api_SortBy.__module__ = "nominal_api.authentication_api"
1832
+
1833
+
1834
+ class authentication_api_SortByField(ConjureEnumType):
1835
+
1836
+ NAME = 'NAME'
1837
+ '''NAME'''
1838
+ EMAIL = 'EMAIL'
1839
+ '''EMAIL'''
1840
+ CREATED_AT = 'CREATED_AT'
1841
+ '''CREATED_AT'''
1842
+ UPDATED_AT = 'UPDATED_AT'
1843
+ '''UPDATED_AT'''
1844
+ UNKNOWN = 'UNKNOWN'
1845
+ '''UNKNOWN'''
1846
+
1847
+ def __reduce_ex__(self, proto):
1848
+ return self.__class__, (self.name,)
1849
+
1850
+
1851
+ authentication_api_SortByField.__name__ = "SortByField"
1852
+ authentication_api_SortByField.__qualname__ = "SortByField"
1853
+ authentication_api_SortByField.__module__ = "nominal_api.authentication_api"
1854
+
1855
+
1856
+ class authentication_api_TimezoneSetting(ConjureEnumType):
1857
+
1858
+ LOCAL = 'LOCAL'
1859
+ '''LOCAL'''
1860
+ UTC = 'UTC'
1861
+ '''UTC'''
1862
+ UNKNOWN = 'UNKNOWN'
1863
+ '''UNKNOWN'''
1864
+
1865
+ def __reduce_ex__(self, proto):
1866
+ return self.__class__, (self.name,)
1867
+
1868
+
1869
+ authentication_api_TimezoneSetting.__name__ = "TimezoneSetting"
1870
+ authentication_api_TimezoneSetting.__qualname__ = "TimezoneSetting"
1871
+ authentication_api_TimezoneSetting.__module__ = "nominal_api.authentication_api"
1872
+
1873
+
1874
+ class authentication_api_UpdateMyProfileRequest(ConjureBeanType):
1875
+
1876
+ @builtins.classmethod
1877
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1878
+ return {
1879
+ 'display_name': ConjureFieldDefinition('displayName', str)
1880
+ }
1881
+
1882
+ __slots__: List[str] = ['_display_name']
1883
+
1884
+ def __init__(self, display_name: str) -> None:
1885
+ self._display_name = display_name
1886
+
1887
+ @builtins.property
1888
+ def display_name(self) -> str:
1889
+ return self._display_name
1890
+
1891
+
1892
+ authentication_api_UpdateMyProfileRequest.__name__ = "UpdateMyProfileRequest"
1893
+ authentication_api_UpdateMyProfileRequest.__qualname__ = "UpdateMyProfileRequest"
1894
+ authentication_api_UpdateMyProfileRequest.__module__ = "nominal_api.authentication_api"
1895
+
1896
+
1897
+ class authentication_api_UserSettings(ConjureBeanType):
1898
+
1899
+ @builtins.classmethod
1900
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1901
+ return {
1902
+ 'default_time_range_type': ConjureFieldDefinition('defaultTimeRangeType', OptionalTypeWrapper[authentication_api_DefaultTimeRangeTypeSetting]),
1903
+ 'appearance': ConjureFieldDefinition('appearance', OptionalTypeWrapper[authentication_api_AppearanceSetting]),
1904
+ 'timezone': ConjureFieldDefinition('timezone', OptionalTypeWrapper[authentication_api_TimezoneSetting]),
1905
+ 'time_series_hover_tooltip_concise': ConjureFieldDefinition('timeSeriesHoverTooltipConcise', OptionalTypeWrapper[bool])
1906
+ }
1907
+
1908
+ __slots__: List[str] = ['_default_time_range_type', '_appearance', '_timezone', '_time_series_hover_tooltip_concise']
1909
+
1910
+ def __init__(self, appearance: Optional["authentication_api_AppearanceSetting"] = None, default_time_range_type: Optional["authentication_api_DefaultTimeRangeTypeSetting"] = None, time_series_hover_tooltip_concise: Optional[bool] = None, timezone: Optional["authentication_api_TimezoneSetting"] = None) -> None:
1911
+ self._default_time_range_type = default_time_range_type
1912
+ self._appearance = appearance
1913
+ self._timezone = timezone
1914
+ self._time_series_hover_tooltip_concise = time_series_hover_tooltip_concise
1915
+
1916
+ @builtins.property
1917
+ def default_time_range_type(self) -> Optional["authentication_api_DefaultTimeRangeTypeSetting"]:
1918
+ return self._default_time_range_type
1919
+
1920
+ @builtins.property
1921
+ def appearance(self) -> Optional["authentication_api_AppearanceSetting"]:
1922
+ return self._appearance
1923
+
1924
+ @builtins.property
1925
+ def timezone(self) -> Optional["authentication_api_TimezoneSetting"]:
1926
+ return self._timezone
1927
+
1928
+ @builtins.property
1929
+ def time_series_hover_tooltip_concise(self) -> Optional[bool]:
1930
+ return self._time_series_hover_tooltip_concise
1931
+
1932
+
1933
+ authentication_api_UserSettings.__name__ = "UserSettings"
1934
+ authentication_api_UserSettings.__qualname__ = "UserSettings"
1935
+ authentication_api_UserSettings.__module__ = "nominal_api.authentication_api"
1936
+
1937
+
1938
+ class authentication_api_UserV2(ConjureBeanType):
1939
+
1940
+ @builtins.classmethod
1941
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1942
+ return {
1943
+ 'rid': ConjureFieldDefinition('rid', authentication_api_UserRid),
1944
+ 'org_rid': ConjureFieldDefinition('orgRid', authentication_api_OrgRid),
1945
+ 'email': ConjureFieldDefinition('email', str),
1946
+ 'display_name': ConjureFieldDefinition('displayName', str),
1947
+ 'avatar_url': ConjureFieldDefinition('avatarUrl', str)
1948
+ }
1949
+
1950
+ __slots__: List[str] = ['_rid', '_org_rid', '_email', '_display_name', '_avatar_url']
1951
+
1952
+ def __init__(self, avatar_url: str, display_name: str, email: str, org_rid: str, rid: str) -> None:
1953
+ self._rid = rid
1954
+ self._org_rid = org_rid
1955
+ self._email = email
1956
+ self._display_name = display_name
1957
+ self._avatar_url = avatar_url
1958
+
1959
+ @builtins.property
1960
+ def rid(self) -> str:
1961
+ return self._rid
1962
+
1963
+ @builtins.property
1964
+ def org_rid(self) -> str:
1965
+ return self._org_rid
1966
+
1967
+ @builtins.property
1968
+ def email(self) -> str:
1969
+ return self._email
1970
+
1971
+ @builtins.property
1972
+ def display_name(self) -> str:
1973
+ return self._display_name
1974
+
1975
+ @builtins.property
1976
+ def avatar_url(self) -> str:
1977
+ """
1978
+ Avatar URL or a default avatar if the user does not have one.
1979
+ """
1980
+ return self._avatar_url
1981
+
1982
+
1983
+ authentication_api_UserV2.__name__ = "UserV2"
1984
+ authentication_api_UserV2.__qualname__ = "UserV2"
1985
+ authentication_api_UserV2.__module__ = "nominal_api.authentication_api"
1986
+
1987
+
1988
+ class authorization_ApiKey(ConjureBeanType):
1989
+
1990
+ @builtins.classmethod
1991
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
1992
+ return {
1993
+ 'rid': ConjureFieldDefinition('rid', authorization_ApiKeyRid),
1994
+ 'api_key_name': ConjureFieldDefinition('apiKeyName', str),
1995
+ 'created_by': ConjureFieldDefinition('createdBy', str),
1996
+ 'created_at': ConjureFieldDefinition('createdAt', str),
1997
+ 'expires_at': ConjureFieldDefinition('expiresAt', OptionalTypeWrapper[str]),
1998
+ 'is_deleted': ConjureFieldDefinition('isDeleted', bool)
1999
+ }
2000
+
2001
+ __slots__: List[str] = ['_rid', '_api_key_name', '_created_by', '_created_at', '_expires_at', '_is_deleted']
2002
+
2003
+ def __init__(self, api_key_name: str, created_at: str, created_by: str, is_deleted: bool, rid: str, expires_at: Optional[str] = None) -> None:
2004
+ self._rid = rid
2005
+ self._api_key_name = api_key_name
2006
+ self._created_by = created_by
2007
+ self._created_at = created_at
2008
+ self._expires_at = expires_at
2009
+ self._is_deleted = is_deleted
2010
+
2011
+ @builtins.property
2012
+ def rid(self) -> str:
2013
+ return self._rid
2014
+
2015
+ @builtins.property
2016
+ def api_key_name(self) -> str:
2017
+ return self._api_key_name
2018
+
2019
+ @builtins.property
2020
+ def created_by(self) -> str:
2021
+ return self._created_by
2022
+
2023
+ @builtins.property
2024
+ def created_at(self) -> str:
2025
+ return self._created_at
2026
+
2027
+ @builtins.property
2028
+ def expires_at(self) -> Optional[str]:
2029
+ return self._expires_at
2030
+
2031
+ @builtins.property
2032
+ def is_deleted(self) -> bool:
2033
+ return self._is_deleted
2034
+
2035
+
2036
+ authorization_ApiKey.__name__ = "ApiKey"
2037
+ authorization_ApiKey.__qualname__ = "ApiKey"
2038
+ authorization_ApiKey.__module__ = "nominal_api.authorization"
2039
+
2040
+
2041
+ class authorization_AuthorizationRequest(ConjureBeanType):
2042
+
2043
+ @builtins.classmethod
2044
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2045
+ return {
2046
+ 'rids': ConjureFieldDefinition('rids', List[str])
2047
+ }
2048
+
2049
+ __slots__: List[str] = ['_rids']
2050
+
2051
+ def __init__(self, rids: List[str]) -> None:
2052
+ self._rids = rids
2053
+
2054
+ @builtins.property
2055
+ def rids(self) -> List[str]:
2056
+ return self._rids
2057
+
2058
+
2059
+ authorization_AuthorizationRequest.__name__ = "AuthorizationRequest"
2060
+ authorization_AuthorizationRequest.__qualname__ = "AuthorizationRequest"
2061
+ authorization_AuthorizationRequest.__module__ = "nominal_api.authorization"
2062
+
2063
+
2064
+ class authorization_AuthorizationService(Service):
2065
+ """
2066
+ Authorization service manages the permissions for a user
2067
+ to access resources.
2068
+ """
2069
+
2070
+ def authorize(self, auth_header: str, request: "authorization_AuthorizationRequest") -> List[str]:
2071
+ """
2072
+ Given a set of resources, returns the set of resources that the
2073
+ user is authorized to access.
2074
+ """
2075
+
2076
+ _headers: Dict[str, Any] = {
2077
+ 'Accept': 'application/json',
2078
+ 'Content-Type': 'application/json',
2079
+ 'Authorization': auth_header,
2080
+ }
2081
+
2082
+ _params: Dict[str, Any] = {
2083
+ }
2084
+
2085
+ _path_params: Dict[str, Any] = {
2086
+ }
2087
+
2088
+ _json: Any = ConjureEncoder().default(request)
2089
+
2090
+ _path = '/authorization/v1/authorize'
2091
+ _path = _path.format(**_path_params)
2092
+
2093
+ _response: Response = self._request(
2094
+ 'POST',
2095
+ self._uri + _path,
2096
+ params=_params,
2097
+ headers=_headers,
2098
+ json=_json)
2099
+
2100
+ _decoder = ConjureDecoder()
2101
+ return _decoder.decode(_response.json(), List[str], self._return_none_for_unknown_union_types)
2102
+
2103
+ def batch_get_workspace_for_resource(self, auth_header: str, request: List[str] = None) -> Dict[str, str]:
2104
+ """
2105
+ Given a set of resources, returns the workspace that each resource belongs to. If a user
2106
+ is not authorized on the resource, will omit the resource from the response.
2107
+ """
2108
+ request = request if request is not None else []
2109
+
2110
+ _headers: Dict[str, Any] = {
2111
+ 'Accept': 'application/json',
2112
+ 'Content-Type': 'application/json',
2113
+ 'Authorization': auth_header,
2114
+ }
2115
+
2116
+ _params: Dict[str, Any] = {
2117
+ }
2118
+
2119
+ _path_params: Dict[str, Any] = {
2120
+ }
2121
+
2122
+ _json: Any = ConjureEncoder().default(request)
2123
+
2124
+ _path = '/authorization/v1/batch-get-workspace-for-resource'
2125
+ _path = _path.format(**_path_params)
2126
+
2127
+ _response: Response = self._request(
2128
+ 'POST',
2129
+ self._uri + _path,
2130
+ params=_params,
2131
+ headers=_headers,
2132
+ json=_json)
2133
+
2134
+ _decoder = ConjureDecoder()
2135
+ return _decoder.decode(_response.json(), Dict[str, api_rids_WorkspaceRid], self._return_none_for_unknown_union_types)
2136
+
2137
+ def register(self, auth_header: str, register_request: "authorization_RegistrationRequest") -> None:
2138
+ """
2139
+ Marks a resource as belonging to an organization.
2140
+ Will throw if trying to register a resource that already
2141
+ belongs to a different organization.
2142
+ """
2143
+
2144
+ _headers: Dict[str, Any] = {
2145
+ 'Accept': 'application/json',
2146
+ 'Content-Type': 'application/json',
2147
+ 'Authorization': auth_header,
2148
+ }
2149
+
2150
+ _params: Dict[str, Any] = {
2151
+ }
2152
+
2153
+ _path_params: Dict[str, Any] = {
2154
+ }
2155
+
2156
+ _json: Any = ConjureEncoder().default(register_request)
2157
+
2158
+ _path = '/authorization/v1/register'
2159
+ _path = _path.format(**_path_params)
2160
+
2161
+ _response: Response = self._request(
2162
+ 'POST',
2163
+ self._uri + _path,
2164
+ params=_params,
2165
+ headers=_headers,
2166
+ json=_json)
2167
+
2168
+ return
2169
+
2170
+ def register_in_workspace(self, auth_header: str, request: "authorization_RegisterInWorkspaceRequest") -> None:
2171
+ """
2172
+ Marks a set of resources as belonging to a workspace. Either all resources are
2173
+ registered or none are.
2174
+ If the user is not in the workspace, this will throw.
2175
+ If a resource already belongs to a different workspace, this will throw.
2176
+ If a resource already belongs to this workspace, this is a no-op.
2177
+ """
2178
+
2179
+ _headers: Dict[str, Any] = {
2180
+ 'Accept': 'application/json',
2181
+ 'Content-Type': 'application/json',
2182
+ 'Authorization': auth_header,
2183
+ }
2184
+
2185
+ _params: Dict[str, Any] = {
2186
+ }
2187
+
2188
+ _path_params: Dict[str, Any] = {
2189
+ }
2190
+
2191
+ _json: Any = ConjureEncoder().default(request)
2192
+
2193
+ _path = '/authorization/v1/register-in-workspace'
2194
+ _path = _path.format(**_path_params)
2195
+
2196
+ _response: Response = self._request(
2197
+ 'POST',
2198
+ self._uri + _path,
2199
+ params=_params,
2200
+ headers=_headers,
2201
+ json=_json)
2202
+
2203
+ return
2204
+
2205
+ def check_admin(self, auth_header: str) -> None:
2206
+ """
2207
+ Given an authenticated session, this endpoint returns a HTTP 204 if the
2208
+ authenticated user is an admin and HTTP 403 otherwise.
2209
+ """
2210
+
2211
+ _headers: Dict[str, Any] = {
2212
+ 'Accept': 'application/json',
2213
+ 'Authorization': auth_header,
2214
+ }
2215
+
2216
+ _params: Dict[str, Any] = {
2217
+ }
2218
+
2219
+ _path_params: Dict[str, Any] = {
2220
+ }
2221
+
2222
+ _json: Any = None
2223
+
2224
+ _path = '/authorization/v1/checkAdmin'
2225
+ _path = _path.format(**_path_params)
2226
+
2227
+ _response: Response = self._request(
2228
+ 'GET',
2229
+ self._uri + _path,
2230
+ params=_params,
2231
+ headers=_headers,
2232
+ json=_json)
2233
+
2234
+ return
2235
+
2236
+ def is_email_allowed(self, request: "authorization_IsEmailAllowedRequest") -> "authorization_IsEmailAllowedResponse":
2237
+ """
2238
+ Checks if the email is allowed to register.
2239
+ """
2240
+
2241
+ _headers: Dict[str, Any] = {
2242
+ 'Accept': 'application/json',
2243
+ 'Content-Type': 'application/json',
2244
+ }
2245
+
2246
+ _params: Dict[str, Any] = {
2247
+ }
2248
+
2249
+ _path_params: Dict[str, Any] = {
2250
+ }
2251
+
2252
+ _json: Any = ConjureEncoder().default(request)
2253
+
2254
+ _path = '/authorization/v1/is-email-allowed'
2255
+ _path = _path.format(**_path_params)
2256
+
2257
+ _response: Response = self._request(
2258
+ 'POST',
2259
+ self._uri + _path,
2260
+ params=_params,
2261
+ headers=_headers,
2262
+ json=_json)
2263
+
2264
+ _decoder = ConjureDecoder()
2265
+ return _decoder.decode(_response.json(), authorization_IsEmailAllowedResponse, self._return_none_for_unknown_union_types)
2266
+
2267
+ def get_access_token(self, request: "authorization_GetAccessTokenRequest") -> "authorization_GetAccessTokenResponse":
2268
+ """
2269
+ Provide an OIDC ID and access token to get a Nominal access token,
2270
+ suitable for making API requests. Its expiry will match that of the
2271
+ input access token, capped at 24h.
2272
+ Throws NotAuthorized if either token is invalid or if the OIDC provider
2273
+ is not known.
2274
+ """
2275
+
2276
+ _headers: Dict[str, Any] = {
2277
+ 'Accept': 'application/json',
2278
+ 'Content-Type': 'application/json',
2279
+ }
2280
+
2281
+ _params: Dict[str, Any] = {
2282
+ }
2283
+
2284
+ _path_params: Dict[str, Any] = {
2285
+ }
2286
+
2287
+ _json: Any = ConjureEncoder().default(request)
2288
+
2289
+ _path = '/authorization/v1/access-token'
2290
+ _path = _path.format(**_path_params)
2291
+
2292
+ _response: Response = self._request(
2293
+ 'POST',
2294
+ self._uri + _path,
2295
+ params=_params,
2296
+ headers=_headers,
2297
+ json=_json)
2298
+
2299
+ _decoder = ConjureDecoder()
2300
+ return _decoder.decode(_response.json(), authorization_GetAccessTokenResponse, self._return_none_for_unknown_union_types)
2301
+
2302
+ def create_api_key(self, auth_header: str, request: "authorization_CreateApiKeyRequest") -> "authorization_CreateApiKeyResponse":
2303
+ """
2304
+ Provide a long-lived API key for making API requests.
2305
+ The API key is irretrievable after initial creation.
2306
+ """
2307
+
2308
+ _headers: Dict[str, Any] = {
2309
+ 'Accept': 'application/json',
2310
+ 'Content-Type': 'application/json',
2311
+ 'Authorization': auth_header,
2312
+ }
2313
+
2314
+ _params: Dict[str, Any] = {
2315
+ }
2316
+
2317
+ _path_params: Dict[str, Any] = {
2318
+ }
2319
+
2320
+ _json: Any = ConjureEncoder().default(request)
2321
+
2322
+ _path = '/authorization/v1/api-key'
2323
+ _path = _path.format(**_path_params)
2324
+
2325
+ _response: Response = self._request(
2326
+ 'POST',
2327
+ self._uri + _path,
2328
+ params=_params,
2329
+ headers=_headers,
2330
+ json=_json)
2331
+
2332
+ _decoder = ConjureDecoder()
2333
+ return _decoder.decode(_response.json(), authorization_CreateApiKeyResponse, self._return_none_for_unknown_union_types)
2334
+
2335
+ def list_api_keys_in_org(self, auth_header: str, request: "authorization_ListApiKeyRequest") -> "authorization_ListApiKeyResponse":
2336
+ """
2337
+ List all API keys in the organization.
2338
+ """
2339
+
2340
+ _headers: Dict[str, Any] = {
2341
+ 'Accept': 'application/json',
2342
+ 'Content-Type': 'application/json',
2343
+ 'Authorization': auth_header,
2344
+ }
2345
+
2346
+ _params: Dict[str, Any] = {
2347
+ }
2348
+
2349
+ _path_params: Dict[str, Any] = {
2350
+ }
2351
+
2352
+ _json: Any = ConjureEncoder().default(request)
2353
+
2354
+ _path = '/authorization/v1/api-keys/org'
2355
+ _path = _path.format(**_path_params)
2356
+
2357
+ _response: Response = self._request(
2358
+ 'POST',
2359
+ self._uri + _path,
2360
+ params=_params,
2361
+ headers=_headers,
2362
+ json=_json)
2363
+
2364
+ _decoder = ConjureDecoder()
2365
+ return _decoder.decode(_response.json(), authorization_ListApiKeyResponse, self._return_none_for_unknown_union_types)
2366
+
2367
+ def list_user_api_keys(self, auth_header: str, request: "authorization_ListApiKeyRequest") -> "authorization_ListApiKeyResponse":
2368
+ """
2369
+ List all API keys for the user.
2370
+ """
2371
+
2372
+ _headers: Dict[str, Any] = {
2373
+ 'Accept': 'application/json',
2374
+ 'Content-Type': 'application/json',
2375
+ 'Authorization': auth_header,
2376
+ }
2377
+
2378
+ _params: Dict[str, Any] = {
2379
+ }
2380
+
2381
+ _path_params: Dict[str, Any] = {
2382
+ }
2383
+
2384
+ _json: Any = ConjureEncoder().default(request)
2385
+
2386
+ _path = '/authorization/v1/api-keys/user'
2387
+ _path = _path.format(**_path_params)
2388
+
2389
+ _response: Response = self._request(
2390
+ 'POST',
2391
+ self._uri + _path,
2392
+ params=_params,
2393
+ headers=_headers,
2394
+ json=_json)
2395
+
2396
+ _decoder = ConjureDecoder()
2397
+ return _decoder.decode(_response.json(), authorization_ListApiKeyResponse, self._return_none_for_unknown_union_types)
2398
+
2399
+ def revoke_api_key(self, auth_header: str, rid: str) -> None:
2400
+ """
2401
+ Delete an API key.
2402
+ """
2403
+
2404
+ _headers: Dict[str, Any] = {
2405
+ 'Accept': 'application/json',
2406
+ 'Authorization': auth_header,
2407
+ }
2408
+
2409
+ _params: Dict[str, Any] = {
2410
+ }
2411
+
2412
+ _path_params: Dict[str, Any] = {
2413
+ 'rid': rid,
2414
+ }
2415
+
2416
+ _json: Any = None
2417
+
2418
+ _path = '/authorization/v1/api-key/{rid}/delete'
2419
+ _path = _path.format(**_path_params)
2420
+
2421
+ _response: Response = self._request(
2422
+ 'PUT',
2423
+ self._uri + _path,
2424
+ params=_params,
2425
+ headers=_headers,
2426
+ json=_json)
2427
+
2428
+ return
2429
+
2430
+
2431
+ authorization_AuthorizationService.__name__ = "AuthorizationService"
2432
+ authorization_AuthorizationService.__qualname__ = "AuthorizationService"
2433
+ authorization_AuthorizationService.__module__ = "nominal_api.authorization"
2434
+
2435
+
2436
+ class authorization_CreateApiKeyRequest(ConjureBeanType):
2437
+
2438
+ @builtins.classmethod
2439
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2440
+ return {
2441
+ 'api_key_name': ConjureFieldDefinition('apiKeyName', str),
2442
+ 'expires_after_days': ConjureFieldDefinition('expiresAfterDays', OptionalTypeWrapper[int])
2443
+ }
2444
+
2445
+ __slots__: List[str] = ['_api_key_name', '_expires_after_days']
2446
+
2447
+ def __init__(self, api_key_name: str, expires_after_days: Optional[int] = None) -> None:
2448
+ self._api_key_name = api_key_name
2449
+ self._expires_after_days = expires_after_days
2450
+
2451
+ @builtins.property
2452
+ def api_key_name(self) -> str:
2453
+ """
2454
+ The name of the API key to create.
2455
+ """
2456
+ return self._api_key_name
2457
+
2458
+ @builtins.property
2459
+ def expires_after_days(self) -> Optional[int]:
2460
+ """
2461
+ The number of days after which the API key will expire.
2462
+ If omitted, the API key will not expire.
2463
+ """
2464
+ return self._expires_after_days
2465
+
2466
+
2467
+ authorization_CreateApiKeyRequest.__name__ = "CreateApiKeyRequest"
2468
+ authorization_CreateApiKeyRequest.__qualname__ = "CreateApiKeyRequest"
2469
+ authorization_CreateApiKeyRequest.__module__ = "nominal_api.authorization"
2470
+
2471
+
2472
+ class authorization_CreateApiKeyResponse(ConjureBeanType):
2473
+
2474
+ @builtins.classmethod
2475
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2476
+ return {
2477
+ 'api_key_metadata': ConjureFieldDefinition('apiKeyMetadata', authorization_ApiKey),
2478
+ 'api_key_value': ConjureFieldDefinition('apiKeyValue', str)
2479
+ }
2480
+
2481
+ __slots__: List[str] = ['_api_key_metadata', '_api_key_value']
2482
+
2483
+ def __init__(self, api_key_metadata: "authorization_ApiKey", api_key_value: str) -> None:
2484
+ self._api_key_metadata = api_key_metadata
2485
+ self._api_key_value = api_key_value
2486
+
2487
+ @builtins.property
2488
+ def api_key_metadata(self) -> "authorization_ApiKey":
2489
+ return self._api_key_metadata
2490
+
2491
+ @builtins.property
2492
+ def api_key_value(self) -> str:
2493
+ return self._api_key_value
2494
+
2495
+
2496
+ authorization_CreateApiKeyResponse.__name__ = "CreateApiKeyResponse"
2497
+ authorization_CreateApiKeyResponse.__qualname__ = "CreateApiKeyResponse"
2498
+ authorization_CreateApiKeyResponse.__module__ = "nominal_api.authorization"
2499
+
2500
+
2501
+ class authorization_GetAccessTokenFromApiKeyRequest(ConjureBeanType):
2502
+
2503
+ @builtins.classmethod
2504
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2505
+ return {
2506
+ 'api_key_value': ConjureFieldDefinition('apiKeyValue', str)
2507
+ }
2508
+
2509
+ __slots__: List[str] = ['_api_key_value']
2510
+
2511
+ def __init__(self, api_key_value: str) -> None:
2512
+ self._api_key_value = api_key_value
2513
+
2514
+ @builtins.property
2515
+ def api_key_value(self) -> str:
2516
+ return self._api_key_value
2517
+
2518
+
2519
+ authorization_GetAccessTokenFromApiKeyRequest.__name__ = "GetAccessTokenFromApiKeyRequest"
2520
+ authorization_GetAccessTokenFromApiKeyRequest.__qualname__ = "GetAccessTokenFromApiKeyRequest"
2521
+ authorization_GetAccessTokenFromApiKeyRequest.__module__ = "nominal_api.authorization"
2522
+
2523
+
2524
+ class authorization_GetAccessTokenRequest(ConjureBeanType):
2525
+
2526
+ @builtins.classmethod
2527
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2528
+ return {
2529
+ 'id_token': ConjureFieldDefinition('idToken', str),
2530
+ 'access_token': ConjureFieldDefinition('accessToken', str)
2531
+ }
2532
+
2533
+ __slots__: List[str] = ['_id_token', '_access_token']
2534
+
2535
+ def __init__(self, access_token: str, id_token: str) -> None:
2536
+ self._id_token = id_token
2537
+ self._access_token = access_token
2538
+
2539
+ @builtins.property
2540
+ def id_token(self) -> str:
2541
+ return self._id_token
2542
+
2543
+ @builtins.property
2544
+ def access_token(self) -> str:
2545
+ """
2546
+ The access token's audience must be for the Nominal API.
2547
+ """
2548
+ return self._access_token
2549
+
2550
+
2551
+ authorization_GetAccessTokenRequest.__name__ = "GetAccessTokenRequest"
2552
+ authorization_GetAccessTokenRequest.__qualname__ = "GetAccessTokenRequest"
2553
+ authorization_GetAccessTokenRequest.__module__ = "nominal_api.authorization"
2554
+
2555
+
2556
+ class authorization_GetAccessTokenResponse(ConjureBeanType):
2557
+
2558
+ @builtins.classmethod
2559
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2560
+ return {
2561
+ 'access_token': ConjureFieldDefinition('accessToken', str),
2562
+ 'expires_at_seconds': ConjureFieldDefinition('expiresAtSeconds', int),
2563
+ 'user_uuid': ConjureFieldDefinition('userUuid', str),
2564
+ 'org_uuid': ConjureFieldDefinition('orgUuid', str)
2565
+ }
2566
+
2567
+ __slots__: List[str] = ['_access_token', '_expires_at_seconds', '_user_uuid', '_org_uuid']
2568
+
2569
+ def __init__(self, access_token: str, expires_at_seconds: int, org_uuid: str, user_uuid: str) -> None:
2570
+ self._access_token = access_token
2571
+ self._expires_at_seconds = expires_at_seconds
2572
+ self._user_uuid = user_uuid
2573
+ self._org_uuid = org_uuid
2574
+
2575
+ @builtins.property
2576
+ def access_token(self) -> str:
2577
+ return self._access_token
2578
+
2579
+ @builtins.property
2580
+ def expires_at_seconds(self) -> int:
2581
+ return self._expires_at_seconds
2582
+
2583
+ @builtins.property
2584
+ def user_uuid(self) -> str:
2585
+ return self._user_uuid
2586
+
2587
+ @builtins.property
2588
+ def org_uuid(self) -> str:
2589
+ return self._org_uuid
2590
+
2591
+
2592
+ authorization_GetAccessTokenResponse.__name__ = "GetAccessTokenResponse"
2593
+ authorization_GetAccessTokenResponse.__qualname__ = "GetAccessTokenResponse"
2594
+ authorization_GetAccessTokenResponse.__module__ = "nominal_api.authorization"
2595
+
2596
+
2597
+ class authorization_InternalApiKeyService(Service):
2598
+ """
2599
+ This internal-only service manages long lived api keys.e
2600
+ """
2601
+
2602
+ def get_access_token_from_api_key_value(self, request: "authorization_GetAccessTokenFromApiKeyRequest") -> "authorization_GetAccessTokenResponse":
2603
+ """
2604
+ Get a Nominal-issued access token from a long-lived API key. Callers should verify that
2605
+ their api key is formatted properly (i.e. prefixed with "nominal_api_key") before calling this endpoint.
2606
+ """
2607
+
2608
+ _headers: Dict[str, Any] = {
2609
+ 'Accept': 'application/json',
2610
+ 'Content-Type': 'application/json',
2611
+ }
2612
+
2613
+ _params: Dict[str, Any] = {
2614
+ }
2615
+
2616
+ _path_params: Dict[str, Any] = {
2617
+ }
2618
+
2619
+ _json: Any = ConjureEncoder().default(request)
2620
+
2621
+ _path = '/api-key-internal/v1/access-token'
2622
+ _path = _path.format(**_path_params)
2623
+
2624
+ _response: Response = self._request(
2625
+ 'POST',
2626
+ self._uri + _path,
2627
+ params=_params,
2628
+ headers=_headers,
2629
+ json=_json)
2630
+
2631
+ _decoder = ConjureDecoder()
2632
+ return _decoder.decode(_response.json(), authorization_GetAccessTokenResponse, self._return_none_for_unknown_union_types)
2633
+
2634
+
2635
+ authorization_InternalApiKeyService.__name__ = "InternalApiKeyService"
2636
+ authorization_InternalApiKeyService.__qualname__ = "InternalApiKeyService"
2637
+ authorization_InternalApiKeyService.__module__ = "nominal_api.authorization"
2638
+
2639
+
2640
+ class authorization_IsEmailAllowedRequest(ConjureBeanType):
2641
+
2642
+ @builtins.classmethod
2643
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2644
+ return {
2645
+ 'email': ConjureFieldDefinition('email', str)
2646
+ }
2647
+
2648
+ __slots__: List[str] = ['_email']
2649
+
2650
+ def __init__(self, email: str) -> None:
2651
+ self._email = email
2652
+
2653
+ @builtins.property
2654
+ def email(self) -> str:
2655
+ return self._email
2656
+
2657
+
2658
+ authorization_IsEmailAllowedRequest.__name__ = "IsEmailAllowedRequest"
2659
+ authorization_IsEmailAllowedRequest.__qualname__ = "IsEmailAllowedRequest"
2660
+ authorization_IsEmailAllowedRequest.__module__ = "nominal_api.authorization"
2661
+
2662
+
2663
+ class authorization_IsEmailAllowedResponse(ConjureBeanType):
2664
+
2665
+ @builtins.classmethod
2666
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2667
+ return {
2668
+ 'allowed': ConjureFieldDefinition('allowed', bool)
2669
+ }
2670
+
2671
+ __slots__: List[str] = ['_allowed']
2672
+
2673
+ def __init__(self, allowed: bool) -> None:
2674
+ self._allowed = allowed
2675
+
2676
+ @builtins.property
2677
+ def allowed(self) -> bool:
2678
+ return self._allowed
2679
+
2680
+
2681
+ authorization_IsEmailAllowedResponse.__name__ = "IsEmailAllowedResponse"
2682
+ authorization_IsEmailAllowedResponse.__qualname__ = "IsEmailAllowedResponse"
2683
+ authorization_IsEmailAllowedResponse.__module__ = "nominal_api.authorization"
2684
+
2685
+
2686
+ class authorization_ListApiKeyRequest(ConjureBeanType):
2687
+
2688
+ @builtins.classmethod
2689
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2690
+ return {
2691
+ 'include_deleted': ConjureFieldDefinition('includeDeleted', OptionalTypeWrapper[bool]),
2692
+ 'include_expired': ConjureFieldDefinition('includeExpired', OptionalTypeWrapper[bool]),
2693
+ 'page_size': ConjureFieldDefinition('pageSize', OptionalTypeWrapper[int]),
2694
+ 'next_page_token': ConjureFieldDefinition('nextPageToken', OptionalTypeWrapper[api_Token])
2695
+ }
2696
+
2697
+ __slots__: List[str] = ['_include_deleted', '_include_expired', '_page_size', '_next_page_token']
2698
+
2699
+ def __init__(self, include_deleted: Optional[bool] = None, include_expired: Optional[bool] = None, next_page_token: Optional[str] = None, page_size: Optional[int] = None) -> None:
2700
+ self._include_deleted = include_deleted
2701
+ self._include_expired = include_expired
2702
+ self._page_size = page_size
2703
+ self._next_page_token = next_page_token
2704
+
2705
+ @builtins.property
2706
+ def include_deleted(self) -> Optional[bool]:
2707
+ """
2708
+ If true, include deleted API keys in the response. Defaults to false.
2709
+ """
2710
+ return self._include_deleted
2711
+
2712
+ @builtins.property
2713
+ def include_expired(self) -> Optional[bool]:
2714
+ """
2715
+ If true, include expired API keys in the response. Defaults to false.
2716
+ """
2717
+ return self._include_expired
2718
+
2719
+ @builtins.property
2720
+ def page_size(self) -> Optional[int]:
2721
+ """
2722
+ The maximum number of API keys to return. Defaults to 100.
2723
+ """
2724
+ return self._page_size
2725
+
2726
+ @builtins.property
2727
+ def next_page_token(self) -> Optional[str]:
2728
+ return self._next_page_token
2729
+
2730
+
2731
+ authorization_ListApiKeyRequest.__name__ = "ListApiKeyRequest"
2732
+ authorization_ListApiKeyRequest.__qualname__ = "ListApiKeyRequest"
2733
+ authorization_ListApiKeyRequest.__module__ = "nominal_api.authorization"
2734
+
2735
+
2736
+ class authorization_ListApiKeyResponse(ConjureBeanType):
2737
+
2738
+ @builtins.classmethod
2739
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2740
+ return {
2741
+ 'api_keys': ConjureFieldDefinition('apiKeys', List[authorization_ApiKey]),
2742
+ 'next_page_token': ConjureFieldDefinition('nextPageToken', OptionalTypeWrapper[api_Token])
2743
+ }
2744
+
2745
+ __slots__: List[str] = ['_api_keys', '_next_page_token']
2746
+
2747
+ def __init__(self, api_keys: List["authorization_ApiKey"], next_page_token: Optional[str] = None) -> None:
2748
+ self._api_keys = api_keys
2749
+ self._next_page_token = next_page_token
2750
+
2751
+ @builtins.property
2752
+ def api_keys(self) -> List["authorization_ApiKey"]:
2753
+ return self._api_keys
2754
+
2755
+ @builtins.property
2756
+ def next_page_token(self) -> Optional[str]:
2757
+ return self._next_page_token
2758
+
2759
+
2760
+ authorization_ListApiKeyResponse.__name__ = "ListApiKeyResponse"
2761
+ authorization_ListApiKeyResponse.__qualname__ = "ListApiKeyResponse"
2762
+ authorization_ListApiKeyResponse.__module__ = "nominal_api.authorization"
2763
+
2764
+
2765
+ class authorization_RegisterInWorkspaceRequest(ConjureBeanType):
2766
+
2767
+ @builtins.classmethod
2768
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2769
+ return {
2770
+ 'resource_rids': ConjureFieldDefinition('resourceRids', List[str]),
2771
+ 'workspace_rid': ConjureFieldDefinition('workspaceRid', api_rids_WorkspaceRid)
2772
+ }
2773
+
2774
+ __slots__: List[str] = ['_resource_rids', '_workspace_rid']
2775
+
2776
+ def __init__(self, resource_rids: List[str], workspace_rid: str) -> None:
2777
+ self._resource_rids = resource_rids
2778
+ self._workspace_rid = workspace_rid
2779
+
2780
+ @builtins.property
2781
+ def resource_rids(self) -> List[str]:
2782
+ return self._resource_rids
2783
+
2784
+ @builtins.property
2785
+ def workspace_rid(self) -> str:
2786
+ return self._workspace_rid
2787
+
2788
+
2789
+ authorization_RegisterInWorkspaceRequest.__name__ = "RegisterInWorkspaceRequest"
2790
+ authorization_RegisterInWorkspaceRequest.__qualname__ = "RegisterInWorkspaceRequest"
2791
+ authorization_RegisterInWorkspaceRequest.__module__ = "nominal_api.authorization"
2792
+
2793
+
2794
+ class authorization_RegistrationRequest(ConjureBeanType):
2795
+
2796
+ @builtins.classmethod
2797
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
2798
+ return {
2799
+ 'rids': ConjureFieldDefinition('rids', List[str]),
2800
+ 'organization_rid': ConjureFieldDefinition('organizationRid', OptionalTypeWrapper[str])
2801
+ }
2802
+
2803
+ __slots__: List[str] = ['_rids', '_organization_rid']
2804
+
2805
+ def __init__(self, rids: List[str], organization_rid: Optional[str] = None) -> None:
2806
+ self._rids = rids
2807
+ self._organization_rid = organization_rid
2808
+
2809
+ @builtins.property
2810
+ def rids(self) -> List[str]:
2811
+ return self._rids
2812
+
2813
+ @builtins.property
2814
+ def organization_rid(self) -> Optional[str]:
2815
+ """
2816
+ If omitted, will use the user's organizationRid.
2817
+ """
2818
+ return self._organization_rid
2819
+
2820
+
2821
+ authorization_RegistrationRequest.__name__ = "RegistrationRequest"
2822
+ authorization_RegistrationRequest.__qualname__ = "RegistrationRequest"
2823
+ authorization_RegistrationRequest.__module__ = "nominal_api.authorization"
2824
+
2825
+
1243
2826
  class comments_api_Comment(ConjureBeanType):
1244
2827
 
1245
2828
  @builtins.classmethod
@@ -16645,6 +18228,162 @@ scout_chartdefinition_api_AxisThresholdVisualization.__qualname__ = "AxisThresho
16645
18228
  scout_chartdefinition_api_AxisThresholdVisualization.__module__ = "nominal_api.scout_chartdefinition_api"
16646
18229
 
16647
18230
 
18231
+ class scout_chartdefinition_api_BitFlag(ConjureBeanType):
18232
+ """
18233
+ The settings for a bit flag mapping. Each position should be unique. Position 0 represents the least significant bit
18234
+ and position 31 represents the most significant bit.
18235
+ """
18236
+
18237
+ @builtins.classmethod
18238
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
18239
+ return {
18240
+ 'position': ConjureFieldDefinition('position', int),
18241
+ 'label': ConjureFieldDefinition('label', str)
18242
+ }
18243
+
18244
+ __slots__: List[str] = ['_position', '_label']
18245
+
18246
+ def __init__(self, label: str, position: int) -> None:
18247
+ self._position = position
18248
+ self._label = label
18249
+
18250
+ @builtins.property
18251
+ def position(self) -> int:
18252
+ return self._position
18253
+
18254
+ @builtins.property
18255
+ def label(self) -> str:
18256
+ return self._label
18257
+
18258
+
18259
+ scout_chartdefinition_api_BitFlag.__name__ = "BitFlag"
18260
+ scout_chartdefinition_api_BitFlag.__qualname__ = "BitFlag"
18261
+ scout_chartdefinition_api_BitFlag.__module__ = "nominal_api.scout_chartdefinition_api"
18262
+
18263
+
18264
+ class scout_chartdefinition_api_BitFlagMapCellConfig(ConjureBeanType):
18265
+
18266
+ @builtins.classmethod
18267
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
18268
+ return {
18269
+ 'visualisation': ConjureFieldDefinition('visualisation', OptionalTypeWrapper[scout_chartdefinition_api_BitFlagMapVisualisation])
18270
+ }
18271
+
18272
+ __slots__: List[str] = ['_visualisation']
18273
+
18274
+ def __init__(self, visualisation: Optional["scout_chartdefinition_api_BitFlagMapVisualisation"] = None) -> None:
18275
+ self._visualisation = visualisation
18276
+
18277
+ @builtins.property
18278
+ def visualisation(self) -> Optional["scout_chartdefinition_api_BitFlagMapVisualisation"]:
18279
+ return self._visualisation
18280
+
18281
+
18282
+ scout_chartdefinition_api_BitFlagMapCellConfig.__name__ = "BitFlagMapCellConfig"
18283
+ scout_chartdefinition_api_BitFlagMapCellConfig.__qualname__ = "BitFlagMapCellConfig"
18284
+ scout_chartdefinition_api_BitFlagMapCellConfig.__module__ = "nominal_api.scout_chartdefinition_api"
18285
+
18286
+
18287
+ class scout_chartdefinition_api_BitFlagMapRawVisualisation(ConjureBeanType):
18288
+ """
18289
+ The settings for a raw bit flag map visualisation.
18290
+ """
18291
+
18292
+ @builtins.classmethod
18293
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
18294
+ return {
18295
+ 'high_color': ConjureFieldDefinition('highColor', OptionalTypeWrapper[scout_api_HexColor]),
18296
+ 'low_color': ConjureFieldDefinition('lowColor', OptionalTypeWrapper[scout_api_HexColor]),
18297
+ 'bit_flags': ConjureFieldDefinition('bitFlags', List[scout_chartdefinition_api_BitFlag])
18298
+ }
18299
+
18300
+ __slots__: List[str] = ['_high_color', '_low_color', '_bit_flags']
18301
+
18302
+ def __init__(self, bit_flags: List["scout_chartdefinition_api_BitFlag"], high_color: Optional[str] = None, low_color: Optional[str] = None) -> None:
18303
+ self._high_color = high_color
18304
+ self._low_color = low_color
18305
+ self._bit_flags = bit_flags
18306
+
18307
+ @builtins.property
18308
+ def high_color(self) -> Optional[str]:
18309
+ """
18310
+ The color when any bit is high
18311
+ """
18312
+ return self._high_color
18313
+
18314
+ @builtins.property
18315
+ def low_color(self) -> Optional[str]:
18316
+ """
18317
+ The color when all bits are low
18318
+ """
18319
+ return self._low_color
18320
+
18321
+ @builtins.property
18322
+ def bit_flags(self) -> List["scout_chartdefinition_api_BitFlag"]:
18323
+ return self._bit_flags
18324
+
18325
+
18326
+ scout_chartdefinition_api_BitFlagMapRawVisualisation.__name__ = "BitFlagMapRawVisualisation"
18327
+ scout_chartdefinition_api_BitFlagMapRawVisualisation.__qualname__ = "BitFlagMapRawVisualisation"
18328
+ scout_chartdefinition_api_BitFlagMapRawVisualisation.__module__ = "nominal_api.scout_chartdefinition_api"
18329
+
18330
+
18331
+ class scout_chartdefinition_api_BitFlagMapVisualisation(ConjureUnionType):
18332
+ _raw: Optional["scout_chartdefinition_api_BitFlagMapRawVisualisation"] = None
18333
+
18334
+ @builtins.classmethod
18335
+ def _options(cls) -> Dict[str, ConjureFieldDefinition]:
18336
+ return {
18337
+ 'raw': ConjureFieldDefinition('raw', scout_chartdefinition_api_BitFlagMapRawVisualisation)
18338
+ }
18339
+
18340
+ def __init__(
18341
+ self,
18342
+ raw: Optional["scout_chartdefinition_api_BitFlagMapRawVisualisation"] = None,
18343
+ type_of_union: Optional[str] = None
18344
+ ) -> None:
18345
+ if type_of_union is None:
18346
+ if (raw is not None) != 1:
18347
+ raise ValueError('a union must contain a single member')
18348
+
18349
+ if raw is not None:
18350
+ self._raw = raw
18351
+ self._type = 'raw'
18352
+
18353
+ elif type_of_union == 'raw':
18354
+ if raw is None:
18355
+ raise ValueError('a union value must not be None')
18356
+ self._raw = raw
18357
+ self._type = 'raw'
18358
+
18359
+ @builtins.property
18360
+ def raw(self) -> Optional["scout_chartdefinition_api_BitFlagMapRawVisualisation"]:
18361
+ return self._raw
18362
+
18363
+ def accept(self, visitor) -> Any:
18364
+ if not isinstance(visitor, scout_chartdefinition_api_BitFlagMapVisualisationVisitor):
18365
+ raise ValueError('{} is not an instance of scout_chartdefinition_api_BitFlagMapVisualisationVisitor'.format(visitor.__class__.__name__))
18366
+ if self._type == 'raw' and self.raw is not None:
18367
+ return visitor._raw(self.raw)
18368
+
18369
+
18370
+ scout_chartdefinition_api_BitFlagMapVisualisation.__name__ = "BitFlagMapVisualisation"
18371
+ scout_chartdefinition_api_BitFlagMapVisualisation.__qualname__ = "BitFlagMapVisualisation"
18372
+ scout_chartdefinition_api_BitFlagMapVisualisation.__module__ = "nominal_api.scout_chartdefinition_api"
18373
+
18374
+
18375
+ class scout_chartdefinition_api_BitFlagMapVisualisationVisitor:
18376
+
18377
+ @abstractmethod
18378
+ def _raw(self, raw: "scout_chartdefinition_api_BitFlagMapRawVisualisation") -> Any:
18379
+ pass
18380
+
18381
+
18382
+ scout_chartdefinition_api_BitFlagMapVisualisationVisitor.__name__ = "BitFlagMapVisualisationVisitor"
18383
+ scout_chartdefinition_api_BitFlagMapVisualisationVisitor.__qualname__ = "BitFlagMapVisualisationVisitor"
18384
+ scout_chartdefinition_api_BitFlagMapVisualisationVisitor.__module__ = "nominal_api.scout_chartdefinition_api"
18385
+
18386
+
16648
18387
  class scout_chartdefinition_api_CartesianChartDefinition(ConjureUnionType):
16649
18388
  _v1: Optional["scout_chartdefinition_api_CartesianChartDefinitionV1"] = None
16650
18389
 
@@ -19413,13 +21152,15 @@ class scout_chartdefinition_api_ValueTableCellConfig(ConjureUnionType):
19413
21152
  _numeric: Optional["scout_chartdefinition_api_NumericCellConfig"] = None
19414
21153
  _enum: Optional["scout_chartdefinition_api_EnumCellConfig"] = None
19415
21154
  _range: Optional["scout_chartdefinition_api_RangeCellConfig"] = None
21155
+ _bit_flag_map: Optional["scout_chartdefinition_api_BitFlagMapCellConfig"] = None
19416
21156
 
19417
21157
  @builtins.classmethod
19418
21158
  def _options(cls) -> Dict[str, ConjureFieldDefinition]:
19419
21159
  return {
19420
21160
  'numeric': ConjureFieldDefinition('numeric', scout_chartdefinition_api_NumericCellConfig),
19421
21161
  'enum': ConjureFieldDefinition('enum', scout_chartdefinition_api_EnumCellConfig),
19422
- 'range': ConjureFieldDefinition('range', scout_chartdefinition_api_RangeCellConfig)
21162
+ 'range': ConjureFieldDefinition('range', scout_chartdefinition_api_RangeCellConfig),
21163
+ 'bit_flag_map': ConjureFieldDefinition('bitFlagMap', scout_chartdefinition_api_BitFlagMapCellConfig)
19423
21164
  }
19424
21165
 
19425
21166
  def __init__(
@@ -19427,10 +21168,11 @@ class scout_chartdefinition_api_ValueTableCellConfig(ConjureUnionType):
19427
21168
  numeric: Optional["scout_chartdefinition_api_NumericCellConfig"] = None,
19428
21169
  enum: Optional["scout_chartdefinition_api_EnumCellConfig"] = None,
19429
21170
  range: Optional["scout_chartdefinition_api_RangeCellConfig"] = None,
21171
+ bit_flag_map: Optional["scout_chartdefinition_api_BitFlagMapCellConfig"] = None,
19430
21172
  type_of_union: Optional[str] = None
19431
21173
  ) -> None:
19432
21174
  if type_of_union is None:
19433
- if (numeric is not None) + (enum is not None) + (range is not None) != 1:
21175
+ if (numeric is not None) + (enum is not None) + (range is not None) + (bit_flag_map is not None) != 1:
19434
21176
  raise ValueError('a union must contain a single member')
19435
21177
 
19436
21178
  if numeric is not None:
@@ -19442,6 +21184,9 @@ class scout_chartdefinition_api_ValueTableCellConfig(ConjureUnionType):
19442
21184
  if range is not None:
19443
21185
  self._range = range
19444
21186
  self._type = 'range'
21187
+ if bit_flag_map is not None:
21188
+ self._bit_flag_map = bit_flag_map
21189
+ self._type = 'bitFlagMap'
19445
21190
 
19446
21191
  elif type_of_union == 'numeric':
19447
21192
  if numeric is None:
@@ -19458,6 +21203,11 @@ class scout_chartdefinition_api_ValueTableCellConfig(ConjureUnionType):
19458
21203
  raise ValueError('a union value must not be None')
19459
21204
  self._range = range
19460
21205
  self._type = 'range'
21206
+ elif type_of_union == 'bitFlagMap':
21207
+ if bit_flag_map is None:
21208
+ raise ValueError('a union value must not be None')
21209
+ self._bit_flag_map = bit_flag_map
21210
+ self._type = 'bitFlagMap'
19461
21211
 
19462
21212
  @builtins.property
19463
21213
  def numeric(self) -> Optional["scout_chartdefinition_api_NumericCellConfig"]:
@@ -19471,6 +21221,10 @@ class scout_chartdefinition_api_ValueTableCellConfig(ConjureUnionType):
19471
21221
  def range(self) -> Optional["scout_chartdefinition_api_RangeCellConfig"]:
19472
21222
  return self._range
19473
21223
 
21224
+ @builtins.property
21225
+ def bit_flag_map(self) -> Optional["scout_chartdefinition_api_BitFlagMapCellConfig"]:
21226
+ return self._bit_flag_map
21227
+
19474
21228
  def accept(self, visitor) -> Any:
19475
21229
  if not isinstance(visitor, scout_chartdefinition_api_ValueTableCellConfigVisitor):
19476
21230
  raise ValueError('{} is not an instance of scout_chartdefinition_api_ValueTableCellConfigVisitor'.format(visitor.__class__.__name__))
@@ -19480,6 +21234,8 @@ class scout_chartdefinition_api_ValueTableCellConfig(ConjureUnionType):
19480
21234
  return visitor._enum(self.enum)
19481
21235
  if self._type == 'range' and self.range is not None:
19482
21236
  return visitor._range(self.range)
21237
+ if self._type == 'bitFlagMap' and self.bit_flag_map is not None:
21238
+ return visitor._bit_flag_map(self.bit_flag_map)
19483
21239
 
19484
21240
 
19485
21241
  scout_chartdefinition_api_ValueTableCellConfig.__name__ = "ValueTableCellConfig"
@@ -19501,6 +21257,10 @@ class scout_chartdefinition_api_ValueTableCellConfigVisitor:
19501
21257
  def _range(self, range: "scout_chartdefinition_api_RangeCellConfig") -> Any:
19502
21258
  pass
19503
21259
 
21260
+ @abstractmethod
21261
+ def _bit_flag_map(self, bit_flag_map: "scout_chartdefinition_api_BitFlagMapCellConfig") -> Any:
21262
+ pass
21263
+
19504
21264
 
19505
21265
  scout_chartdefinition_api_ValueTableCellConfigVisitor.__name__ = "ValueTableCellConfigVisitor"
19506
21266
  scout_chartdefinition_api_ValueTableCellConfigVisitor.__qualname__ = "ValueTableCellConfigVisitor"
@@ -67132,6 +68892,151 @@ secrets_api_UpdateSecretRequest.__qualname__ = "UpdateSecretRequest"
67132
68892
  secrets_api_UpdateSecretRequest.__module__ = "nominal_api.secrets_api"
67133
68893
 
67134
68894
 
68895
+ class security_api_workspace_Workspace(ConjureBeanType):
68896
+
68897
+ @builtins.classmethod
68898
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
68899
+ return {
68900
+ 'id': ConjureFieldDefinition('id', api_ids_WorkspaceId),
68901
+ 'rid': ConjureFieldDefinition('rid', api_rids_WorkspaceRid),
68902
+ 'org': ConjureFieldDefinition('org', authentication_api_OrgRid)
68903
+ }
68904
+
68905
+ __slots__: List[str] = ['_id', '_rid', '_org']
68906
+
68907
+ def __init__(self, id: str, org: str, rid: str) -> None:
68908
+ self._id = id
68909
+ self._rid = rid
68910
+ self._org = org
68911
+
68912
+ @builtins.property
68913
+ def id(self) -> str:
68914
+ """
68915
+ A unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
68916
+ """
68917
+ return self._id
68918
+
68919
+ @builtins.property
68920
+ def rid(self) -> str:
68921
+ return self._rid
68922
+
68923
+ @builtins.property
68924
+ def org(self) -> str:
68925
+ return self._org
68926
+
68927
+
68928
+ security_api_workspace_Workspace.__name__ = "Workspace"
68929
+ security_api_workspace_Workspace.__qualname__ = "Workspace"
68930
+ security_api_workspace_Workspace.__module__ = "nominal_api.security_api_workspace"
68931
+
68932
+
68933
+ class security_api_workspace_WorkspaceService(Service):
68934
+ """
68935
+ This service provides information about workspaces. Workspaces provide access control boundaries. All resources in
68936
+ Nominal live within a workspace.
68937
+ """
68938
+
68939
+ def get_workspaces(self, auth_header: str) -> List["security_api_workspace_Workspace"]:
68940
+ """
68941
+ Gets all workspaces that the requesting user belongs to.
68942
+ """
68943
+
68944
+ _headers: Dict[str, Any] = {
68945
+ 'Accept': 'application/json',
68946
+ 'Authorization': auth_header,
68947
+ }
68948
+
68949
+ _params: Dict[str, Any] = {
68950
+ }
68951
+
68952
+ _path_params: Dict[str, Any] = {
68953
+ }
68954
+
68955
+ _json: Any = None
68956
+
68957
+ _path = '/workspaces/v1/workspaces'
68958
+ _path = _path.format(**_path_params)
68959
+
68960
+ _response: Response = self._request(
68961
+ 'GET',
68962
+ self._uri + _path,
68963
+ params=_params,
68964
+ headers=_headers,
68965
+ json=_json)
68966
+
68967
+ _decoder = ConjureDecoder()
68968
+ return _decoder.decode(_response.json(), List[security_api_workspace_Workspace], self._return_none_for_unknown_union_types)
68969
+
68970
+ def get_workspace(self, auth_header: str, workspace_rid: str) -> "security_api_workspace_Workspace":
68971
+ """
68972
+ Gets the workspace with the specified WorkspaceRid.
68973
+ """
68974
+
68975
+ _headers: Dict[str, Any] = {
68976
+ 'Accept': 'application/json',
68977
+ 'Authorization': auth_header,
68978
+ }
68979
+
68980
+ _params: Dict[str, Any] = {
68981
+ }
68982
+
68983
+ _path_params: Dict[str, Any] = {
68984
+ 'workspaceRid': workspace_rid,
68985
+ }
68986
+
68987
+ _json: Any = None
68988
+
68989
+ _path = '/workspaces/v1/workspaces/{workspaceRid}'
68990
+ _path = _path.format(**_path_params)
68991
+
68992
+ _response: Response = self._request(
68993
+ 'GET',
68994
+ self._uri + _path,
68995
+ params=_params,
68996
+ headers=_headers,
68997
+ json=_json)
68998
+
68999
+ _decoder = ConjureDecoder()
69000
+ return _decoder.decode(_response.json(), security_api_workspace_Workspace, self._return_none_for_unknown_union_types)
69001
+
69002
+ def get_default_workspace(self, auth_header: str) -> Optional["security_api_workspace_Workspace"]:
69003
+ """
69004
+ Gets the default workspace for the requesting user. It may not be present if the user does not have
69005
+ access to any workspaces or no default workspace is configured for the user's organization.
69006
+ """
69007
+
69008
+ _headers: Dict[str, Any] = {
69009
+ 'Accept': 'application/json',
69010
+ 'Authorization': auth_header,
69011
+ }
69012
+
69013
+ _params: Dict[str, Any] = {
69014
+ }
69015
+
69016
+ _path_params: Dict[str, Any] = {
69017
+ }
69018
+
69019
+ _json: Any = None
69020
+
69021
+ _path = '/workspaces/v1/default-workspace'
69022
+ _path = _path.format(**_path_params)
69023
+
69024
+ _response: Response = self._request(
69025
+ 'GET',
69026
+ self._uri + _path,
69027
+ params=_params,
69028
+ headers=_headers,
69029
+ json=_json)
69030
+
69031
+ _decoder = ConjureDecoder()
69032
+ return None if _response.status_code == 204 else _decoder.decode(_response.json(), OptionalTypeWrapper[security_api_workspace_Workspace], self._return_none_for_unknown_union_types)
69033
+
69034
+
69035
+ security_api_workspace_WorkspaceService.__name__ = "WorkspaceService"
69036
+ security_api_workspace_WorkspaceService.__qualname__ = "WorkspaceService"
69037
+ security_api_workspace_WorkspaceService.__module__ = "nominal_api.security_api_workspace"
69038
+
69039
+
67135
69040
  class storage_datasource_api_CreateNominalDataSourceRequest(ConjureBeanType):
67136
69041
 
67137
69042
  @builtins.classmethod
@@ -72993,6 +74898,8 @@ scout_channelvariables_api_ChannelVariableName = str
72993
74898
 
72994
74899
  scout_datareview_api_ManualCheckEvaluationRid = str
72995
74900
 
74901
+ api_ids_WorkspaceId = str
74902
+
72996
74903
  scout_asset_api_Channel = str
72997
74904
 
72998
74905
  scout_rids_api_FunctionRid = str
@@ -73067,6 +74974,8 @@ storage_writer_api_Field = str
73067
74974
 
73068
74975
  api_TagName = str
73069
74976
 
74977
+ authentication_api_UserRid = str
74978
+
73070
74979
  scout_datasource_connection_api_ConnectionRid = str
73071
74980
 
73072
74981
  scout_channelvariables_api_ComputeSpecV1 = str
@@ -73169,6 +75078,8 @@ scout_api_HexColor = str
73169
75078
 
73170
75079
  scout_datasource_connection_api_SecretRid = str
73171
75080
 
75081
+ authorization_ApiKeyRid = str
75082
+
73172
75083
  scout_rids_api_ApiKeyRid = str
73173
75084
 
73174
75085
  ingest_api_ChannelPrefix = OptionalTypeWrapper[str]