nominal-api 0.965.0__py3-none-any.whl → 0.966.0__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/__init__.py CHANGED
@@ -82,5 +82,5 @@ __all__ = [
82
82
 
83
83
  __conjure_generator_version__ = "4.17.0"
84
84
 
85
- __version__ = "0.965.0"
85
+ __version__ = "0.966.0"
86
86
 
nominal_api/_impl.py CHANGED
@@ -5898,6 +5898,153 @@ datasource_pagination_api_PageResponse.__qualname__ = "PageResponse"
5898
5898
  datasource_pagination_api_PageResponse.__module__ = "nominal_api.datasource_pagination_api"
5899
5899
 
5900
5900
 
5901
+ class event_AggregateEventsRequest(ConjureBeanType):
5902
+
5903
+ @builtins.classmethod
5904
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
5905
+ return {
5906
+ 'query': ConjureFieldDefinition('query', event_SearchQuery),
5907
+ 'aggregate_types': ConjureFieldDefinition('aggregateTypes', List[event_AggregateType])
5908
+ }
5909
+
5910
+ __slots__: List[str] = ['_query', '_aggregate_types']
5911
+
5912
+ def __init__(self, aggregate_types: List["event_AggregateType"], query: "event_SearchQuery") -> None:
5913
+ self._query = query
5914
+ self._aggregate_types = aggregate_types
5915
+
5916
+ @builtins.property
5917
+ def query(self) -> "event_SearchQuery":
5918
+ return self._query
5919
+
5920
+ @builtins.property
5921
+ def aggregate_types(self) -> List["event_AggregateType"]:
5922
+ return self._aggregate_types
5923
+
5924
+
5925
+ event_AggregateEventsRequest.__name__ = "AggregateEventsRequest"
5926
+ event_AggregateEventsRequest.__qualname__ = "AggregateEventsRequest"
5927
+ event_AggregateEventsRequest.__module__ = "nominal_api.event"
5928
+
5929
+
5930
+ class event_AggregateEventsResponse(ConjureBeanType):
5931
+
5932
+ @builtins.classmethod
5933
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
5934
+ return {
5935
+ 'values': ConjureFieldDefinition('values', Dict[event_AggregateType, event_AggregateValue])
5936
+ }
5937
+
5938
+ __slots__: List[str] = ['_values']
5939
+
5940
+ def __init__(self, values: Dict["event_AggregateType", "event_AggregateValue"]) -> None:
5941
+ self._values = values
5942
+
5943
+ @builtins.property
5944
+ def values(self) -> Dict["event_AggregateType", "event_AggregateValue"]:
5945
+ return self._values
5946
+
5947
+
5948
+ event_AggregateEventsResponse.__name__ = "AggregateEventsResponse"
5949
+ event_AggregateEventsResponse.__qualname__ = "AggregateEventsResponse"
5950
+ event_AggregateEventsResponse.__module__ = "nominal_api.event"
5951
+
5952
+
5953
+ class event_AggregateType(ConjureEnumType):
5954
+
5955
+ TOTAL_DURATION = 'TOTAL_DURATION'
5956
+ '''TOTAL_DURATION'''
5957
+ TOTAL_COUNT = 'TOTAL_COUNT'
5958
+ '''TOTAL_COUNT'''
5959
+ UNKNOWN = 'UNKNOWN'
5960
+ '''UNKNOWN'''
5961
+
5962
+ def __reduce_ex__(self, proto):
5963
+ return self.__class__, (self.name,)
5964
+
5965
+
5966
+ event_AggregateType.__name__ = "AggregateType"
5967
+ event_AggregateType.__qualname__ = "AggregateType"
5968
+ event_AggregateType.__module__ = "nominal_api.event"
5969
+
5970
+
5971
+ class event_AggregateValue(ConjureUnionType):
5972
+ _duration: Optional["scout_run_api_Duration"] = None
5973
+ _count: Optional[int] = None
5974
+
5975
+ @builtins.classmethod
5976
+ def _options(cls) -> Dict[str, ConjureFieldDefinition]:
5977
+ return {
5978
+ 'duration': ConjureFieldDefinition('duration', scout_run_api_Duration),
5979
+ 'count': ConjureFieldDefinition('count', int)
5980
+ }
5981
+
5982
+ def __init__(
5983
+ self,
5984
+ duration: Optional["scout_run_api_Duration"] = None,
5985
+ count: Optional[int] = None,
5986
+ type_of_union: Optional[str] = None
5987
+ ) -> None:
5988
+ if type_of_union is None:
5989
+ if (duration is not None) + (count is not None) != 1:
5990
+ raise ValueError('a union must contain a single member')
5991
+
5992
+ if duration is not None:
5993
+ self._duration = duration
5994
+ self._type = 'duration'
5995
+ if count is not None:
5996
+ self._count = count
5997
+ self._type = 'count'
5998
+
5999
+ elif type_of_union == 'duration':
6000
+ if duration is None:
6001
+ raise ValueError('a union value must not be None')
6002
+ self._duration = duration
6003
+ self._type = 'duration'
6004
+ elif type_of_union == 'count':
6005
+ if count is None:
6006
+ raise ValueError('a union value must not be None')
6007
+ self._count = count
6008
+ self._type = 'count'
6009
+
6010
+ @builtins.property
6011
+ def duration(self) -> Optional["scout_run_api_Duration"]:
6012
+ return self._duration
6013
+
6014
+ @builtins.property
6015
+ def count(self) -> Optional[int]:
6016
+ return self._count
6017
+
6018
+ def accept(self, visitor) -> Any:
6019
+ if not isinstance(visitor, event_AggregateValueVisitor):
6020
+ raise ValueError('{} is not an instance of event_AggregateValueVisitor'.format(visitor.__class__.__name__))
6021
+ if self._type == 'duration' and self.duration is not None:
6022
+ return visitor._duration(self.duration)
6023
+ if self._type == 'count' and self.count is not None:
6024
+ return visitor._count(self.count)
6025
+
6026
+
6027
+ event_AggregateValue.__name__ = "AggregateValue"
6028
+ event_AggregateValue.__qualname__ = "AggregateValue"
6029
+ event_AggregateValue.__module__ = "nominal_api.event"
6030
+
6031
+
6032
+ class event_AggregateValueVisitor:
6033
+
6034
+ @abstractmethod
6035
+ def _duration(self, duration: "scout_run_api_Duration") -> Any:
6036
+ pass
6037
+
6038
+ @abstractmethod
6039
+ def _count(self, count: int) -> Any:
6040
+ pass
6041
+
6042
+
6043
+ event_AggregateValueVisitor.__name__ = "AggregateValueVisitor"
6044
+ event_AggregateValueVisitor.__qualname__ = "AggregateValueVisitor"
6045
+ event_AggregateValueVisitor.__module__ = "nominal_api.event"
6046
+
6047
+
5901
6048
  class event_ApiEventOrigin(ConjureBeanType):
5902
6049
 
5903
6050
  @builtins.classmethod
@@ -6859,6 +7006,38 @@ Empty fields in the UpdateEventRequest are left unchanged.
6859
7006
  _decoder = ConjureDecoder()
6860
7007
  return _decoder.decode(_response.json(), event_SearchEventsResponse, self._return_none_for_unknown_union_types)
6861
7008
 
7009
+ def aggregate_events(self, auth_header: str, request: "event_AggregateEventsRequest") -> "event_AggregateEventsResponse":
7010
+ """Searches for events matching the given filter and aggregates them based on the requested functions.
7011
+ """
7012
+ _conjure_encoder = ConjureEncoder()
7013
+
7014
+ _headers: Dict[str, Any] = {
7015
+ 'Accept': 'application/json',
7016
+ 'Content-Type': 'application/json',
7017
+ 'Authorization': auth_header,
7018
+ }
7019
+
7020
+ _params: Dict[str, Any] = {
7021
+ }
7022
+
7023
+ _path_params: Dict[str, str] = {
7024
+ }
7025
+
7026
+ _json: Any = _conjure_encoder.default(request)
7027
+
7028
+ _path = '/event/v1/aggregate-events'
7029
+ _path = _path.format(**_path_params)
7030
+
7031
+ _response: Response = self._request(
7032
+ 'POST',
7033
+ self._uri + _path,
7034
+ params=_params,
7035
+ headers=_headers,
7036
+ json=_json)
7037
+
7038
+ _decoder = ConjureDecoder()
7039
+ return _decoder.decode(_response.json(), event_AggregateEventsResponse, self._return_none_for_unknown_union_types)
7040
+
6862
7041
  def get_events_histogram(self, auth_header: str, request: "event_EventsHistogramRequest") -> "event_EventsHistogramResponse":
6863
7042
  """Gets a histogram of events that match the given filters.
6864
7043
  """
@@ -79531,6 +79710,8 @@ class scout_run_api_CreateRunRequest(ConjureBeanType):
79531
79710
 
79532
79711
  @builtins.property
79533
79712
  def title(self) -> str:
79713
+ """This must be non-empty.
79714
+ """
79534
79715
  return self._title
79535
79716
 
79536
79717
  @builtins.property
@@ -79563,6 +79744,9 @@ class scout_run_api_CreateRunRequest(ConjureBeanType):
79563
79744
 
79564
79745
  @builtins.property
79565
79746
  def data_sources(self) -> Dict[str, "scout_run_api_CreateRunDataSource"]:
79747
+ """The data sources to include in this run. If asset or assets is provided, this field
79748
+ will be ignored. Exactly one of data source(s) or asset(s) must be provided for a run.
79749
+ """
79566
79750
  return self._data_sources
79567
79751
 
79568
79752
  @builtins.property
@@ -79575,6 +79759,10 @@ class scout_run_api_CreateRunRequest(ConjureBeanType):
79575
79759
 
79576
79760
  @builtins.property
79577
79761
  def assets(self) -> List[str]:
79762
+ """The assets to associate with the run. If this is specified, the deprecated asset field
79763
+ is ignored and least one asset must be specified. Exactly one of data source(s) or asset(s)
79764
+ must be provided for a run.
79765
+ """
79578
79766
  return self._assets
79579
79767
 
79580
79768
  @builtins.property
@@ -81686,12 +81874,12 @@ class scout_run_api_UpdateRunRequest(ConjureBeanType):
81686
81874
  'data_sources': ConjureFieldDefinition('dataSources', OptionalTypeWrapper[Dict[scout_api_DataSourceRefName, scout_run_api_CreateRunDataSource]]),
81687
81875
  'attachments': ConjureFieldDefinition('attachments', OptionalTypeWrapper[List[api_rids_AttachmentRid]]),
81688
81876
  'asset': ConjureFieldDefinition('asset', OptionalTypeWrapper[scout_rids_api_AssetRid]),
81689
- 'assets': ConjureFieldDefinition('assets', List[scout_rids_api_AssetRid])
81877
+ 'assets': ConjureFieldDefinition('assets', OptionalTypeWrapper[List[scout_rids_api_AssetRid]])
81690
81878
  }
81691
81879
 
81692
81880
  __slots__: List[str] = ['_title', '_description', '_start_time', '_end_time', '_properties', '_labels', '_links', '_run_prefix', '_data_sources', '_attachments', '_asset', '_assets']
81693
81881
 
81694
- def __init__(self, assets: List[str], asset: Optional[str] = None, attachments: Optional[List[str]] = None, data_sources: Optional[Dict[str, "scout_run_api_CreateRunDataSource"]] = None, description: Optional[str] = None, end_time: Optional["scout_run_api_UtcTimestamp"] = None, labels: Optional[List[str]] = None, links: Optional[List["scout_run_api_Link"]] = None, properties: Optional[Dict[str, str]] = None, run_prefix: Optional[str] = None, start_time: Optional["scout_run_api_UtcTimestamp"] = None, title: Optional[str] = None) -> None:
81882
+ def __init__(self, asset: Optional[str] = None, assets: Optional[List[str]] = None, attachments: Optional[List[str]] = None, data_sources: Optional[Dict[str, "scout_run_api_CreateRunDataSource"]] = None, description: Optional[str] = None, end_time: Optional["scout_run_api_UtcTimestamp"] = None, labels: Optional[List[str]] = None, links: Optional[List["scout_run_api_Link"]] = None, properties: Optional[Dict[str, str]] = None, run_prefix: Optional[str] = None, start_time: Optional["scout_run_api_UtcTimestamp"] = None, title: Optional[str] = None) -> None:
81695
81883
  self._title = title
81696
81884
  self._description = description
81697
81885
  self._start_time = start_time
@@ -81741,6 +81929,9 @@ class scout_run_api_UpdateRunRequest(ConjureBeanType):
81741
81929
 
81742
81930
  @builtins.property
81743
81931
  def data_sources(self) -> Optional[Dict[str, "scout_run_api_CreateRunDataSource"]]:
81932
+ """The data sources to include in this run. If asset or assets is provided, this field
81933
+ will be ignored. Exactly one of data source(s) or asset(s) must be provided for a run.
81934
+ """
81744
81935
  return self._data_sources
81745
81936
 
81746
81937
  @builtins.property
@@ -81752,7 +81943,11 @@ class scout_run_api_UpdateRunRequest(ConjureBeanType):
81752
81943
  return self._asset
81753
81944
 
81754
81945
  @builtins.property
81755
- def assets(self) -> List[str]:
81946
+ def assets(self) -> Optional[List[str]]:
81947
+ """The assets to associate with the run. If this is specified, the deprecated asset field
81948
+ is ignored and at least one asset must be specified. Exactly one of data source(s) or
81949
+ asset(s) must be provided for a run.
81950
+ """
81756
81951
  return self._assets
81757
81952
 
81758
81953
 
@@ -86048,8 +86243,9 @@ Enforces write permission on the video.
86048
86243
  _decoder = ConjureDecoder()
86049
86244
  return _decoder.decode(_response.json(), scout_video_api_GenerateWhipStreamResponse, self._return_none_for_unknown_union_types)
86050
86245
 
86051
- def generate_whep_stream(self, auth_header: str, stream_id: str, video_rid: str) -> "scout_video_api_GenerateWhepStreamResponse":
86052
- """Returns WHEP URL, ICE servers, and token for playing back a stream.
86246
+ def generate_whep_stream(self, auth_header: str, video_rid: str) -> Optional["scout_video_api_GenerateWhepStreamResponse"]:
86247
+ """Returns WHEP URL, ICE servers, and token for playing back the active stream.
86248
+ Returns empty if there is no active stream.
86053
86249
  Enforces read permission on the video.
86054
86250
  """
86055
86251
  _conjure_encoder = ConjureEncoder()
@@ -86064,12 +86260,11 @@ Enforces read permission on the video.
86064
86260
 
86065
86261
  _path_params: Dict[str, str] = {
86066
86262
  'videoRid': quote(str(_conjure_encoder.default(video_rid)), safe=''),
86067
- 'streamId': quote(str(_conjure_encoder.default(stream_id)), safe=''),
86068
86263
  }
86069
86264
 
86070
86265
  _json: Any = None
86071
86266
 
86072
- _path = '/video/v1/videos/{videoRid}/streaming/whep/{streamId}'
86267
+ _path = '/video/v1/videos/{videoRid}/streaming/whep'
86073
86268
  _path = _path.format(**_path_params)
86074
86269
 
86075
86270
  _response: Response = self._request(
@@ -86080,7 +86275,7 @@ Enforces read permission on the video.
86080
86275
  json=_json)
86081
86276
 
86082
86277
  _decoder = ConjureDecoder()
86083
- return _decoder.decode(_response.json(), scout_video_api_GenerateWhepStreamResponse, self._return_none_for_unknown_union_types)
86278
+ return None if _response.status_code == 204 else _decoder.decode(_response.json(), OptionalTypeWrapper[scout_video_api_GenerateWhepStreamResponse], self._return_none_for_unknown_union_types)
86084
86279
 
86085
86280
 
86086
86281
  scout_video_VideoService.__name__ = "VideoService"
@@ -1,5 +1,10 @@
1
1
  # coding=utf-8
2
2
  from .._impl import (
3
+ event_AggregateEventsRequest as AggregateEventsRequest,
4
+ event_AggregateEventsResponse as AggregateEventsResponse,
5
+ event_AggregateType as AggregateType,
6
+ event_AggregateValue as AggregateValue,
7
+ event_AggregateValueVisitor as AggregateValueVisitor,
3
8
  event_ApiEventOrigin as ApiEventOrigin,
4
9
  event_ArchiveEvent as ArchiveEvent,
5
10
  event_AssetsFilter as AssetsFilter,
@@ -45,6 +50,11 @@ from .._impl import (
45
50
  )
46
51
 
47
52
  __all__ = [
53
+ 'AggregateEventsRequest',
54
+ 'AggregateEventsResponse',
55
+ 'AggregateType',
56
+ 'AggregateValue',
57
+ 'AggregateValueVisitor',
48
58
  'ApiEventOrigin',
49
59
  'ArchiveEvent',
50
60
  'AssetsFilter',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nominal-api
3
- Version: 0.965.0
3
+ Version: 0.966.0
4
4
  Requires-Python: >=3.8
5
5
  Requires-Dist: requests
6
6
  Requires-Dist: conjure-python-client<4,>=2.8.0
@@ -1,5 +1,5 @@
1
- nominal_api/__init__.py,sha256=L9Uu6SE4RqjQ2zC6G-rnvkz3AqADVKQfuf9topO3-Vw,2109
2
- nominal_api/_impl.py,sha256=McnuO15d0wWI-NAiq0zPNXR-8yKxZgDVvTfKupmUSHs,3841873
1
+ nominal_api/__init__.py,sha256=PhQ7l9tYy8uI14LZYpFfXeXTaZPqMUPQJiU6c3Fzxsg,2109
2
+ nominal_api/_impl.py,sha256=ThUPvJocnSu8U9NONnXkpHOUcZz7l0YMZ0rmYxwhtN8,3848748
3
3
  nominal_api/py.typed,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
4
4
  nominal_api/api/__init__.py,sha256=OHAEgaRoUX60742H_U3q_pBoPGpLspsL5XERHQ-rjMs,2299
5
5
  nominal_api/api_ids/__init__.py,sha256=sxqN5dMk6bOx0SKOd0ANG3_kmx1VtdSVotzEGn_q6sE,114
@@ -14,7 +14,7 @@ nominal_api/datasource_api/__init__.py,sha256=75g1qHgKGFMR87uXPvyowgKuLua62v3NPT
14
14
  nominal_api/datasource_logset/__init__.py,sha256=SGt5PmLgYpLfhcoESk69aVufuZugg8dp6XBHOZ480IA,130
15
15
  nominal_api/datasource_logset_api/__init__.py,sha256=QydoWxNXCVgIV8HWnZAKA77N5G6mTSqSzGkj36tPe4U,1376
16
16
  nominal_api/datasource_pagination_api/__init__.py,sha256=WeENj6yqi2XfInU8YgjFwqwiR8L0jDHCBZfucJ0ahyY,283
17
- nominal_api/event/__init__.py,sha256=lWZZzsEOmtmPNNU9_kYMj1uTgoyc2QL8slsD8UeHWNM,3403
17
+ nominal_api/event/__init__.py,sha256=AwX_cxCrb9CqM7qYHkE2t7qCwYU5dObuo6whHiNHJMw,3802
18
18
  nominal_api/ingest_api/__init__.py,sha256=OZ1xKwsMx_IeFKrVnwYky9sWMymeYrEAHW62cVE_tqo,11156
19
19
  nominal_api/ingest_manifest/__init__.py,sha256=HvXQUiDc886ITCkoR7OEXopRIFE9Z7dFNE8_FViNP0s,483
20
20
  nominal_api/ingest_workflow_api/__init__.py,sha256=UdkTnAnXSs1Q17GfWOK6iJbqu7NecX0VP2Jkwj1Pj_k,3159
@@ -79,7 +79,7 @@ nominal_api/timeseries_seriescache/__init__.py,sha256=hL5hN8jKLEGE_fDiZzdASmWIrR
79
79
  nominal_api/timeseries_seriescache_api/__init__.py,sha256=i21vITWBn-6ruVuFZg491TDpx6WcIhJBoF3oNw3w338,1186
80
80
  nominal_api/upload_api/__init__.py,sha256=7-XXuZUqKPV4AMWvxNpZPZ5vBun4x-AomXj3Vol_BN4,123
81
81
  nominal_api/usercreation_api/__init__.py,sha256=Q6M70SlKFVfIxZqRohD4XYmBz5t2DP1DB0a0Q6glqGA,171
82
- nominal_api-0.965.0.dist-info/METADATA,sha256=9FcqmpMxvaEuxsIJH9g_HqXCrCYKiT-J6UjoyU8e4yg,199
83
- nominal_api-0.965.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
84
- nominal_api-0.965.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
85
- nominal_api-0.965.0.dist-info/RECORD,,
82
+ nominal_api-0.966.0.dist-info/METADATA,sha256=9TveJMU3t8-fuuv91EwpdOAMLyvdcklFBX9fjgAr6aY,199
83
+ nominal_api-0.966.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
84
+ nominal_api-0.966.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
85
+ nominal_api-0.966.0.dist-info/RECORD,,