nominal-api 0.827.1__py3-none-any.whl → 0.829.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
@@ -80,5 +80,5 @@ __all__ = [
80
80
 
81
81
  __conjure_generator_version__ = "4.17.0"
82
82
 
83
- __version__ = "0.827.1"
83
+ __version__ = "0.829.0"
84
84
 
nominal_api/_impl.py CHANGED
@@ -22710,6 +22710,38 @@ Throws if the asset already has data scopes with data scope names matching those
22710
22710
  _decoder = ConjureDecoder()
22711
22711
  return _decoder.decode(_response.json(), Dict[scout_rids_api_AssetRid, scout_asset_api_Asset], self._return_none_for_unknown_union_types)
22712
22712
 
22713
+ def get_assets_by_data_source(self, auth_header: str, data_source_rid: str) -> List["scout_asset_api_Asset"]:
22714
+ """Returns all assets with given data source as a data scope.
22715
+ """
22716
+ _conjure_encoder = ConjureEncoder()
22717
+
22718
+ _headers: Dict[str, Any] = {
22719
+ 'Accept': 'application/json',
22720
+ 'Authorization': auth_header,
22721
+ }
22722
+
22723
+ _params: Dict[str, Any] = {
22724
+ }
22725
+
22726
+ _path_params: Dict[str, str] = {
22727
+ 'dataSourceRid': quote(str(_conjure_encoder.default(data_source_rid)), safe=''),
22728
+ }
22729
+
22730
+ _json: Any = None
22731
+
22732
+ _path = '/scout/v1/asset/by-data-source/{dataSourceRid}'
22733
+ _path = _path.format(**_path_params)
22734
+
22735
+ _response: Response = self._request(
22736
+ 'POST',
22737
+ self._uri + _path,
22738
+ params=_params,
22739
+ headers=_headers,
22740
+ json=_json)
22741
+
22742
+ _decoder = ConjureDecoder()
22743
+ return _decoder.decode(_response.json(), List[scout_asset_api_Asset], self._return_none_for_unknown_union_types)
22744
+
22713
22745
  def archive(self, auth_header: str, rid: str, include_linked_workbooks: Optional[bool] = None) -> None:
22714
22746
  _conjure_encoder = ConjureEncoder()
22715
22747
 
@@ -49415,16 +49447,18 @@ class scout_compute_api_RangeAggregation(ConjureBeanType):
49415
49447
  'average': ConjureFieldDefinition('average', float),
49416
49448
  'min': ConjureFieldDefinition('min', float),
49417
49449
  'max': ConjureFieldDefinition('max', float),
49418
- 'standard_deviation': ConjureFieldDefinition('standardDeviation', float)
49450
+ 'standard_deviation': ConjureFieldDefinition('standardDeviation', float),
49451
+ 'count': ConjureFieldDefinition('count', float)
49419
49452
  }
49420
49453
 
49421
- __slots__: List[str] = ['_average', '_min', '_max', '_standard_deviation']
49454
+ __slots__: List[str] = ['_average', '_min', '_max', '_standard_deviation', '_count']
49422
49455
 
49423
- def __init__(self, average: float, max: float, min: float, standard_deviation: float) -> None:
49456
+ def __init__(self, average: float, count: float, max: float, min: float, standard_deviation: float) -> None:
49424
49457
  self._average = average
49425
49458
  self._min = min
49426
49459
  self._max = max
49427
49460
  self._standard_deviation = standard_deviation
49461
+ self._count = count
49428
49462
 
49429
49463
  @builtins.property
49430
49464
  def average(self) -> float:
@@ -49442,6 +49476,10 @@ class scout_compute_api_RangeAggregation(ConjureBeanType):
49442
49476
  def standard_deviation(self) -> float:
49443
49477
  return self._standard_deviation
49444
49478
 
49479
+ @builtins.property
49480
+ def count(self) -> float:
49481
+ return self._count
49482
+
49445
49483
 
49446
49484
  scout_compute_api_RangeAggregation.__name__ = "RangeAggregation"
49447
49485
  scout_compute_api_RangeAggregation.__qualname__ = "RangeAggregation"
@@ -49453,6 +49491,7 @@ class scout_compute_api_RangeAggregationOperation(ConjureUnionType):
49453
49491
  _min: Optional["scout_compute_api_Minimum"] = None
49454
49492
  _max: Optional["scout_compute_api_Maximum"] = None
49455
49493
  _standard_deviation: Optional["scout_compute_api_StandardDeviation"] = None
49494
+ _count: Optional["scout_compute_api_Count"] = None
49456
49495
  _all: Optional["api_Empty"] = None
49457
49496
 
49458
49497
  @builtins.classmethod
@@ -49462,6 +49501,7 @@ class scout_compute_api_RangeAggregationOperation(ConjureUnionType):
49462
49501
  'min': ConjureFieldDefinition('min', scout_compute_api_Minimum),
49463
49502
  'max': ConjureFieldDefinition('max', scout_compute_api_Maximum),
49464
49503
  'standard_deviation': ConjureFieldDefinition('standardDeviation', scout_compute_api_StandardDeviation),
49504
+ 'count': ConjureFieldDefinition('count', scout_compute_api_Count),
49465
49505
  'all': ConjureFieldDefinition('all', api_Empty)
49466
49506
  }
49467
49507
 
@@ -49471,11 +49511,12 @@ class scout_compute_api_RangeAggregationOperation(ConjureUnionType):
49471
49511
  min: Optional["scout_compute_api_Minimum"] = None,
49472
49512
  max: Optional["scout_compute_api_Maximum"] = None,
49473
49513
  standard_deviation: Optional["scout_compute_api_StandardDeviation"] = None,
49514
+ count: Optional["scout_compute_api_Count"] = None,
49474
49515
  all: Optional["api_Empty"] = None,
49475
49516
  type_of_union: Optional[str] = None
49476
49517
  ) -> None:
49477
49518
  if type_of_union is None:
49478
- if (average is not None) + (min is not None) + (max is not None) + (standard_deviation is not None) + (all is not None) != 1:
49519
+ if (average is not None) + (min is not None) + (max is not None) + (standard_deviation is not None) + (count is not None) + (all is not None) != 1:
49479
49520
  raise ValueError('a union must contain a single member')
49480
49521
 
49481
49522
  if average is not None:
@@ -49490,6 +49531,9 @@ class scout_compute_api_RangeAggregationOperation(ConjureUnionType):
49490
49531
  if standard_deviation is not None:
49491
49532
  self._standard_deviation = standard_deviation
49492
49533
  self._type = 'standardDeviation'
49534
+ if count is not None:
49535
+ self._count = count
49536
+ self._type = 'count'
49493
49537
  if all is not None:
49494
49538
  self._all = all
49495
49539
  self._type = 'all'
@@ -49514,6 +49558,11 @@ class scout_compute_api_RangeAggregationOperation(ConjureUnionType):
49514
49558
  raise ValueError('a union value must not be None')
49515
49559
  self._standard_deviation = standard_deviation
49516
49560
  self._type = 'standardDeviation'
49561
+ elif type_of_union == 'count':
49562
+ if count is None:
49563
+ raise ValueError('a union value must not be None')
49564
+ self._count = count
49565
+ self._type = 'count'
49517
49566
  elif type_of_union == 'all':
49518
49567
  if all is None:
49519
49568
  raise ValueError('a union value must not be None')
@@ -49536,6 +49585,10 @@ class scout_compute_api_RangeAggregationOperation(ConjureUnionType):
49536
49585
  def standard_deviation(self) -> Optional["scout_compute_api_StandardDeviation"]:
49537
49586
  return self._standard_deviation
49538
49587
 
49588
+ @builtins.property
49589
+ def count(self) -> Optional["scout_compute_api_Count"]:
49590
+ return self._count
49591
+
49539
49592
  @builtins.property
49540
49593
  def all(self) -> Optional["api_Empty"]:
49541
49594
  return self._all
@@ -49551,6 +49604,8 @@ class scout_compute_api_RangeAggregationOperation(ConjureUnionType):
49551
49604
  return visitor._max(self.max)
49552
49605
  if self._type == 'standardDeviation' and self.standard_deviation is not None:
49553
49606
  return visitor._standard_deviation(self.standard_deviation)
49607
+ if self._type == 'count' and self.count is not None:
49608
+ return visitor._count(self.count)
49554
49609
  if self._type == 'all' and self.all is not None:
49555
49610
  return visitor._all(self.all)
49556
49611
 
@@ -49578,6 +49633,10 @@ class scout_compute_api_RangeAggregationOperationVisitor:
49578
49633
  def _standard_deviation(self, standard_deviation: "scout_compute_api_StandardDeviation") -> Any:
49579
49634
  pass
49580
49635
 
49636
+ @abstractmethod
49637
+ def _count(self, count: "scout_compute_api_Count") -> Any:
49638
+ pass
49639
+
49581
49640
  @abstractmethod
49582
49641
  def _all(self, all: "api_Empty") -> Any:
49583
49642
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nominal-api
3
- Version: 0.827.1
3
+ Version: 0.829.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=CU_fwISGluQx18Tls9p0FDGL4rVw1ysgwL5v8kMUTpo,2064
2
- nominal_api/_impl.py,sha256=J8OsB4SaJGK-XQWTmat-S1vB7BcOc86yIFu406qdm-Q,3614172
1
+ nominal_api/__init__.py,sha256=1BxX15r1AW6Y8Y7HvI9U2LBkwBE7BNNlkgcIlGxXm2k,2064
2
+ nominal_api/_impl.py,sha256=cyPjt0egZupk9Oq1JNmPeL7wMCk5pVuLbu3475tqyUE,3616248
3
3
  nominal_api/py.typed,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
4
4
  nominal_api/api/__init__.py,sha256=ZiGjcYwIBCrZR5pPqyqX2ggRJmVcSlOCazMtF2xCZzw,2171
5
5
  nominal_api/api_ids/__init__.py,sha256=sxqN5dMk6bOx0SKOd0ANG3_kmx1VtdSVotzEGn_q6sE,114
@@ -77,7 +77,7 @@ nominal_api/timeseries_logicalseries_api/__init__.py,sha256=BwdqHLq_98LOsRV14JA3
77
77
  nominal_api/timeseries_seriescache/__init__.py,sha256=hL5hN8jKLEGE_fDiZzdASmWIrRjU6tncpmDeuc_47P4,150
78
78
  nominal_api/timeseries_seriescache_api/__init__.py,sha256=USBxFmNnVFdnhTPLvWi3UgsvBZ4Iz4ycNgBTi10F-zI,1603
79
79
  nominal_api/upload_api/__init__.py,sha256=7-XXuZUqKPV4AMWvxNpZPZ5vBun4x-AomXj3Vol_BN4,123
80
- nominal_api-0.827.1.dist-info/METADATA,sha256=uTIEfhKSWe41JsXTJ3CbILmRFKJ7QWlOb-U1SXV7m54,199
81
- nominal_api-0.827.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
- nominal_api-0.827.1.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
83
- nominal_api-0.827.1.dist-info/RECORD,,
80
+ nominal_api-0.829.0.dist-info/METADATA,sha256=E3_iQ96eMxFxeKCq-8mEHKn8cZhgD0DC4zBiC804dHw,199
81
+ nominal_api-0.829.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
+ nominal_api-0.829.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
83
+ nominal_api-0.829.0.dist-info/RECORD,,