14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- # IBM OpenAPI SDK Code Generator Version: 3.34.1-ad041667-20210617-195430
17
+ # IBM OpenAPI SDK Code Generator Version: 3.40.0-910cf8c2-20211006-154754
18
18
19
19
"""
20
20
The Findings API is used to find and display occurrences of security issues in your IBM
21
21
Cloud account by using the artifact metadata specification. Findings are summarized in
22
22
cards in the Security and Compliance Center that allow you to see the security status of
23
23
your account at a glance and start an investigation into any potential issues.
24
+
25
+ API Version: 1.0.0
24
26
"""
25
27
26
28
from datetime import datetime
@@ -78,7 +80,7 @@ def __init__(self,
78
80
:param str account_id: Account ID.
79
81
80
82
:param Authenticator authenticator: The authenticator specifies the authentication mechanism.
81
- Get up to date information from https://github.com/IBM/python-sdk-core/blob/master /README.md
83
+ Get up to date information from https://github.com/IBM/python-sdk-core/blob/main /README.md
82
84
about initializing the authenticator of your choice.
83
85
"""
84
86
if account_id is None :
@@ -148,7 +150,7 @@ def post_graph(self,
148
150
headers = headers ,
149
151
data = data )
150
152
151
- response = self .send (request )
153
+ response = self .send (request , ** kwargs )
152
154
return response
153
155
154
156
#########################
@@ -215,7 +217,7 @@ def list_providers(self,
215
217
headers = headers ,
216
218
params = params )
217
219
218
- response = self .send (request )
220
+ response = self .send (request , ** kwargs )
219
221
return response
220
222
221
223
@@ -228,7 +230,6 @@ def create_note(self,
228
230
reported_by : 'Reporter' ,
229
231
* ,
230
232
related_url : List ['ApiNoteRelatedUrl' ] = None ,
231
- expiration_time : datetime = None ,
232
233
shared : bool = None ,
233
234
finding : 'FindingType' = None ,
234
235
kpi : 'KpiType' = None ,
@@ -261,8 +262,6 @@ def create_note(self,
261
262
:param str id: The ID of the note.
262
263
:param Reporter reported_by: The entity reporting a note.
263
264
:param List[ApiNoteRelatedUrl] related_url: (optional)
264
- :param datetime expiration_time: (optional) Time of expiration for this
265
- note, null if note does not expire.
266
265
:param bool shared: (optional) True if this note can be shared by multiple
267
266
accounts.
268
267
:param FindingType finding: (optional) FindingType provides details about a
@@ -294,8 +293,6 @@ def create_note(self,
294
293
reported_by = convert_model (reported_by )
295
294
if related_url is not None :
296
295
related_url = [convert_model (x ) for x in related_url ]
297
- if expiration_time is not None :
298
- expiration_time = datetime_to_string (expiration_time )
299
296
if finding is not None :
300
297
finding = convert_model (finding )
301
298
if kpi is not None :
@@ -319,7 +316,6 @@ def create_note(self,
319
316
'id' : id ,
320
317
'reported_by' : reported_by ,
321
318
'related_url' : related_url ,
322
- 'expiration_time' : expiration_time ,
323
319
'shared' : shared ,
324
320
'finding' : finding ,
325
321
'kpi' : kpi ,
@@ -343,7 +339,7 @@ def create_note(self,
343
339
headers = headers ,
344
340
data = data )
345
341
346
- response = self .send (request )
342
+ response = self .send (request , ** kwargs )
347
343
return response
348
344
349
345
@@ -400,7 +396,7 @@ def list_notes(self,
400
396
headers = headers ,
401
397
params = params )
402
398
403
- response = self .send (request )
399
+ response = self .send (request , ** kwargs )
404
400
return response
405
401
406
402
@@ -452,7 +448,7 @@ def get_note(self,
452
448
url = url ,
453
449
headers = headers )
454
450
455
- response = self .send (request )
451
+ response = self .send (request , ** kwargs )
456
452
return response
457
453
458
454
@@ -466,7 +462,6 @@ def update_note(self,
466
462
reported_by : 'Reporter' ,
467
463
* ,
468
464
related_url : List ['ApiNoteRelatedUrl' ] = None ,
469
- expiration_time : datetime = None ,
470
465
shared : bool = None ,
471
466
finding : 'FindingType' = None ,
472
467
kpi : 'KpiType' = None ,
@@ -498,8 +493,6 @@ def update_note(self,
498
493
:param str id: The ID of the note.
499
494
:param Reporter reported_by: The entity reporting a note.
500
495
:param List[ApiNoteRelatedUrl] related_url: (optional)
501
- :param datetime expiration_time: (optional) Time of expiration for this
502
- note, null if note does not expire.
503
496
:param bool shared: (optional) True if this note can be shared by multiple
504
497
accounts.
505
498
:param FindingType finding: (optional) FindingType provides details about a
@@ -533,8 +526,6 @@ def update_note(self,
533
526
reported_by = convert_model (reported_by )
534
527
if related_url is not None :
535
528
related_url = [convert_model (x ) for x in related_url ]
536
- if expiration_time is not None :
537
- expiration_time = datetime_to_string (expiration_time )
538
529
if finding is not None :
539
530
finding = convert_model (finding )
540
531
if kpi is not None :
@@ -558,7 +549,6 @@ def update_note(self,
558
549
'id' : id ,
559
550
'reported_by' : reported_by ,
560
551
'related_url' : related_url ,
561
- 'expiration_time' : expiration_time ,
562
552
'shared' : shared ,
563
553
'finding' : finding ,
564
554
'kpi' : kpi ,
@@ -582,7 +572,7 @@ def update_note(self,
582
572
headers = headers ,
583
573
data = data )
584
574
585
- response = self .send (request )
575
+ response = self .send (request , ** kwargs )
586
576
return response
587
577
588
578
@@ -633,7 +623,7 @@ def delete_note(self,
633
623
url = url ,
634
624
headers = headers )
635
625
636
- response = self .send (request )
626
+ response = self .send (request , ** kwargs )
637
627
return response
638
628
639
629
@@ -684,7 +674,7 @@ def get_occurrence_note(self,
684
674
url = url ,
685
675
headers = headers )
686
676
687
- response = self .send (request )
677
+ response = self .send (request , ** kwargs )
688
678
return response
689
679
690
680
#########################
@@ -802,7 +792,7 @@ def create_occurrence(self,
802
792
headers = headers ,
803
793
data = data )
804
794
805
- response = self .send (request )
795
+ response = self .send (request , ** kwargs )
806
796
return response
807
797
808
798
@@ -860,7 +850,7 @@ def list_occurrences(self,
860
850
headers = headers ,
861
851
params = params )
862
852
863
- response = self .send (request )
853
+ response = self .send (request , ** kwargs )
864
854
return response
865
855
866
856
@@ -922,7 +912,7 @@ def list_note_occurrences(self,
922
912
headers = headers ,
923
913
params = params )
924
914
925
- response = self .send (request )
915
+ response = self .send (request , ** kwargs )
926
916
return response
927
917
928
918
@@ -973,7 +963,7 @@ def get_occurrence(self,
973
963
url = url ,
974
964
headers = headers )
975
965
976
- response = self .send (request )
966
+ response = self .send (request , ** kwargs )
977
967
return response
978
968
979
969
@@ -1086,7 +1076,7 @@ def update_occurrence(self,
1086
1076
headers = headers ,
1087
1077
data = data )
1088
1078
1089
- response = self .send (request )
1079
+ response = self .send (request , ** kwargs )
1090
1080
return response
1091
1081
1092
1082
@@ -1137,7 +1127,7 @@ def delete_occurrence(self,
1137
1127
url = url ,
1138
1128
headers = headers )
1139
1129
1140
- response = self .send (request )
1130
+ response = self .send (request , ** kwargs )
1141
1131
return response
1142
1132
1143
1133
@@ -1858,27 +1848,34 @@ class KpiType():
1858
1848
"""
1859
1849
KpiType provides details about a KPI note.
1860
1850
1851
+ :attr str severity: (optional)
1861
1852
:attr str aggregation_type: The aggregation type of the KPI values. - SUM: A
1862
1853
single-value metrics aggregation type that sums up numeric values
1863
1854
that are extracted from KPI occurrences.
1864
1855
"""
1865
1856
1866
1857
def __init__ (self ,
1867
- aggregation_type : str ) -> None :
1858
+ aggregation_type : str ,
1859
+ * ,
1860
+ severity : str = None ) -> None :
1868
1861
"""
1869
1862
Initialize a KpiType object.
1870
1863
1871
1864
:param str aggregation_type: The aggregation type of the KPI values. -
1872
1865
SUM: A single-value metrics aggregation type that sums up numeric
1873
1866
values
1874
1867
that are extracted from KPI occurrences.
1868
+ :param str severity: (optional)
1875
1869
"""
1870
+ self .severity = severity
1876
1871
self .aggregation_type = aggregation_type
1877
1872
1878
1873
@classmethod
1879
1874
def from_dict (cls , _dict : Dict ) -> 'KpiType' :
1880
1875
"""Initialize a KpiType object from a json dictionary."""
1881
1876
args = {}
1877
+ if 'Severity' in _dict :
1878
+ args ['severity' ] = _dict .get ('Severity' )
1882
1879
if 'aggregation_type' in _dict :
1883
1880
args ['aggregation_type' ] = _dict .get ('aggregation_type' )
1884
1881
else :
@@ -1893,6 +1890,8 @@ def _from_dict(cls, _dict):
1893
1890
def to_dict (self ) -> Dict :
1894
1891
"""Return a json dictionary representing this model."""
1895
1892
_dict = {}
1893
+ if hasattr (self , 'severity' ) and self .severity is not None :
1894
+ _dict ['Severity' ] = self .severity
1896
1895
if hasattr (self , 'aggregation_type' ) and self .aggregation_type is not None :
1897
1896
_dict ['aggregation_type' ] = self .aggregation_type
1898
1897
return _dict
@@ -1915,6 +1914,16 @@ def __ne__(self, other: 'KpiType') -> bool:
1915
1914
"""Return `true` when self and other are not equal, false otherwise."""
1916
1915
return not self == other
1917
1916
1917
+ class SeverityEnum (str , Enum ):
1918
+ """
1919
+ severity.
1920
+ """
1921
+ LOW = 'LOW'
1922
+ MEDIUM = 'MEDIUM'
1923
+ HIGH = 'HIGH'
1924
+ CRITICAL = 'CRITICAL'
1925
+
1926
+
1918
1927
class AggregationTypeEnum (str , Enum ):
1919
1928
"""
1920
1929
The aggregation type of the KPI values. - SUM: A single-value metrics
@@ -2625,8 +2634,6 @@ class ApiNote():
2625
2634
account.
2626
2635
- SECTION: The note represents a section in a dashboard.
2627
2636
:attr List[ApiNoteRelatedUrl] related_url: (optional)
2628
- :attr datetime expiration_time: (optional) Time of expiration for this note,
2629
- null if note does not expire.
2630
2637
:attr datetime create_time: (optional) Output only. The time this note was
2631
2638
created. This field can be used as a filter in list requests.
2632
2639
:attr datetime update_time: (optional) Output only. The time this note was last
@@ -2651,7 +2658,6 @@ def __init__(self,
2651
2658
reported_by : 'Reporter' ,
2652
2659
* ,
2653
2660
related_url : List ['ApiNoteRelatedUrl' ] = None ,
2654
- expiration_time : datetime = None ,
2655
2661
create_time : datetime = None ,
2656
2662
update_time : datetime = None ,
2657
2663
shared : bool = None ,
@@ -2676,8 +2682,6 @@ def __init__(self,
2676
2682
:param str id: The ID of the note.
2677
2683
:param Reporter reported_by: The entity reporting a note.
2678
2684
:param List[ApiNoteRelatedUrl] related_url: (optional)
2679
- :param datetime expiration_time: (optional) Time of expiration for this
2680
- note, null if note does not expire.
2681
2685
:param bool shared: (optional) True if this note can be shared by multiple
2682
2686
accounts.
2683
2687
:param FindingType finding: (optional) FindingType provides details about a
@@ -2692,7 +2696,6 @@ def __init__(self,
2692
2696
self .long_description = long_description
2693
2697
self .kind = kind
2694
2698
self .related_url = related_url
2695
- self .expiration_time = expiration_time
2696
2699
self .create_time = create_time
2697
2700
self .update_time = update_time
2698
2701
self .id = id
@@ -2721,8 +2724,6 @@ def from_dict(cls, _dict: Dict) -> 'ApiNote':
2721
2724
raise ValueError ('Required property \' kind\' not present in ApiNote JSON' )
2722
2725
if 'related_url' in _dict :
2723
2726
args ['related_url' ] = [ApiNoteRelatedUrl .from_dict (x ) for x in _dict .get ('related_url' )]
2724
- if 'expiration_time' in _dict :
2725
- args ['expiration_time' ] = string_to_datetime (_dict .get ('expiration_time' ))
2726
2727
if 'create_time' in _dict :
2727
2728
args ['create_time' ] = string_to_datetime (_dict .get ('create_time' ))
2728
2729
if 'update_time' in _dict :
@@ -2763,8 +2764,6 @@ def to_dict(self) -> Dict:
2763
2764
_dict ['kind' ] = self .kind
2764
2765
if hasattr (self , 'related_url' ) and self .related_url is not None :
2765
2766
_dict ['related_url' ] = [x .to_dict () for x in self .related_url ]
2766
- if hasattr (self , 'expiration_time' ) and self .expiration_time is not None :
2767
- _dict ['expiration_time' ] = datetime_to_string (self .expiration_time )
2768
2767
if hasattr (self , 'create_time' ) and getattr (self , 'create_time' ) is not None :
2769
2768
_dict ['create_time' ] = datetime_to_string (getattr (self , 'create_time' ))
2770
2769
if hasattr (self , 'update_time' ) and getattr (self , 'update_time' ) is not None :
0 commit comments