pyegeria 0.7.44__py3-none-any.whl → 0.7.45.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.
@@ -7,17 +7,16 @@ module.
7
7
  """
8
8
 
9
9
  import asyncio
10
- import json
11
10
 
12
11
  from httpx import Response
13
12
 
14
13
  from pyegeria import body_slimmer
14
+
15
15
  # import json
16
16
  from pyegeria._client import Client, max_paging_size
17
17
  from pyegeria._globals import enable_ssl_check, default_time_out
18
18
 
19
19
 
20
-
21
20
  def query_seperator(current_string):
22
21
  if current_string == "":
23
22
  return "?"
@@ -107,20 +106,42 @@ class ClassificationManager(Client):
107
106
 
108
107
  """
109
108
 
110
- def __init__(self, server_name: str, platform_url: str, token: str = None, user_id: str = None,
111
- user_pwd: str = None, verify_flag: bool = enable_ssl_check, sync_mode: bool = True, ):
109
+ def __init__(
110
+ self,
111
+ server_name: str,
112
+ platform_url: str,
113
+ token: str = None,
114
+ user_id: str = None,
115
+ user_pwd: str = None,
116
+ verify_flag: bool = enable_ssl_check,
117
+ sync_mode: bool = True,
118
+ ):
112
119
  self.admin_command_root: str
113
- Client.__init__(self, server_name, platform_url, user_id=user_id, user_pwd=user_pwd, token=token,
114
- async_mode=sync_mode, )
120
+ Client.__init__(
121
+ self,
122
+ server_name,
123
+ platform_url,
124
+ user_id=user_id,
125
+ user_pwd=user_pwd,
126
+ token=token,
127
+ async_mode=sync_mode,
128
+ )
115
129
 
116
130
  #
117
131
  # Get elements
118
132
  #
119
133
 
120
- async def _async_get_elements(self, open_metadata_type_name: str = None, effective_time: str = None,
121
- for_lineage: bool = None, for_duplicate_processing: bool = None, start_from: int = 0,
122
- page_size: int = max_paging_size, server_name: str = None,
123
- time_out: int = default_time_out) -> list | str:
134
+ async def _async_get_elements(
135
+ self,
136
+ open_metadata_type_name: str = None,
137
+ effective_time: str = None,
138
+ for_lineage: bool = None,
139
+ for_duplicate_processing: bool = None,
140
+ start_from: int = 0,
141
+ page_size: int = max_paging_size,
142
+ server_name: str = None,
143
+ time_out: int = default_time_out,
144
+ ) -> list | str:
124
145
  """
125
146
  Retrieve elements of the requested type name. If no type name is specified, then any type of element may
126
147
  be returned.
@@ -164,23 +185,41 @@ class ClassificationManager(Client):
164
185
  server_name = self.server_name
165
186
 
166
187
  possible_query_params = query_string(
167
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
168
- ("forDuplicateProcessing", for_duplicate_processing)])
188
+ [
189
+ ("startFrom", start_from),
190
+ ("pageSize", page_size),
191
+ ("forLineage", for_lineage),
192
+ ("forDuplicateProcessing", for_duplicate_processing),
193
+ ]
194
+ )
169
195
 
170
- body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
171
- "effectiveTime": effective_time, }
196
+ body = {
197
+ "class": "FindProperties",
198
+ "openMetadataTypeName": open_metadata_type_name,
199
+ "effectiveTime": effective_time,
200
+ }
172
201
 
173
202
  url = f"{base_path(self, server_name)}/elements/by-type{possible_query_params}"
174
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
175
- elements = response.json().get('elements', 'No elements found')
203
+ response: Response = await self._async_make_request(
204
+ "POST", url, body_slimmer(body), time_out=time_out
205
+ )
206
+ elements = response.json().get("elements", "No elements found")
176
207
  if type(elements) is list:
177
208
  if len(elements) == 0:
178
209
  return "No elements found"
179
210
  return elements
180
211
 
181
- def get_elements(self, open_metadata_type_name: str = None, effective_time: str = None, for_lineage: bool = None,
182
- for_duplicate_processing: bool = None, start_from: int = 0, page_size: int = max_paging_size,
183
- server_name: str = None, time_out: int = default_time_out) -> list | str:
212
+ def get_elements(
213
+ self,
214
+ open_metadata_type_name: str = None,
215
+ effective_time: str = None,
216
+ for_lineage: bool = None,
217
+ for_duplicate_processing: bool = None,
218
+ start_from: int = 0,
219
+ page_size: int = max_paging_size,
220
+ server_name: str = None,
221
+ time_out: int = default_time_out,
222
+ ) -> list | str:
184
223
  """
185
224
  Retrieve elements of the requested type name. If no type name is specified, then any type of element may
186
225
  be returned.
@@ -223,16 +262,32 @@ class ClassificationManager(Client):
223
262
 
224
263
  loop = asyncio.get_event_loop()
225
264
  response = loop.run_until_complete(
226
- self._async_get_elements(open_metadata_type_name, effective_time, for_lineage, for_duplicate_processing,
227
- start_from, page_size, server_name, time_out))
265
+ self._async_get_elements(
266
+ open_metadata_type_name,
267
+ effective_time,
268
+ for_lineage,
269
+ for_duplicate_processing,
270
+ start_from,
271
+ page_size,
272
+ server_name,
273
+ time_out,
274
+ )
275
+ )
228
276
  return response
229
277
 
230
- async def _async_get_elements_by_property_value(self, property_value: str, property_names: [str],
231
- open_metadata_type_name: str = None, effective_time: str = None,
232
- for_lineage: bool = None, for_duplicate_processing: bool = None,
233
- start_from: int = 0, page_size: int = max_paging_size,
234
- server_name: str = None,
235
- time_out: int = default_time_out) -> list | str:
278
+ async def _async_get_elements_by_property_value(
279
+ self,
280
+ property_value: str,
281
+ property_names: [str],
282
+ open_metadata_type_name: str = None,
283
+ effective_time: str = None,
284
+ for_lineage: bool = None,
285
+ for_duplicate_processing: bool = None,
286
+ start_from: int = 0,
287
+ page_size: int = max_paging_size,
288
+ server_name: str = None,
289
+ time_out: int = default_time_out,
290
+ ) -> list | str:
236
291
  """
237
292
  Retrieve elements by a value found in one of the properties specified. The value must match exactly.
238
293
  An open metadata type name may be supplied to restrict the results. Async version.
@@ -280,27 +335,47 @@ class ClassificationManager(Client):
280
335
  server_name = self.server_name
281
336
 
282
337
  possible_query_params = query_string(
283
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
284
- ("forDuplicateProcessing", for_duplicate_processing)])
338
+ [
339
+ ("startFrom", start_from),
340
+ ("pageSize", page_size),
341
+ ("forLineage", for_lineage),
342
+ ("forDuplicateProcessing", for_duplicate_processing),
343
+ ]
344
+ )
285
345
 
286
- body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
287
- "propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
346
+ body = {
347
+ "class": "FindPropertyNamesProperties",
348
+ "openMetadataTypeName": open_metadata_type_name,
349
+ "propertyValue": property_value,
350
+ "propertyNames": property_names,
351
+ "effectiveTime": effective_time,
352
+ }
288
353
 
289
354
  url = f"{base_path(self, server_name)}/elements/by-exact-property-value{possible_query_params}"
290
355
 
291
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
356
+ response: Response = await self._async_make_request(
357
+ "POST", url, body_slimmer(body), time_out=time_out
358
+ )
292
359
 
293
- elements = response.json().get('elements', 'No elements found')
360
+ elements = response.json().get("elements", "No elements found")
294
361
  if type(elements) is list:
295
362
  if len(elements) == 0:
296
363
  return "No elements found"
297
364
  return elements
298
365
 
299
- def get_elements_by_property_value(self, property_value: str, property_names: [str],
300
- open_metadata_type_name: str = None, effective_time: str = None,
301
- for_lineage: bool = None, for_duplicate_processing: bool = None,
302
- start_from: int = 0, page_size: int = max_paging_size, server_name: str = None,
303
- time_out: int = default_time_out) -> list | str:
366
+ def get_elements_by_property_value(
367
+ self,
368
+ property_value: str,
369
+ property_names: [str],
370
+ open_metadata_type_name: str = None,
371
+ effective_time: str = None,
372
+ for_lineage: bool = None,
373
+ for_duplicate_processing: bool = None,
374
+ start_from: int = 0,
375
+ page_size: int = max_paging_size,
376
+ server_name: str = None,
377
+ time_out: int = default_time_out,
378
+ ) -> list | str:
304
379
  """
305
380
  Retrieve elements by a value found in one of the properties specified. The value must match exactly.
306
381
  An open metadata type name may be supplied to restrict the results.
@@ -347,17 +422,117 @@ class ClassificationManager(Client):
347
422
 
348
423
  loop = asyncio.get_event_loop()
349
424
  response = loop.run_until_complete(
350
- self._async_get_elements_by_property_value(property_value, property_names, open_metadata_type_name,
351
- effective_time, for_lineage, for_duplicate_processing,
352
- start_from, page_size, server_name, time_out))
425
+ self._async_get_elements_by_property_value(
426
+ property_value,
427
+ property_names,
428
+ open_metadata_type_name,
429
+ effective_time,
430
+ for_lineage,
431
+ for_duplicate_processing,
432
+ start_from,
433
+ page_size,
434
+ server_name,
435
+ time_out,
436
+ )
437
+ )
353
438
  return response
354
439
 
355
- async def _async_find_elements_by_property_value(self, property_value: str, property_names: [str],
356
- open_metadata_type_name: str = None, effective_time: str = None,
357
- for_lineage: bool = None, for_duplicate_processing: bool = None,
358
- start_from: int = 0, page_size: int = max_paging_size,
359
- server_name: str = None,
360
- time_out: int = default_time_out) -> list | str:
440
+ async def _async_get_guid_for_name(
441
+ self, name: str, server_name: str = None, time_out: int = default_time_out
442
+ ) -> list | str:
443
+ """
444
+ Retrieve the guid associated with the supplied element name.
445
+ If more than one element returned, an exception is thrown. Async version.
446
+
447
+ Parameters
448
+ ----------
449
+ name: str
450
+ - element name to be searched.
451
+ server_name: str, default = None
452
+ - name of the server instances for this request.
453
+ time_out: int, default = default_time_out
454
+ - http request timeout for this request
455
+
456
+ Returns
457
+ -------
458
+ str
459
+ Returns the guid of the element.
460
+
461
+ Raises
462
+ ------
463
+ InvalidParameterException
464
+ one of the parameters is null or invalid or
465
+ PropertyServerException
466
+ There is a problem adding the element properties to the metadata repository or
467
+ UserNotAuthorizedException
468
+ the requesting user is not authorized to issue this request.
469
+ """
470
+ if server_name is None:
471
+ server_name = self.server_name
472
+ property_name = ["name", "qualifiedName", "title"]
473
+ elements = await self._async_get_elements_by_property_value(
474
+ name, property_name, None
475
+ )
476
+
477
+ if type(elements) is list:
478
+ if len(elements) == 0:
479
+ return "No elements found"
480
+ elif len(elements) > 1:
481
+ raise Exception("Multiple elements found for supplied name!")
482
+ elif len(elements) == 1:
483
+ return elements[0]["elementHeader"]["guid"]
484
+ return elements
485
+
486
+ def get_guid_for_name(
487
+ self, name: str, server_name: str = None, time_out: int = default_time_out
488
+ ) -> list | str:
489
+ """
490
+ Retrieve the guid associated with the supplied element name.
491
+ If more than one element returned, an exception is thrown.
492
+
493
+ Parameters
494
+ ----------
495
+ name: str
496
+ - element name to be searched.
497
+ server_name: str, default = None
498
+ - name of the server instances for this request.
499
+ time_out: int, default = default_time_out
500
+ - http request timeout for this request
501
+
502
+ Returns
503
+ -------
504
+ str
505
+ Returns the guid of the element.
506
+
507
+ Raises
508
+ ------
509
+ InvalidParameterException
510
+ one of the parameters is null or invalid or
511
+ PropertyServerException
512
+ There is a problem adding the element properties to the metadata repository or
513
+ UserNotAuthorizedException
514
+ the requesting user is not authorized to issue this request.
515
+ """
516
+
517
+ loop = asyncio.get_event_loop()
518
+ response = loop.run_until_complete(
519
+ self._async_get_guid_for_name(name, server_name, time_out)
520
+ )
521
+ return response
522
+
523
+ async def _async_find_elements_by_property_value(
524
+ self,
525
+ property_value: str,
526
+ property_names: [str],
527
+ open_metadata_type_name: str = None,
528
+ effective_time: str = None,
529
+ for_lineage: bool = None,
530
+ for_duplicate_processing: bool = None,
531
+ start_from: int = 0,
532
+ page_size: int = max_paging_size,
533
+ server_name: str = None,
534
+ time_out: int = default_time_out,
535
+ ) -> list | str:
361
536
  """
362
537
  Retrieve elements by a value found in one of the properties specified. The value must be contained in the
363
538
  properties rather than needing to be an exact match. An open metadata type name may be supplied to restrict
@@ -406,25 +581,45 @@ class ClassificationManager(Client):
406
581
  server_name = self.server_name
407
582
 
408
583
  possible_query_params = query_string(
409
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
410
- ("forDuplicateProcessing", for_duplicate_processing)])
584
+ [
585
+ ("startFrom", start_from),
586
+ ("pageSize", page_size),
587
+ ("forLineage", for_lineage),
588
+ ("forDuplicateProcessing", for_duplicate_processing),
589
+ ]
590
+ )
411
591
 
412
- body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
413
- "propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
592
+ body = {
593
+ "class": "FindPropertyNamesProperties",
594
+ "openMetadataTypeName": open_metadata_type_name,
595
+ "propertyValue": property_value,
596
+ "propertyNames": property_names,
597
+ "effectiveTime": effective_time,
598
+ }
414
599
 
415
600
  url = f"{base_path(self, server_name)}/elements/by-property-value-search{possible_query_params}"
416
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
417
- elements = response.json().get('elements', 'No elements found')
601
+ response: Response = await self._async_make_request(
602
+ "POST", url, body_slimmer(body), time_out=time_out
603
+ )
604
+ elements = response.json().get("elements", "No elements found")
418
605
  if type(elements) is list:
419
606
  if len(elements) == 0:
420
607
  return "No elements found"
421
608
  return elements
422
609
 
423
- def find_elements_by_property_value(self, property_value: str, property_names: [str],
424
- open_metadata_type_name: str = None, effective_time: str = None,
425
- for_lineage: bool = None, for_duplicate_processing: bool = None,
426
- start_from: int = 0, page_size: int = max_paging_size, server_name: str = None,
427
- time_out: int = default_time_out) -> list | str:
610
+ def find_elements_by_property_value(
611
+ self,
612
+ property_value: str,
613
+ property_names: [str],
614
+ open_metadata_type_name: str = None,
615
+ effective_time: str = None,
616
+ for_lineage: bool = None,
617
+ for_duplicate_processing: bool = None,
618
+ start_from: int = 0,
619
+ page_size: int = max_paging_size,
620
+ server_name: str = None,
621
+ time_out: int = default_time_out,
622
+ ) -> list | str:
428
623
  """
429
624
  Retrieve elements by a value found in one of the properties specified. The value must be contained in the
430
625
  properties rather than needing to be an exact match. An open metadata type name may be supplied to restrict
@@ -472,19 +667,36 @@ class ClassificationManager(Client):
472
667
 
473
668
  loop = asyncio.get_event_loop()
474
669
  response = loop.run_until_complete(
475
- self._async_find_elements_by_property_value(property_value, property_names, open_metadata_type_name,
476
- effective_time, for_lineage, for_duplicate_processing,
477
- start_from, page_size, server_name, time_out))
670
+ self._async_find_elements_by_property_value(
671
+ property_value,
672
+ property_names,
673
+ open_metadata_type_name,
674
+ effective_time,
675
+ for_lineage,
676
+ for_duplicate_processing,
677
+ start_from,
678
+ page_size,
679
+ server_name,
680
+ time_out,
681
+ )
682
+ )
478
683
  return response
479
684
 
480
685
  #
481
686
  # Elements by classification
482
687
  #
483
- async def _async_get_elements_by_classification(self, classification_name: str, open_metadata_type_name: str = None,
484
- effective_time: str = None, for_lineage: bool = None,
485
- for_duplicate_processing: bool = None, start_from: int = 0,
486
- page_size: int = max_paging_size, server_name: str = None,
487
- time_out: int = default_time_out) -> list | str:
688
+ async def _async_get_elements_by_classification(
689
+ self,
690
+ classification_name: str,
691
+ open_metadata_type_name: str = None,
692
+ effective_time: str = None,
693
+ for_lineage: bool = None,
694
+ for_duplicate_processing: bool = None,
695
+ start_from: int = 0,
696
+ page_size: int = max_paging_size,
697
+ server_name: str = None,
698
+ time_out: int = default_time_out,
699
+ ) -> list | str:
488
700
  """
489
701
  Retrieve elements with the requested classification name. It is also possible to limit the results
490
702
  by specifying a type name for the elements that should be returned. If no type name is specified then
@@ -531,26 +743,45 @@ class ClassificationManager(Client):
531
743
  server_name = self.server_name
532
744
 
533
745
  possible_query_params = query_string(
534
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
535
- ("forDuplicateProcessing", for_duplicate_processing)])
746
+ [
747
+ ("startFrom", start_from),
748
+ ("pageSize", page_size),
749
+ ("forLineage", for_lineage),
750
+ ("forDuplicateProcessing", for_duplicate_processing),
751
+ ]
752
+ )
536
753
 
537
- body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
538
- "effectiveTime": effective_time, }
754
+ body = {
755
+ "class": "FindProperties",
756
+ "openMetadataTypeName": open_metadata_type_name,
757
+ "effectiveTime": effective_time,
758
+ }
539
759
 
540
- url = (f"{base_path(self, server_name)}/elements/by-classification/{classification_name}"
541
- f"{possible_query_params}")
542
- response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
543
- elements = response.json().get('elements', 'No elements found')
760
+ url = (
761
+ f"{base_path(self, server_name)}/elements/by-classification/{classification_name}"
762
+ f"{possible_query_params}"
763
+ )
764
+ response = await self._async_make_request(
765
+ "POST", url, body_slimmer(body), time_out=time_out
766
+ )
767
+ elements = response.json().get("elements", "No elements found")
544
768
  if type(elements) is list:
545
769
  if len(elements) == 0:
546
770
  return "No elements found"
547
771
  return elements
548
772
 
549
- def get_elements_by_classification(self, classification_name: str, open_metadata_type_name: str = None,
550
- effective_time: str = None, for_lineage: bool = None,
551
- for_duplicate_processing: bool = None, start_from: int = 0,
552
- page_size: int = max_paging_size, server_name: str = None,
553
- time_out: int = default_time_out) -> list | str:
773
+ def get_elements_by_classification(
774
+ self,
775
+ classification_name: str,
776
+ open_metadata_type_name: str = None,
777
+ effective_time: str = None,
778
+ for_lineage: bool = None,
779
+ for_duplicate_processing: bool = None,
780
+ start_from: int = 0,
781
+ page_size: int = max_paging_size,
782
+ server_name: str = None,
783
+ time_out: int = default_time_out,
784
+ ) -> list | str:
554
785
  """
555
786
  Retrieve elements with the requested classification name. It is also possible to limit the results
556
787
  by specifying a type name for the elements that should be returned. If no type name is specified then
@@ -596,92 +827,127 @@ class ClassificationManager(Client):
596
827
 
597
828
  loop = asyncio.get_event_loop()
598
829
  response = loop.run_until_complete(
599
- self._async_get_elements_by_classification(classification_name, open_metadata_type_name, effective_time,
600
- for_lineage, for_duplicate_processing, start_from, page_size,
601
- server_name, time_out))
830
+ self._async_get_elements_by_classification(
831
+ classification_name,
832
+ open_metadata_type_name,
833
+ effective_time,
834
+ for_lineage,
835
+ for_duplicate_processing,
836
+ start_from,
837
+ page_size,
838
+ server_name,
839
+ time_out,
840
+ )
841
+ )
602
842
  return response
603
843
 
604
- async def _async_get_elements_by_classification_with_property_value(self, classification_name: str,
605
- property_value: str, property_names: [str],
606
- open_metadata_type_name: str = None,
607
- effective_time: str = None,
608
- for_lineage: bool = None,
609
- for_duplicate_processing: bool = None,
610
- start_from: int = 0,
611
- page_size: int = max_paging_size,
612
- server_name: str = None,
613
- time_out: int = default_time_out) -> list | str:
614
- """
615
- Retrieve elements with the requested classification name and with the requested a value found in one of the
616
- classification's properties specified. The value must match exactly. An open metadata type name may be supplied
617
- to restrict the types of elements returned. Async version.
844
+ async def _async_get_elements_by_classification_with_property_value(
845
+ self,
846
+ classification_name: str,
847
+ property_value: str,
848
+ property_names: [str],
849
+ open_metadata_type_name: str = None,
850
+ effective_time: str = None,
851
+ for_lineage: bool = None,
852
+ for_duplicate_processing: bool = None,
853
+ start_from: int = 0,
854
+ page_size: int = max_paging_size,
855
+ server_name: str = None,
856
+ time_out: int = default_time_out,
857
+ ) -> list | str:
858
+ """
859
+ Retrieve elements with the requested classification name and with the requested a value found in one of the
860
+ classification's properties specified. The value must match exactly. An open metadata type name may be supplied
861
+ to restrict the types of elements returned. Async version.
618
862
 
619
- https://egeria-project.org/types/
863
+ https://egeria-project.org/types/
620
864
 
621
- Parameters
622
- ----------
623
- classification_name: str
624
- - the classification name to retrieve elements for.
625
- property_value: str
626
- - property value to be searched.
627
- property_names: [str]
628
- - property names to search in.
629
- open_metadata_type_name : str, default = None
630
- - open metadata type to be used to restrict the search
631
- effective_time: str, default = None
632
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
633
- for_lineage: bool, default is set by server
634
- - determines if elements classified as Memento should be returned - normally false
635
- for_duplicate_processing: bool, default is set by server
636
- - Normally false. Set true when the caller is part of a deduplication function
637
- start_from: int, default = 0
638
- - index of the list to start from (0 for start).
639
- page_size
640
- - maximum number of elements to return.
641
- server_name: str, default = None
642
- - name of the server instances for this request.
643
- time_out: int, default = default_time_out
644
- - http request timeout for this request
865
+ Parameters
866
+ ----------
867
+ classification_name: str
868
+ - the classification name to retrieve elements for.
869
+ property_value: str
870
+ - property value to be searched.
871
+ property_names: [str]
872
+ - property names to search in.
873
+ open_metadata_type_name : str, default = None
874
+ - open metadata type to be used to restrict the search
875
+ effective_time: str, default = None
876
+ - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
877
+ for_lineage: bool, default is set by server
878
+ - determines if elements classified as Memento should be returned - normally false
879
+ for_duplicate_processing: bool, default is set by server
880
+ - Normally false. Set true when the caller is part of a deduplication function
881
+ start_from: int, default = 0
882
+ - index of the list to start from (0 for start).
883
+ page_size
884
+ - maximum number of elements to return.
885
+ server_name: str, default = None
886
+ - name of the server instances for this request.
887
+ time_out: int, default = default_time_out
888
+ - http request timeout for this request
645
889
 
646
- Returns
647
- -------
648
- [dict] | str
649
- Returns a string if no elements found and a list of dict of elements with the results.
890
+ Returns
891
+ -------
892
+ [dict] | str
893
+ Returns a string if no elements found and a list of dict of elements with the results.
650
894
 
651
- Raises
652
- ------
653
- InvalidParameterException
654
- one of the parameters is null or invalid or
655
- PropertyServerException
656
- There is a problem adding the element properties to the metadata repository or
657
- UserNotAuthorizedException
658
- the requesting user is not authorized to issue this request.
895
+ Raises
896
+ ------
897
+ InvalidParameterException
898
+ one of the parameters is null or invalid or
899
+ PropertyServerException
900
+ There is a problem adding the element properties to the metadata repository or
901
+ UserNotAuthorizedException
902
+ the requesting user is not authorized to issue this request.
659
903
  """
660
904
  if server_name is None:
661
905
  server_name = self.server_name
662
906
 
663
907
  possible_query_params = query_string(
664
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
665
- ("forDuplicateProcessing", for_duplicate_processing)])
908
+ [
909
+ ("startFrom", start_from),
910
+ ("pageSize", page_size),
911
+ ("forLineage", for_lineage),
912
+ ("forDuplicateProcessing", for_duplicate_processing),
913
+ ]
914
+ )
666
915
 
667
- body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
668
- "propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
916
+ body = {
917
+ "class": "FindPropertyNamesProperties",
918
+ "openMetadataTypeName": open_metadata_type_name,
919
+ "propertyValue": property_value,
920
+ "propertyNames": property_names,
921
+ "effectiveTime": effective_time,
922
+ }
669
923
 
670
- url = (f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
671
- f"with-exact-property-value{possible_query_params}")
672
- response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
673
- elements = response.json().get('elements', 'No elements found')
924
+ url = (
925
+ f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
926
+ f"with-exact-property-value{possible_query_params}"
927
+ )
928
+ response = await self._async_make_request(
929
+ "POST", url, body_slimmer(body), time_out=time_out
930
+ )
931
+ elements = response.json().get("elements", "No elements found")
674
932
  if type(elements) is list:
675
933
  if len(elements) == 0:
676
934
  return "No elements found"
677
935
  return elements
678
936
 
679
- def get_elements_by_classification_with_property_value(self, classification_name: str, property_value: str,
680
- property_names: [str], open_metadata_type_name: str = None,
681
- effective_time: str = None, for_lineage: bool = None,
682
- for_duplicate_processing: bool = None, start_from: int = 0,
683
- page_size: int = max_paging_size, server_name: str = None,
684
- time_out: int = default_time_out) -> list | str:
937
+ def get_elements_by_classification_with_property_value(
938
+ self,
939
+ classification_name: str,
940
+ property_value: str,
941
+ property_names: [str],
942
+ open_metadata_type_name: str = None,
943
+ effective_time: str = None,
944
+ for_lineage: bool = None,
945
+ for_duplicate_processing: bool = None,
946
+ start_from: int = 0,
947
+ page_size: int = max_paging_size,
948
+ server_name: str = None,
949
+ time_out: int = default_time_out,
950
+ ) -> list | str:
685
951
  """
686
952
  Retrieve elements by a value found in one of the properties specified. The value must match exactly.
687
953
  An open metadata type name may be supplied to restrict the results.
@@ -730,23 +996,36 @@ class ClassificationManager(Client):
730
996
 
731
997
  loop = asyncio.get_event_loop()
732
998
  response = loop.run_until_complete(
733
- self._async_get_elements_by_classification_with_property_value(classification_name, property_value,
734
- property_names, open_metadata_type_name,
735
- effective_time, for_lineage,
736
- for_duplicate_processing, start_from,
737
- page_size, server_name, time_out))
999
+ self._async_get_elements_by_classification_with_property_value(
1000
+ classification_name,
1001
+ property_value,
1002
+ property_names,
1003
+ open_metadata_type_name,
1004
+ effective_time,
1005
+ for_lineage,
1006
+ for_duplicate_processing,
1007
+ start_from,
1008
+ page_size,
1009
+ server_name,
1010
+ time_out,
1011
+ )
1012
+ )
738
1013
  return response
739
1014
 
740
- async def _async_find_elements_by_classification_with_property_value(self, classification_name: str,
741
- property_value: str, property_names: [str],
742
- open_metadata_type_name: str = None,
743
- effective_time: str = None,
744
- for_lineage: bool = None,
745
- for_duplicate_processing: bool = None,
746
- start_from: int = 0,
747
- page_size: int = max_paging_size,
748
- server_name: str = None,
749
- time_out: int = default_time_out) -> list | str:
1015
+ async def _async_find_elements_by_classification_with_property_value(
1016
+ self,
1017
+ classification_name: str,
1018
+ property_value: str,
1019
+ property_names: [str],
1020
+ open_metadata_type_name: str = None,
1021
+ effective_time: str = None,
1022
+ for_lineage: bool = None,
1023
+ for_duplicate_processing: bool = None,
1024
+ start_from: int = 0,
1025
+ page_size: int = max_paging_size,
1026
+ server_name: str = None,
1027
+ time_out: int = default_time_out,
1028
+ ) -> list | str:
750
1029
  """
751
1030
  Retrieve elements with the requested classification name and with the requested value found in
752
1031
  one of the classification's properties specified. The value must only be contained in the
@@ -798,27 +1077,49 @@ class ClassificationManager(Client):
798
1077
  server_name = self.server_name
799
1078
 
800
1079
  possible_query_params = query_string(
801
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
802
- ("forDuplicateProcessing", for_duplicate_processing)])
1080
+ [
1081
+ ("startFrom", start_from),
1082
+ ("pageSize", page_size),
1083
+ ("forLineage", for_lineage),
1084
+ ("forDuplicateProcessing", for_duplicate_processing),
1085
+ ]
1086
+ )
803
1087
 
804
- body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
805
- "propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
1088
+ body = {
1089
+ "class": "FindPropertyNamesProperties",
1090
+ "openMetadataTypeName": open_metadata_type_name,
1091
+ "propertyValue": property_value,
1092
+ "propertyNames": property_names,
1093
+ "effectiveTime": effective_time,
1094
+ }
806
1095
 
807
- url = (f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
808
- f"with-property-value-search{possible_query_params}")
809
- response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
810
- elements = response.json().get('elements', 'No elements found')
1096
+ url = (
1097
+ f"{base_path(self, server_name)}/elements/by-classification/{classification_name}/"
1098
+ f"with-property-value-search{possible_query_params}"
1099
+ )
1100
+ response = await self._async_make_request(
1101
+ "POST", url, body_slimmer(body), time_out=time_out
1102
+ )
1103
+ elements = response.json().get("elements", "No elements found")
811
1104
  if type(elements) is list:
812
1105
  if len(elements) == 0:
813
1106
  return "No elements found"
814
1107
  return elements
815
1108
 
816
- def find_elements_by_classification_with_property_value(self, classification_name: str, property_value: str,
817
- property_names: [str], open_metadata_type_name: str = None,
818
- effective_time: str = None, for_lineage: bool = None,
819
- for_duplicate_processing: bool = None, start_from: int = 0,
820
- page_size: int = max_paging_size, server_name: str = None,
821
- time_out: int = default_time_out) -> list | str:
1109
+ def find_elements_by_classification_with_property_value(
1110
+ self,
1111
+ classification_name: str,
1112
+ property_value: str,
1113
+ property_names: [str],
1114
+ open_metadata_type_name: str = None,
1115
+ effective_time: str = None,
1116
+ for_lineage: bool = None,
1117
+ for_duplicate_processing: bool = None,
1118
+ start_from: int = 0,
1119
+ page_size: int = max_paging_size,
1120
+ server_name: str = None,
1121
+ time_out: int = default_time_out,
1122
+ ) -> list | str:
822
1123
  """
823
1124
  Retrieve elements with the requested classification name and with the requested a value found in
824
1125
  one of the classification's properties specified. The value must only be contained in the
@@ -869,21 +1170,38 @@ class ClassificationManager(Client):
869
1170
 
870
1171
  loop = asyncio.get_event_loop()
871
1172
  response = loop.run_until_complete(
872
- self._async_find_elements_by_classification_with_property_value(classification_name, property_value,
873
- property_names, open_metadata_type_name,
874
- effective_time, for_lineage,
875
- for_duplicate_processing, start_from,
876
- page_size, server_name, time_out))
1173
+ self._async_find_elements_by_classification_with_property_value(
1174
+ classification_name,
1175
+ property_value,
1176
+ property_names,
1177
+ open_metadata_type_name,
1178
+ effective_time,
1179
+ for_lineage,
1180
+ for_duplicate_processing,
1181
+ start_from,
1182
+ page_size,
1183
+ server_name,
1184
+ time_out,
1185
+ )
1186
+ )
877
1187
  return response
878
1188
 
879
1189
  #
880
1190
  # related elements
881
1191
  #
882
- async def _async_get_all_related_elements(self, element_guid: str, open_metadata_type_name: str = None,
883
- start_at_end: int = 1, effective_time: str = None,
884
- for_lineage: bool = None, for_duplicate_processing: bool = None,
885
- start_from: int = 0, page_size: int = max_paging_size,
886
- server_name: str = None, time_out: int = default_time_out) -> list | str:
1192
+ async def _async_get_all_related_elements(
1193
+ self,
1194
+ element_guid: str,
1195
+ open_metadata_type_name: str = None,
1196
+ start_at_end: int = 1,
1197
+ effective_time: str = None,
1198
+ for_lineage: bool = None,
1199
+ for_duplicate_processing: bool = None,
1200
+ start_from: int = 0,
1201
+ page_size: int = max_paging_size,
1202
+ server_name: str = None,
1203
+ time_out: int = default_time_out,
1204
+ ) -> list | str:
887
1205
  """
888
1206
  Retrieve elements linked any relationship type name. It is also possible to limit the results by
889
1207
  specifying a type name for the elements that should be returned. If no type name is specified then any type of
@@ -932,26 +1250,47 @@ class ClassificationManager(Client):
932
1250
  server_name = self.server_name
933
1251
 
934
1252
  possible_query_params = query_string(
935
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
936
- ("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
1253
+ [
1254
+ ("startFrom", start_from),
1255
+ ("pageSize", page_size),
1256
+ ("forLineage", for_lineage),
1257
+ ("forDuplicateProcessing", for_duplicate_processing),
1258
+ ("startAtEnd", start_at_end),
1259
+ ]
1260
+ )
937
1261
 
938
- body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
939
- "effectiveTime": effective_time, }
1262
+ body = {
1263
+ "class": "FindProperties",
1264
+ "openMetadataTypeName": open_metadata_type_name,
1265
+ "effectiveTime": effective_time,
1266
+ }
940
1267
 
941
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship"
942
- f"{possible_query_params}")
943
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
944
- elements = response.json().get('elements', 'No elements found')
1268
+ url = (
1269
+ f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship"
1270
+ f"{possible_query_params}"
1271
+ )
1272
+ response: Response = await self._async_make_request(
1273
+ "POST", url, body_slimmer(body), time_out=time_out
1274
+ )
1275
+ elements = response.json().get("elements", "No elements found")
945
1276
  if type(elements) is list:
946
1277
  if len(elements) == 0:
947
1278
  return "No elements found"
948
1279
  return elements
949
1280
 
950
- def get_all_related_elements(self, element_guid: str, open_metadata_type_name: str = None, start_at_end: int = 1,
951
- effective_time: str = None, for_lineage: bool = None,
952
- for_duplicate_processing: bool = None, start_from: int = 0,
953
- page_size: int = max_paging_size, server_name: str = None,
954
- time_out: int = default_time_out) -> list | str:
1281
+ def get_all_related_elements(
1282
+ self,
1283
+ element_guid: str,
1284
+ open_metadata_type_name: str = None,
1285
+ start_at_end: int = 1,
1286
+ effective_time: str = None,
1287
+ for_lineage: bool = None,
1288
+ for_duplicate_processing: bool = None,
1289
+ start_from: int = 0,
1290
+ page_size: int = max_paging_size,
1291
+ server_name: str = None,
1292
+ time_out: int = default_time_out,
1293
+ ) -> list | str:
955
1294
  """
956
1295
  Retrieve elements linked via any relationship type name. It is also possible to limit the results by
957
1296
  specifying a type name for the elements that should be returned. If no type name is specified then any type of
@@ -999,17 +1338,35 @@ class ClassificationManager(Client):
999
1338
 
1000
1339
  loop = asyncio.get_event_loop()
1001
1340
  response = loop.run_until_complete(
1002
- self._async_get_all_related_elements(element_guid, open_metadata_type_name, start_at_end, effective_time,
1003
- for_lineage, for_duplicate_processing, start_from, page_size,
1004
- server_name, time_out))
1341
+ self._async_get_all_related_elements(
1342
+ element_guid,
1343
+ open_metadata_type_name,
1344
+ start_at_end,
1345
+ effective_time,
1346
+ for_lineage,
1347
+ for_duplicate_processing,
1348
+ start_from,
1349
+ page_size,
1350
+ server_name,
1351
+ time_out,
1352
+ )
1353
+ )
1005
1354
  return response
1006
1355
 
1007
- async def _async_get_related_elements(self, element_guid: str, relationship_type: str,
1008
- open_metadata_type_name: str = None, start_at_end: int = 1,
1009
- effective_time: str = None, for_lineage: bool = None,
1010
- for_duplicate_processing: bool = None, start_from: int = 0,
1011
- page_size: int = max_paging_size, server_name: str = None,
1012
- time_out: int = default_time_out) -> list | str:
1356
+ async def _async_get_related_elements(
1357
+ self,
1358
+ element_guid: str,
1359
+ relationship_type: str,
1360
+ open_metadata_type_name: str = None,
1361
+ start_at_end: int = 1,
1362
+ effective_time: str = None,
1363
+ for_lineage: bool = None,
1364
+ for_duplicate_processing: bool = None,
1365
+ start_from: int = 0,
1366
+ page_size: int = max_paging_size,
1367
+ server_name: str = None,
1368
+ time_out: int = default_time_out,
1369
+ ) -> list | str:
1013
1370
  """
1014
1371
  Retrieve elements linked any relationship type name. It is also possible to limit the results by
1015
1372
  specifying a type name for the elements that should be returned. If no type name is specified then any type of
@@ -1060,26 +1417,48 @@ class ClassificationManager(Client):
1060
1417
  server_name = self.server_name
1061
1418
 
1062
1419
  possible_query_params = query_string(
1063
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
1064
- ("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
1420
+ [
1421
+ ("startFrom", start_from),
1422
+ ("pageSize", page_size),
1423
+ ("forLineage", for_lineage),
1424
+ ("forDuplicateProcessing", for_duplicate_processing),
1425
+ ("startAtEnd", start_at_end),
1426
+ ]
1427
+ )
1065
1428
 
1066
- body = {"class": "FindProperties", "openMetadataTypeName": open_metadata_type_name,
1067
- "effectiveTime": effective_time, }
1429
+ body = {
1430
+ "class": "FindProperties",
1431
+ "openMetadataTypeName": open_metadata_type_name,
1432
+ "effectiveTime": effective_time,
1433
+ }
1068
1434
 
1069
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
1070
- f"{relationship_type}{possible_query_params}")
1071
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
1072
- elements = response.json().get('elements', 'No elements found')
1435
+ url = (
1436
+ f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
1437
+ f"{relationship_type}{possible_query_params}"
1438
+ )
1439
+ response: Response = await self._async_make_request(
1440
+ "POST", url, body_slimmer(body), time_out=time_out
1441
+ )
1442
+ elements = response.json().get("elements", "No elements found")
1073
1443
  if type(elements) is list:
1074
1444
  if len(elements) == 0:
1075
1445
  return "No elements found"
1076
1446
  return elements
1077
1447
 
1078
- def get_related_elements(self, element_guid: str, relationship_type: str, open_metadata_type_name: str = None,
1079
- start_at_end: int = 1, effective_time: str = None, for_lineage: bool = None,
1080
- for_duplicate_processing: bool = None, start_from: int = 0,
1081
- page_size: int = max_paging_size, server_name: str = None,
1082
- time_out: int = default_time_out) -> list | str:
1448
+ def get_related_elements(
1449
+ self,
1450
+ element_guid: str,
1451
+ relationship_type: str,
1452
+ open_metadata_type_name: str = None,
1453
+ start_at_end: int = 1,
1454
+ effective_time: str = None,
1455
+ for_lineage: bool = None,
1456
+ for_duplicate_processing: bool = None,
1457
+ start_from: int = 0,
1458
+ page_size: int = max_paging_size,
1459
+ server_name: str = None,
1460
+ time_out: int = default_time_out,
1461
+ ) -> list | str:
1083
1462
  """
1084
1463
  Retrieve elements linked via any relationship type name. It is also possible to limit the results by
1085
1464
  specifying a type name for the elements that should be returned. If no type name is specified then any type of
@@ -1129,20 +1508,38 @@ class ClassificationManager(Client):
1129
1508
 
1130
1509
  loop = asyncio.get_event_loop()
1131
1510
  response = loop.run_until_complete(
1132
- self._async_get_related_elements(element_guid, relationship_type, open_metadata_type_name, start_at_end,
1133
- effective_time, for_lineage, for_duplicate_processing, start_from,
1134
- page_size, server_name, time_out))
1511
+ self._async_get_related_elements(
1512
+ element_guid,
1513
+ relationship_type,
1514
+ open_metadata_type_name,
1515
+ start_at_end,
1516
+ effective_time,
1517
+ for_lineage,
1518
+ for_duplicate_processing,
1519
+ start_from,
1520
+ page_size,
1521
+ server_name,
1522
+ time_out,
1523
+ )
1524
+ )
1135
1525
  return response
1136
1526
 
1137
- async def _async_get_related_elements_with_property_value(self, element_guid: str, relationship_type: str,
1138
- property_value: str, property_names: [str],
1139
- open_metadata_type_name: str = None,
1140
- start_at_end: int = 1, effective_time: str = None,
1141
- for_lineage: bool = None,
1142
- for_duplicate_processing: bool = None,
1143
- start_from: int = 0, page_size: int = max_paging_size,
1144
- server_name: str = None,
1145
- time_out: int = default_time_out) -> list | str:
1527
+ async def _async_get_related_elements_with_property_value(
1528
+ self,
1529
+ element_guid: str,
1530
+ relationship_type: str,
1531
+ property_value: str,
1532
+ property_names: [str],
1533
+ open_metadata_type_name: str = None,
1534
+ start_at_end: int = 1,
1535
+ effective_time: str = None,
1536
+ for_lineage: bool = None,
1537
+ for_duplicate_processing: bool = None,
1538
+ start_from: int = 0,
1539
+ page_size: int = max_paging_size,
1540
+ server_name: str = None,
1541
+ time_out: int = default_time_out,
1542
+ ) -> list | str:
1146
1543
  """
1147
1544
  Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
1148
1545
  the classification's properties specified. The value must match exactly. An open metadata type name may be
@@ -1198,29 +1595,53 @@ class ClassificationManager(Client):
1198
1595
  server_name = self.server_name
1199
1596
 
1200
1597
  possible_query_params = query_string(
1201
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
1202
- ("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
1598
+ [
1599
+ ("startFrom", start_from),
1600
+ ("pageSize", page_size),
1601
+ ("forLineage", for_lineage),
1602
+ ("forDuplicateProcessing", for_duplicate_processing),
1603
+ ("startAtEnd", start_at_end),
1604
+ ]
1605
+ )
1203
1606
 
1204
- body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
1205
- "propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
1607
+ body = {
1608
+ "class": "FindPropertyNamesProperties",
1609
+ "openMetadataTypeName": open_metadata_type_name,
1610
+ "propertyValue": property_value,
1611
+ "propertyNames": property_names,
1612
+ "effectiveTime": effective_time,
1613
+ }
1206
1614
 
1207
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
1208
- f"{relationship_type}/with-exact-property-value{possible_query_params}")
1615
+ url = (
1616
+ f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
1617
+ f"{relationship_type}/with-exact-property-value{possible_query_params}"
1618
+ )
1209
1619
 
1210
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
1211
- elements = response.json().get('elements', 'No elements found')
1620
+ response: Response = await self._async_make_request(
1621
+ "POST", url, body_slimmer(body), time_out=time_out
1622
+ )
1623
+ elements = response.json().get("elements", "No elements found")
1212
1624
  if type(elements) is list:
1213
1625
  if len(elements) == 0:
1214
1626
  return "No elements found"
1215
1627
  return elements
1216
1628
 
1217
- def get_related_elements_with_property_value(self, element_guid: str, relationship_type: str, property_value: str,
1218
- property_names: [str], open_metadata_type_name: str = None,
1219
- start_at_end: int = 1, effective_time: str = None,
1220
- for_lineage: bool = None, for_duplicate_processing: bool = None,
1221
- start_from: int = 0, page_size: int = max_paging_size,
1222
- server_name: str = None,
1223
- time_out: int = default_time_out) -> list | str:
1629
+ def get_related_elements_with_property_value(
1630
+ self,
1631
+ element_guid: str,
1632
+ relationship_type: str,
1633
+ property_value: str,
1634
+ property_names: [str],
1635
+ open_metadata_type_name: str = None,
1636
+ start_at_end: int = 1,
1637
+ effective_time: str = None,
1638
+ for_lineage: bool = None,
1639
+ for_duplicate_processing: bool = None,
1640
+ start_from: int = 0,
1641
+ page_size: int = max_paging_size,
1642
+ server_name: str = None,
1643
+ time_out: int = default_time_out,
1644
+ ) -> list | str:
1224
1645
  """
1225
1646
  Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
1226
1647
  the classification's properties specified. The value must match exactly. An open metadata type name may be
@@ -1274,21 +1695,40 @@ class ClassificationManager(Client):
1274
1695
 
1275
1696
  loop = asyncio.get_event_loop()
1276
1697
  response = loop.run_until_complete(
1277
- self._async_get_related_elements_with_property_value(element_guid, relationship_type, property_value,
1278
- property_names, open_metadata_type_name, start_at_end,
1279
- effective_time, for_lineage, for_duplicate_processing,
1280
- start_from, page_size, server_name, time_out))
1698
+ self._async_get_related_elements_with_property_value(
1699
+ element_guid,
1700
+ relationship_type,
1701
+ property_value,
1702
+ property_names,
1703
+ open_metadata_type_name,
1704
+ start_at_end,
1705
+ effective_time,
1706
+ for_lineage,
1707
+ for_duplicate_processing,
1708
+ start_from,
1709
+ page_size,
1710
+ server_name,
1711
+ time_out,
1712
+ )
1713
+ )
1281
1714
  return response
1282
1715
 
1283
- async def _async_find_related_elements_with_property_value(self, element_guid: str, relationship_type: str,
1284
- property_value: str, property_names: [str],
1285
- open_metadata_type_name: str = None,
1286
- start_at_end: int = 1, effective_time: str = None,
1287
- for_lineage: bool = None,
1288
- for_duplicate_processing: bool = None,
1289
- start_from: int = 0, page_size: int = max_paging_size,
1290
- server_name: str = None,
1291
- time_out: int = default_time_out) -> list | str:
1716
+ async def _async_find_related_elements_with_property_value(
1717
+ self,
1718
+ element_guid: str,
1719
+ relationship_type: str,
1720
+ property_value: str,
1721
+ property_names: [str],
1722
+ open_metadata_type_name: str = None,
1723
+ start_at_end: int = 1,
1724
+ effective_time: str = None,
1725
+ for_lineage: bool = None,
1726
+ for_duplicate_processing: bool = None,
1727
+ start_from: int = 0,
1728
+ page_size: int = max_paging_size,
1729
+ server_name: str = None,
1730
+ time_out: int = default_time_out,
1731
+ ) -> list | str:
1292
1732
  """
1293
1733
  Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
1294
1734
  the classification's properties specified. The value must only be contained in the properties rather than
@@ -1345,30 +1785,54 @@ class ClassificationManager(Client):
1345
1785
  server_name = self.server_name
1346
1786
 
1347
1787
  possible_query_params = query_string(
1348
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
1349
- ("forDuplicateProcessing", for_duplicate_processing), ("startAtEnd", start_at_end)])
1788
+ [
1789
+ ("startFrom", start_from),
1790
+ ("pageSize", page_size),
1791
+ ("forLineage", for_lineage),
1792
+ ("forDuplicateProcessing", for_duplicate_processing),
1793
+ ("startAtEnd", start_at_end),
1794
+ ]
1795
+ )
1350
1796
 
1351
- body = {"class": "FindPropertyNamesProperties", "openMetadataTypeName": open_metadata_type_name,
1352
- "propertyValue": property_value, "propertyNames": property_names, "effectiveTime": effective_time, }
1797
+ body = {
1798
+ "class": "FindPropertyNamesProperties",
1799
+ "openMetadataTypeName": open_metadata_type_name,
1800
+ "propertyValue": property_value,
1801
+ "propertyNames": property_names,
1802
+ "effectiveTime": effective_time,
1803
+ }
1353
1804
 
1354
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
1355
- f"{relationship_type}/with-property-value-search{possible_query_params}")
1805
+ url = (
1806
+ f"{base_path(self, server_name)}/elements/{element_guid}/by-relationship/"
1807
+ f"{relationship_type}/with-property-value-search{possible_query_params}"
1808
+ )
1356
1809
 
1357
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
1810
+ response: Response = await self._async_make_request(
1811
+ "POST", url, body_slimmer(body), time_out=time_out
1812
+ )
1358
1813
 
1359
- elements = response.json().get('elements', 'No elements found')
1814
+ elements = response.json().get("elements", "No elements found")
1360
1815
  if type(elements) is list:
1361
1816
  if len(elements) == 0:
1362
1817
  return "No elements found"
1363
1818
  return elements
1364
1819
 
1365
- def find_related_elements_with_property_value(self, element_guid: str, relationship_type: str, property_value: str,
1366
- property_names: [str], open_metadata_type_name: str = None,
1367
- start_at_end: int = 1, effective_time: str = None,
1368
- for_lineage: bool = None, for_duplicate_processing: bool = None,
1369
- start_from: int = 0, page_size: int = max_paging_size,
1370
- server_name: str = None,
1371
- time_out: int = default_time_out) -> list | str:
1820
+ def find_related_elements_with_property_value(
1821
+ self,
1822
+ element_guid: str,
1823
+ relationship_type: str,
1824
+ property_value: str,
1825
+ property_names: [str],
1826
+ open_metadata_type_name: str = None,
1827
+ start_at_end: int = 1,
1828
+ effective_time: str = None,
1829
+ for_lineage: bool = None,
1830
+ for_duplicate_processing: bool = None,
1831
+ start_from: int = 0,
1832
+ page_size: int = max_paging_size,
1833
+ server_name: str = None,
1834
+ time_out: int = default_time_out,
1835
+ ) -> list | str:
1372
1836
  """
1373
1837
  Retrieve elements linked via the requested relationship type name and with the requested a value found in one of
1374
1838
  the classification's properties specified. The value must only be contained in the properties rather than
@@ -1423,19 +1887,38 @@ class ClassificationManager(Client):
1423
1887
 
1424
1888
  loop = asyncio.get_event_loop()
1425
1889
  response = loop.run_until_complete(
1426
- self._async_find_related_elements_with_property_value(element_guid, relationship_type, property_value,
1427
- property_names, open_metadata_type_name, start_at_end,
1428
- effective_time, for_lineage, for_duplicate_processing,
1429
- start_from, page_size, server_name, time_out))
1890
+ self._async_find_related_elements_with_property_value(
1891
+ element_guid,
1892
+ relationship_type,
1893
+ property_value,
1894
+ property_names,
1895
+ open_metadata_type_name,
1896
+ start_at_end,
1897
+ effective_time,
1898
+ for_lineage,
1899
+ for_duplicate_processing,
1900
+ start_from,
1901
+ page_size,
1902
+ server_name,
1903
+ time_out,
1904
+ )
1905
+ )
1430
1906
  return response
1431
1907
 
1432
1908
  #
1433
1909
  # relationships
1434
1910
 
1435
- async def _async_get_relationships(self, relationship_type: str, effective_time: str = None,
1436
- for_lineage: bool = None, for_duplicate_processing: bool = None,
1437
- start_from: int = 0, page_size: int = max_paging_size, server_name: str = None,
1438
- time_out: int = default_time_out) -> list | str:
1911
+ async def _async_get_relationships(
1912
+ self,
1913
+ relationship_type: str,
1914
+ effective_time: str = None,
1915
+ for_lineage: bool = None,
1916
+ for_duplicate_processing: bool = None,
1917
+ start_from: int = 0,
1918
+ page_size: int = max_paging_size,
1919
+ server_name: str = None,
1920
+ time_out: int = default_time_out,
1921
+ ) -> list | str:
1439
1922
  """
1440
1923
  Retrieve relationships of the requested relationship type name. Async version.
1441
1924
 
@@ -1476,25 +1959,42 @@ class ClassificationManager(Client):
1476
1959
  server_name = self.server_name
1477
1960
 
1478
1961
  possible_query_params = query_string(
1479
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
1480
- ("forDuplicateProcessing", for_duplicate_processing)])
1962
+ [
1963
+ ("startFrom", start_from),
1964
+ ("pageSize", page_size),
1965
+ ("forLineage", for_lineage),
1966
+ ("forDuplicateProcessing", for_duplicate_processing),
1967
+ ]
1968
+ )
1481
1969
 
1482
1970
  body = {"class": "FindProperties", "effectiveTime": effective_time}
1483
1971
 
1484
- url = (f"{base_path(self, server_name)}/relationships/{relationship_type}"
1485
- f"{possible_query_params}")
1972
+ url = (
1973
+ f"{base_path(self, server_name)}/relationships/{relationship_type}"
1974
+ f"{possible_query_params}"
1975
+ )
1486
1976
 
1487
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
1488
- rels = response.json().get('relationships', 'No relationships found')
1977
+ response: Response = await self._async_make_request(
1978
+ "POST", url, body_slimmer(body), time_out=time_out
1979
+ )
1980
+ rels = response.json().get("relationships", "No relationships found")
1489
1981
 
1490
1982
  if type(rels) is list:
1491
1983
  if len(rels) == 0:
1492
1984
  return "No elements found"
1493
1985
  return rels
1494
1986
 
1495
- def get_relationships(self, relationship_type: str, effective_time: str = None, for_lineage: bool = None,
1496
- for_duplicate_processing: bool = None, start_from: int = 0, page_size: int = max_paging_size,
1497
- server_name: str = None, time_out: int = default_time_out) -> list | str:
1987
+ def get_relationships(
1988
+ self,
1989
+ relationship_type: str,
1990
+ effective_time: str = None,
1991
+ for_lineage: bool = None,
1992
+ for_duplicate_processing: bool = None,
1993
+ start_from: int = 0,
1994
+ page_size: int = max_paging_size,
1995
+ server_name: str = None,
1996
+ time_out: int = default_time_out,
1997
+ ) -> list | str:
1498
1998
  """
1499
1999
  Retrieve relationships of the requested relationship type name.
1500
2000
 
@@ -1534,16 +2034,32 @@ class ClassificationManager(Client):
1534
2034
 
1535
2035
  loop = asyncio.get_event_loop()
1536
2036
  response = loop.run_until_complete(
1537
- self._async_get_relationships(relationship_type, effective_time, for_lineage, for_duplicate_processing,
1538
- start_from, page_size, server_name, time_out))
2037
+ self._async_get_relationships(
2038
+ relationship_type,
2039
+ effective_time,
2040
+ for_lineage,
2041
+ for_duplicate_processing,
2042
+ start_from,
2043
+ page_size,
2044
+ server_name,
2045
+ time_out,
2046
+ )
2047
+ )
1539
2048
  return response
1540
2049
 
1541
- async def _async_get_relationships_with_property_value(self, relationship_type: str, property_value: str,
1542
- property_names: [str], effective_time: str = None,
1543
- for_lineage: bool = None,
1544
- for_duplicate_processing: bool = None, start_from: int = 0,
1545
- page_size: int = max_paging_size, server_name: str = None,
1546
- time_out: int = default_time_out) -> list | str:
2050
+ async def _async_get_relationships_with_property_value(
2051
+ self,
2052
+ relationship_type: str,
2053
+ property_value: str,
2054
+ property_names: [str],
2055
+ effective_time: str = None,
2056
+ for_lineage: bool = None,
2057
+ for_duplicate_processing: bool = None,
2058
+ start_from: int = 0,
2059
+ page_size: int = max_paging_size,
2060
+ server_name: str = None,
2061
+ time_out: int = default_time_out,
2062
+ ) -> list | str:
1547
2063
  """
1548
2064
  Retrieve relationships of the requested relationship type name and with the requested a value found in
1549
2065
  one of the relationship's properties specified. The value must match exactly. Async version.
@@ -1591,27 +2107,48 @@ class ClassificationManager(Client):
1591
2107
  server_name = self.server_name
1592
2108
 
1593
2109
  possible_query_params = query_string(
1594
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
1595
- ("forDuplicateProcessing", for_duplicate_processing)])
2110
+ [
2111
+ ("startFrom", start_from),
2112
+ ("pageSize", page_size),
2113
+ ("forLineage", for_lineage),
2114
+ ("forDuplicateProcessing", for_duplicate_processing),
2115
+ ]
2116
+ )
1596
2117
 
1597
- body = {"class": "FindPropertyNamesProperties", "propertyValue": property_value,
1598
- "propertyNames": property_names, "effectiveTime": effective_time, }
2118
+ body = {
2119
+ "class": "FindPropertyNamesProperties",
2120
+ "propertyValue": property_value,
2121
+ "propertyNames": property_names,
2122
+ "effectiveTime": effective_time,
2123
+ }
1599
2124
 
1600
- url = (f"{base_path(self, server_name)}/relationships/{relationship_type}/"
1601
- f"with-exact-property-value{possible_query_params}")
2125
+ url = (
2126
+ f"{base_path(self, server_name)}/relationships/{relationship_type}/"
2127
+ f"with-exact-property-value{possible_query_params}"
2128
+ )
1602
2129
 
1603
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
1604
- rels = response.json().get('relationships', 'No elements found')
2130
+ response: Response = await self._async_make_request(
2131
+ "POST", url, body_slimmer(body), time_out=time_out
2132
+ )
2133
+ rels = response.json().get("relationships", "No elements found")
1605
2134
  if type(rels) is list:
1606
2135
  if len(rels) == 0:
1607
2136
  return "No elements found"
1608
2137
  return rels
1609
2138
 
1610
- def get_relationships_with_property_value(self, relationship_type: str, property_value: str, property_names: [str],
1611
- effective_time: str = None, for_lineage: bool = None,
1612
- for_duplicate_processing: bool = None, start_from: int = 0,
1613
- page_size: int = max_paging_size, server_name: str = None,
1614
- time_out: int = default_time_out) -> list | str:
2139
+ def get_relationships_with_property_value(
2140
+ self,
2141
+ relationship_type: str,
2142
+ property_value: str,
2143
+ property_names: [str],
2144
+ effective_time: str = None,
2145
+ for_lineage: bool = None,
2146
+ for_duplicate_processing: bool = None,
2147
+ start_from: int = 0,
2148
+ page_size: int = max_paging_size,
2149
+ server_name: str = None,
2150
+ time_out: int = default_time_out,
2151
+ ) -> list | str:
1615
2152
  """
1616
2153
  Retrieve relationships of the requested relationship type name and with the requested a value found in
1617
2154
  one of the relationship's properties specified. The value must match exactly.
@@ -1656,17 +2193,34 @@ class ClassificationManager(Client):
1656
2193
 
1657
2194
  loop = asyncio.get_event_loop()
1658
2195
  response = loop.run_until_complete(
1659
- self._async_get_relationships_with_property_value(relationship_type, property_value, property_names,
1660
- effective_time, for_lineage, for_duplicate_processing,
1661
- start_from, page_size, server_name, time_out))
2196
+ self._async_get_relationships_with_property_value(
2197
+ relationship_type,
2198
+ property_value,
2199
+ property_names,
2200
+ effective_time,
2201
+ for_lineage,
2202
+ for_duplicate_processing,
2203
+ start_from,
2204
+ page_size,
2205
+ server_name,
2206
+ time_out,
2207
+ )
2208
+ )
1662
2209
  return response
1663
2210
 
1664
- async def _async_find_relationships_with_property_value(self, relationship_type: str, property_value: str,
1665
- property_names: [str], effective_time: str = None,
1666
- for_lineage: bool = None,
1667
- for_duplicate_processing: bool = None, start_from: int = 0,
1668
- page_size: int = max_paging_size, server_name: str = None,
1669
- time_out: int = default_time_out) -> list | str:
2211
+ async def _async_find_relationships_with_property_value(
2212
+ self,
2213
+ relationship_type: str,
2214
+ property_value: str,
2215
+ property_names: [str],
2216
+ effective_time: str = None,
2217
+ for_lineage: bool = None,
2218
+ for_duplicate_processing: bool = None,
2219
+ start_from: int = 0,
2220
+ page_size: int = max_paging_size,
2221
+ server_name: str = None,
2222
+ time_out: int = default_time_out,
2223
+ ) -> list | str:
1670
2224
  """
1671
2225
  Retrieve relationships of the requested relationship type name and with the requested a value found in one of
1672
2226
  the relationship's properties specified. The value must only be contained in the properties rather than
@@ -1713,28 +2267,49 @@ class ClassificationManager(Client):
1713
2267
  server_name = self.server_name
1714
2268
 
1715
2269
  possible_query_params = query_string(
1716
- [("startFrom", start_from), ("pageSize", page_size), ("forLineage", for_lineage),
1717
- ("forDuplicateProcessing", for_duplicate_processing)])
2270
+ [
2271
+ ("startFrom", start_from),
2272
+ ("pageSize", page_size),
2273
+ ("forLineage", for_lineage),
2274
+ ("forDuplicateProcessing", for_duplicate_processing),
2275
+ ]
2276
+ )
1718
2277
 
1719
- body = {"class": "FindPropertyNamesProperties", "propertyValue": property_value,
1720
- "propertyNames": property_names, "effectiveTime": effective_time, }
2278
+ body = {
2279
+ "class": "FindPropertyNamesProperties",
2280
+ "propertyValue": property_value,
2281
+ "propertyNames": property_names,
2282
+ "effectiveTime": effective_time,
2283
+ }
1721
2284
 
1722
- url = (f"{base_path(self, server_name)}/relationships/"
1723
- f"{relationship_type}/with-property-value-search{possible_query_params}")
2285
+ url = (
2286
+ f"{base_path(self, server_name)}/relationships/"
2287
+ f"{relationship_type}/with-property-value-search{possible_query_params}"
2288
+ )
1724
2289
 
1725
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2290
+ response: Response = await self._async_make_request(
2291
+ "POST", url, body_slimmer(body), time_out=time_out
2292
+ )
1726
2293
 
1727
- rels = response.json().get('relationships', 'No elements found')
2294
+ rels = response.json().get("relationships", "No elements found")
1728
2295
  if type(rels) is list:
1729
2296
  if len(rels) == 0:
1730
2297
  return "No elements found"
1731
2298
  return rels
1732
2299
 
1733
- def find_relationships_with_property_value(self, relationship_type: str, property_value: str, property_names: [str],
1734
- effective_time: str = None, for_lineage: bool = None,
1735
- for_duplicate_processing: bool = None, start_from: int = 0,
1736
- page_size: int = max_paging_size, server_name: str = None,
1737
- time_out: int = default_time_out) -> list | str:
2300
+ def find_relationships_with_property_value(
2301
+ self,
2302
+ relationship_type: str,
2303
+ property_value: str,
2304
+ property_names: [str],
2305
+ effective_time: str = None,
2306
+ for_lineage: bool = None,
2307
+ for_duplicate_processing: bool = None,
2308
+ start_from: int = 0,
2309
+ page_size: int = max_paging_size,
2310
+ server_name: str = None,
2311
+ time_out: int = default_time_out,
2312
+ ) -> list | str:
1738
2313
  """
1739
2314
  Retrieve relationships of the requested relationship type name and with the requested a value found in one of
1740
2315
  the relationship's properties specified. The value must only be contained in the properties rather than
@@ -1782,18 +2357,34 @@ class ClassificationManager(Client):
1782
2357
 
1783
2358
  loop = asyncio.get_event_loop()
1784
2359
  response = loop.run_until_complete(
1785
- self._async_find_relationships_with_property_value(relationship_type, property_value, property_names,
1786
- effective_time, for_lineage, for_duplicate_processing,
1787
- start_from, page_size, server_name, time_out))
2360
+ self._async_find_relationships_with_property_value(
2361
+ relationship_type,
2362
+ property_value,
2363
+ property_names,
2364
+ effective_time,
2365
+ for_lineage,
2366
+ for_duplicate_processing,
2367
+ start_from,
2368
+ page_size,
2369
+ server_name,
2370
+ time_out,
2371
+ )
2372
+ )
1788
2373
  return response
1789
2374
 
1790
2375
  #
1791
2376
  # guid
1792
2377
  #
1793
2378
 
1794
- async def _async_retrieve_instance_for_guid(self, guid: str, effective_time: str = None, for_lineage: bool = None,
1795
- for_duplicate_processing: bool = None, server_name: str = None,
1796
- time_out: int = default_time_out) -> list | str:
2379
+ async def _async_retrieve_instance_for_guid(
2380
+ self,
2381
+ guid: str,
2382
+ effective_time: str = None,
2383
+ for_lineage: bool = None,
2384
+ for_duplicate_processing: bool = None,
2385
+ server_name: str = None,
2386
+ time_out: int = default_time_out,
2387
+ ) -> list | str:
1797
2388
  """
1798
2389
  Retrieve the header for the instance identified by the supplied unique identifier.
1799
2390
  It may be an element (entity) or a relationship between elements. Async version.
@@ -1831,18 +2422,33 @@ class ClassificationManager(Client):
1831
2422
  server_name = self.server_name
1832
2423
 
1833
2424
  possible_query_params = query_string(
1834
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2425
+ [
2426
+ ("forLineage", for_lineage),
2427
+ ("forDuplicateProcessing", for_duplicate_processing),
2428
+ ]
2429
+ )
1835
2430
 
1836
- body = {"class": "FindProperties", "effectiveTime": effective_time, }
2431
+ body = {
2432
+ "class": "FindProperties",
2433
+ "effectiveTime": effective_time,
2434
+ }
1837
2435
 
1838
2436
  url = f"{base_path(self, server_name)}/guids/{guid}{possible_query_params}"
1839
- response: Response = await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
1840
- element = response.json().get('element', 'No elements found')
2437
+ response: Response = await self._async_make_request(
2438
+ "POST", url, body_slimmer(body), time_out=time_out
2439
+ )
2440
+ element = response.json().get("element", "No elements found")
1841
2441
  return element
1842
2442
 
1843
- def retrieve_instance_for_guid(self, guid: str, effective_time: str = None, for_lineage: bool = None,
1844
- for_duplicate_processing: bool = None, server_name: str = None,
1845
- time_out: int = default_time_out) -> list | str:
2443
+ def retrieve_instance_for_guid(
2444
+ self,
2445
+ guid: str,
2446
+ effective_time: str = None,
2447
+ for_lineage: bool = None,
2448
+ for_duplicate_processing: bool = None,
2449
+ server_name: str = None,
2450
+ time_out: int = default_time_out,
2451
+ ) -> list | str:
1846
2452
  """
1847
2453
  Retrieve the header for the instance identified by the supplied unique identifier.
1848
2454
  It may be an element (entity) or a relationship between elements.
@@ -1879,17 +2485,30 @@ class ClassificationManager(Client):
1879
2485
 
1880
2486
  loop = asyncio.get_event_loop()
1881
2487
  response = loop.run_until_complete(
1882
- self._async_retrieve_instance_for_guid(guid, effective_time, for_lineage, for_duplicate_processing,
1883
- server_name, time_out))
2488
+ self._async_retrieve_instance_for_guid(
2489
+ guid,
2490
+ effective_time,
2491
+ for_lineage,
2492
+ for_duplicate_processing,
2493
+ server_name,
2494
+ time_out,
2495
+ )
2496
+ )
1884
2497
  return response
1885
2498
 
1886
2499
  #
1887
2500
  # Classification CRUD
1888
2501
  #
1889
2502
 
1890
- async def _async_set_confidence_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
1891
- for_duplicate_processing: bool = None, server_name: str = None,
1892
- time_out: int = default_time_out) -> None:
2503
+ async def _async_set_confidence_classification(
2504
+ self,
2505
+ element_guid: str,
2506
+ body: dict,
2507
+ for_lineage: bool = None,
2508
+ for_duplicate_processing: bool = None,
2509
+ server_name: str = None,
2510
+ time_out: int = default_time_out,
2511
+ ) -> None:
1893
2512
  """
1894
2513
  Classify/reclassify the element (typically an asset) to indicate the level of confidence that the organization
1895
2514
  has that the data is complete, accurate and up-to-date. The level of confidence is expressed by the
@@ -1951,16 +2570,30 @@ class ClassificationManager(Client):
1951
2570
  server_name = self.server_name
1952
2571
 
1953
2572
  possible_query_params = query_string(
1954
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
1955
-
1956
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidence"
1957
- f"{possible_query_params}")
1958
-
1959
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
1960
-
1961
- def set_confidence_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
1962
- for_duplicate_processing: bool = None, server_name: str = None,
1963
- time_out: int = default_time_out) -> None:
2573
+ [
2574
+ ("forLineage", for_lineage),
2575
+ ("forDuplicateProcessing", for_duplicate_processing),
2576
+ ]
2577
+ )
2578
+
2579
+ url = (
2580
+ f"{base_path(self, server_name)}/elements/{element_guid}/confidence"
2581
+ f"{possible_query_params}"
2582
+ )
2583
+
2584
+ await self._async_make_request(
2585
+ "POST", url, body_slimmer(body), time_out=time_out
2586
+ )
2587
+
2588
+ def set_confidence_classification(
2589
+ self,
2590
+ element_guid: str,
2591
+ body: dict,
2592
+ for_lineage: bool = None,
2593
+ for_duplicate_processing: bool = None,
2594
+ server_name: str = None,
2595
+ time_out: int = default_time_out,
2596
+ ) -> None:
1964
2597
  """
1965
2598
  Classify/reclassify the element (typically an asset) to indicate the level of confidence that the organization
1966
2599
  has that the data is complete, accurate and up-to-date. The level of confidence is expressed by the
@@ -2021,15 +2654,27 @@ class ClassificationManager(Client):
2021
2654
 
2022
2655
  loop = asyncio.get_event_loop()
2023
2656
  loop.run_until_complete(
2024
- self._async_set_confidence_classification(element_guid, body, for_lineage, for_duplicate_processing,
2025
- server_name, time_out))
2026
-
2027
- async def _async_clear_confidence_classification(self, element_guid: str, for_lineage: bool = None,
2028
- for_duplicate_processing: bool = None, effective_time: str = None,
2029
- server_name: str = None,
2030
- time_out: int = default_time_out) -> None:
2657
+ self._async_set_confidence_classification(
2658
+ element_guid,
2659
+ body,
2660
+ for_lineage,
2661
+ for_duplicate_processing,
2662
+ server_name,
2663
+ time_out,
2664
+ )
2665
+ )
2666
+
2667
+ async def _async_clear_confidence_classification(
2668
+ self,
2669
+ element_guid: str,
2670
+ for_lineage: bool = None,
2671
+ for_duplicate_processing: bool = None,
2672
+ effective_time: str = None,
2673
+ server_name: str = None,
2674
+ time_out: int = default_time_out,
2675
+ ) -> None:
2031
2676
  """
2032
- Remove the confidence classification from the element. This normally occurs when the organization has lost
2677
+ Remove the confidence classification from the element. This normally occurs when the organization has lost
2033
2678
  track of the level of confidence to assign to the element. Async Version.
2034
2679
 
2035
2680
  Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
@@ -2069,24 +2714,34 @@ class ClassificationManager(Client):
2069
2714
  server_name = self.server_name
2070
2715
 
2071
2716
  possible_query_params = query_string(
2072
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2073
-
2074
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidence/remove"
2075
- f"{possible_query_params}")
2076
- body = {
2077
- "class": "ClassificationRequestBody",
2078
- "effectiveTime": effective_time
2079
- }
2080
-
2081
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2082
-
2083
- def clear_confidence_classification(self, element_guid: str, for_lineage: bool = None,
2084
- for_duplicate_processing: bool = None, effective_time: str = None,
2085
- server_name: str = None,
2086
- time_out: int = default_time_out) -> None:
2717
+ [
2718
+ ("forLineage", for_lineage),
2719
+ ("forDuplicateProcessing", for_duplicate_processing),
2720
+ ]
2721
+ )
2722
+
2723
+ url = (
2724
+ f"{base_path(self, server_name)}/elements/{element_guid}/confidence/remove"
2725
+ f"{possible_query_params}"
2726
+ )
2727
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
2728
+
2729
+ await self._async_make_request(
2730
+ "POST", url, body_slimmer(body), time_out=time_out
2731
+ )
2732
+
2733
+ def clear_confidence_classification(
2734
+ self,
2735
+ element_guid: str,
2736
+ for_lineage: bool = None,
2737
+ for_duplicate_processing: bool = None,
2738
+ effective_time: str = None,
2739
+ server_name: str = None,
2740
+ time_out: int = default_time_out,
2741
+ ) -> None:
2087
2742
  """
2088
- Remove the confidence classification from the element. This normally occurs when the organization has lost
2089
- track of the level of confidence to assign to the element.
2743
+ Remove the confidence classification from the element. This normally occurs when the organization has lost
2744
+ track of the level of confidence to assign to the element.
2090
2745
 
2091
2746
  Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
2092
2747
 
@@ -2124,12 +2779,25 @@ class ClassificationManager(Client):
2124
2779
 
2125
2780
  loop = asyncio.get_event_loop()
2126
2781
  loop.run_until_complete(
2127
- self._async_clear_confidence_classification(element_guid, for_lineage, for_duplicate_processing,
2128
- effective_time, server_name, time_out))
2129
-
2130
- async def _async_set_confidentiality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
2131
- for_duplicate_processing: bool = None, server_name: str = None,
2132
- time_out: int = default_time_out) -> None:
2782
+ self._async_clear_confidence_classification(
2783
+ element_guid,
2784
+ for_lineage,
2785
+ for_duplicate_processing,
2786
+ effective_time,
2787
+ server_name,
2788
+ time_out,
2789
+ )
2790
+ )
2791
+
2792
+ async def _async_set_confidentiality_classification(
2793
+ self,
2794
+ element_guid: str,
2795
+ body: dict,
2796
+ for_lineage: bool = None,
2797
+ for_duplicate_processing: bool = None,
2798
+ server_name: str = None,
2799
+ time_out: int = default_time_out,
2800
+ ) -> None:
2133
2801
  """
2134
2802
  Classify/reclassify the element (typically a data field, schema attribute or glossary term) to indicate the
2135
2803
  level of confidentiality that any data associated with the element should be given. If the classification is
@@ -2193,16 +2861,30 @@ class ClassificationManager(Client):
2193
2861
  server_name = self.server_name
2194
2862
 
2195
2863
  possible_query_params = query_string(
2196
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2197
-
2198
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality"
2199
- f"{possible_query_params}")
2200
-
2201
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2202
-
2203
- def set_confidentiality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
2204
- for_duplicate_processing: bool = None, server_name: str = None,
2205
- time_out: int = default_time_out) -> None:
2864
+ [
2865
+ ("forLineage", for_lineage),
2866
+ ("forDuplicateProcessing", for_duplicate_processing),
2867
+ ]
2868
+ )
2869
+
2870
+ url = (
2871
+ f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality"
2872
+ f"{possible_query_params}"
2873
+ )
2874
+
2875
+ await self._async_make_request(
2876
+ "POST", url, body_slimmer(body), time_out=time_out
2877
+ )
2878
+
2879
+ def set_confidentiality_classification(
2880
+ self,
2881
+ element_guid: str,
2882
+ body: dict,
2883
+ for_lineage: bool = None,
2884
+ for_duplicate_processing: bool = None,
2885
+ server_name: str = None,
2886
+ time_out: int = default_time_out,
2887
+ ) -> None:
2206
2888
  """
2207
2889
  Classify/reclassify the element (typically a data field, schema attribute or glossary term) to indicate the
2208
2890
  level of confidentiality that any data associated with the element should be given. If the classification is
@@ -2265,16 +2947,27 @@ class ClassificationManager(Client):
2265
2947
 
2266
2948
  loop = asyncio.get_event_loop()
2267
2949
  loop.run_until_complete(
2268
- self._async_set_confidentiality_classification(element_guid, body, for_lineage, for_duplicate_processing,
2269
- server_name, time_out))
2270
-
2271
- async def _async_clear_confidentiality_classification(self, element_guid: str, for_lineage: bool = None,
2272
- for_duplicate_processing: bool = None,
2273
- effective_time: str = None,
2274
- server_name: str = None,
2275
- time_out: int = default_time_out) -> None:
2950
+ self._async_set_confidentiality_classification(
2951
+ element_guid,
2952
+ body,
2953
+ for_lineage,
2954
+ for_duplicate_processing,
2955
+ server_name,
2956
+ time_out,
2957
+ )
2958
+ )
2959
+
2960
+ async def _async_clear_confidentiality_classification(
2961
+ self,
2962
+ element_guid: str,
2963
+ for_lineage: bool = None,
2964
+ for_duplicate_processing: bool = None,
2965
+ effective_time: str = None,
2966
+ server_name: str = None,
2967
+ time_out: int = default_time_out,
2968
+ ) -> None:
2276
2969
  """
2277
- Remove the confidentiality classification from the element. This normally occurs when the organization has lost
2970
+ Remove the confidentiality classification from the element. This normally occurs when the organization has lost
2278
2971
  track of the level of confidentiality to assign to the element. Async Version.
2279
2972
 
2280
2973
  Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
@@ -2314,25 +3007,35 @@ class ClassificationManager(Client):
2314
3007
  server_name = self.server_name
2315
3008
 
2316
3009
  possible_query_params = query_string(
2317
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2318
-
2319
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality/remove"
2320
- f"{possible_query_params}")
2321
-
2322
- body = {
2323
- "class": "ClassificationRequestBody",
2324
- "effectiveTime": effective_time
2325
- }
2326
-
2327
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2328
-
2329
- def clear_confidentiality_classification(self, element_guid: str, for_lineage: bool = None,
2330
- for_duplicate_processing: bool = None, effective_time: str = None,
2331
- server_name: str = None,
2332
- time_out: int = default_time_out) -> None:
3010
+ [
3011
+ ("forLineage", for_lineage),
3012
+ ("forDuplicateProcessing", for_duplicate_processing),
3013
+ ]
3014
+ )
3015
+
3016
+ url = (
3017
+ f"{base_path(self, server_name)}/elements/{element_guid}/confidentiality/remove"
3018
+ f"{possible_query_params}"
3019
+ )
3020
+
3021
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
3022
+
3023
+ await self._async_make_request(
3024
+ "POST", url, body_slimmer(body), time_out=time_out
3025
+ )
3026
+
3027
+ def clear_confidentiality_classification(
3028
+ self,
3029
+ element_guid: str,
3030
+ for_lineage: bool = None,
3031
+ for_duplicate_processing: bool = None,
3032
+ effective_time: str = None,
3033
+ server_name: str = None,
3034
+ time_out: int = default_time_out,
3035
+ ) -> None:
2333
3036
  """
2334
- Remove the confidentiality classification from the element. This normally occurs when the organization has lost
2335
- track of the level of confidentiality to assign to the element.
3037
+ Remove the confidentiality classification from the element. This normally occurs when the organization has lost
3038
+ track of the level of confidentiality to assign to the element.
2336
3039
 
2337
3040
  Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
2338
3041
 
@@ -2370,12 +3073,25 @@ class ClassificationManager(Client):
2370
3073
 
2371
3074
  loop = asyncio.get_event_loop()
2372
3075
  loop.run_until_complete(
2373
- self._async_clear_confidentiality_classification(element_guid, for_lineage, for_duplicate_processing,
2374
- effective_time, server_name, time_out))
2375
-
2376
- async def _async_set_criticality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
2377
- for_duplicate_processing: bool = None, server_name: str = None,
2378
- time_out: int = default_time_out) -> None:
3076
+ self._async_clear_confidentiality_classification(
3077
+ element_guid,
3078
+ for_lineage,
3079
+ for_duplicate_processing,
3080
+ effective_time,
3081
+ server_name,
3082
+ time_out,
3083
+ )
3084
+ )
3085
+
3086
+ async def _async_set_criticality_classification(
3087
+ self,
3088
+ element_guid: str,
3089
+ body: dict,
3090
+ for_lineage: bool = None,
3091
+ for_duplicate_processing: bool = None,
3092
+ server_name: str = None,
3093
+ time_out: int = default_time_out,
3094
+ ) -> None:
2379
3095
  """
2380
3096
  Classify/reclassify the element (typically an asset) to indicate how critical the element (or
2381
3097
  associated resource) is to the organization. The level of criticality is expressed by the levelIdentifier
@@ -2437,16 +3153,30 @@ class ClassificationManager(Client):
2437
3153
  server_name = self.server_name
2438
3154
 
2439
3155
  possible_query_params = query_string(
2440
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2441
-
2442
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/criticality"
2443
- f"{possible_query_params}")
2444
-
2445
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2446
-
2447
- def set_criticality_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
2448
- for_duplicate_processing: bool = None, server_name: str = None,
2449
- time_out: int = default_time_out) -> None:
3156
+ [
3157
+ ("forLineage", for_lineage),
3158
+ ("forDuplicateProcessing", for_duplicate_processing),
3159
+ ]
3160
+ )
3161
+
3162
+ url = (
3163
+ f"{base_path(self, server_name)}/elements/{element_guid}/criticality"
3164
+ f"{possible_query_params}"
3165
+ )
3166
+
3167
+ await self._async_make_request(
3168
+ "POST", url, body_slimmer(body), time_out=time_out
3169
+ )
3170
+
3171
+ def set_criticality_classification(
3172
+ self,
3173
+ element_guid: str,
3174
+ body: dict,
3175
+ for_lineage: bool = None,
3176
+ for_duplicate_processing: bool = None,
3177
+ server_name: str = None,
3178
+ time_out: int = default_time_out,
3179
+ ) -> None:
2450
3180
  """
2451
3181
  Classify/reclassify the element (typically an asset) to indicate how critical the element (or
2452
3182
  associated resource) is to the organization. The level of criticality is expressed by the levelIdentifier
@@ -2507,13 +3237,25 @@ class ClassificationManager(Client):
2507
3237
 
2508
3238
  loop = asyncio.get_event_loop()
2509
3239
  loop.run_until_complete(
2510
- self._async_set_criticality_classification(element_guid, body, for_lineage, for_duplicate_processing,
2511
- server_name, time_out))
2512
-
2513
- async def _async_clear_criticality_classification(self, element_guid: str, for_lineage: bool = None,
2514
- for_duplicate_processing: bool = None, effective_time: str = None,
2515
- server_name: str = None,
2516
- time_out: int = default_time_out) -> None:
3240
+ self._async_set_criticality_classification(
3241
+ element_guid,
3242
+ body,
3243
+ for_lineage,
3244
+ for_duplicate_processing,
3245
+ server_name,
3246
+ time_out,
3247
+ )
3248
+ )
3249
+
3250
+ async def _async_clear_criticality_classification(
3251
+ self,
3252
+ element_guid: str,
3253
+ for_lineage: bool = None,
3254
+ for_duplicate_processing: bool = None,
3255
+ effective_time: str = None,
3256
+ server_name: str = None,
3257
+ time_out: int = default_time_out,
3258
+ ) -> None:
2517
3259
  """
2518
3260
  Remove the criticality classification from the element. This normally occurs when the organization has lost
2519
3261
  track of the level of criticality to assign to the element. Async Version.
@@ -2555,22 +3297,32 @@ class ClassificationManager(Client):
2555
3297
  server_name = self.server_name
2556
3298
 
2557
3299
  possible_query_params = query_string(
2558
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2559
-
2560
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/criticality/remove"
2561
- f"{possible_query_params}")
2562
-
2563
- body = {
2564
- "class": "ClassificationRequestBody",
2565
- "effectiveTime": effective_time
2566
- }
2567
-
2568
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2569
-
2570
- def clear_criticality_classification(self, element_guid: str, for_lineage: bool = None,
2571
- for_duplicate_processing: bool = None, effective_time: str = None,
2572
- server_name: str = None,
2573
- time_out: int = default_time_out) -> None:
3300
+ [
3301
+ ("forLineage", for_lineage),
3302
+ ("forDuplicateProcessing", for_duplicate_processing),
3303
+ ]
3304
+ )
3305
+
3306
+ url = (
3307
+ f"{base_path(self, server_name)}/elements/{element_guid}/criticality/remove"
3308
+ f"{possible_query_params}"
3309
+ )
3310
+
3311
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
3312
+
3313
+ await self._async_make_request(
3314
+ "POST", url, body_slimmer(body), time_out=time_out
3315
+ )
3316
+
3317
+ def clear_criticality_classification(
3318
+ self,
3319
+ element_guid: str,
3320
+ for_lineage: bool = None,
3321
+ for_duplicate_processing: bool = None,
3322
+ effective_time: str = None,
3323
+ server_name: str = None,
3324
+ time_out: int = default_time_out,
3325
+ ) -> None:
2574
3326
  """
2575
3327
  Remove the criticality classification from the element. This normally occurs when the organization has lost
2576
3328
  track of the level of criticality to assign to the element.
@@ -2611,13 +3363,26 @@ class ClassificationManager(Client):
2611
3363
 
2612
3364
  loop = asyncio.get_event_loop()
2613
3365
  loop.run_until_complete(
2614
- self._async_clear_criticality_classification(element_guid, for_lineage, for_duplicate_processing,
2615
- effective_time, server_name, time_out))
2616
-
2617
- async def _async_add_gov_definition_to_element(self, definition_guid: str, element_guid: str,
2618
- effective_time: str = None, for_lineage: bool = None,
2619
- for_duplicate_processing: bool = None, server_name: str = None,
2620
- time_out: int = default_time_out) -> None:
3366
+ self._async_clear_criticality_classification(
3367
+ element_guid,
3368
+ for_lineage,
3369
+ for_duplicate_processing,
3370
+ effective_time,
3371
+ server_name,
3372
+ time_out,
3373
+ )
3374
+ )
3375
+
3376
+ async def _async_add_gov_definition_to_element(
3377
+ self,
3378
+ definition_guid: str,
3379
+ element_guid: str,
3380
+ effective_time: str = None,
3381
+ for_lineage: bool = None,
3382
+ for_duplicate_processing: bool = None,
3383
+ server_name: str = None,
3384
+ time_out: int = default_time_out,
3385
+ ) -> None:
2621
3386
  """
2622
3387
  Link a governance definition to an element using the GovernedBy relationship. Async version.
2623
3388
 
@@ -2658,18 +3423,33 @@ class ClassificationManager(Client):
2658
3423
  server_name = self.server_name
2659
3424
 
2660
3425
  possible_query_params = query_string(
2661
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3426
+ [
3427
+ ("forLineage", for_lineage),
3428
+ ("forDuplicateProcessing", for_duplicate_processing),
3429
+ ]
3430
+ )
2662
3431
 
2663
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/{definition_guid}"
2664
- f"{possible_query_params}")
3432
+ url = (
3433
+ f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/{definition_guid}"
3434
+ f"{possible_query_params}"
3435
+ )
2665
3436
 
2666
3437
  body = {"class": "RelationshipRequestBody", "effectiveTime": effective_time}
2667
3438
 
2668
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2669
-
2670
- def add_gov_definition_to_element(self, definition_guid: str, element_guid: str, effective_time: str = None,
2671
- for_lineage: bool = None, for_duplicate_processing: bool = None,
2672
- server_name: str = None, time_out: int = default_time_out) -> None:
3439
+ await self._async_make_request(
3440
+ "POST", url, body_slimmer(body), time_out=time_out
3441
+ )
3442
+
3443
+ def add_gov_definition_to_element(
3444
+ self,
3445
+ definition_guid: str,
3446
+ element_guid: str,
3447
+ effective_time: str = None,
3448
+ for_lineage: bool = None,
3449
+ for_duplicate_processing: bool = None,
3450
+ server_name: str = None,
3451
+ time_out: int = default_time_out,
3452
+ ) -> None:
2673
3453
  """
2674
3454
  Link a governance definition to an element using the GovernedBy relationship.
2675
3455
 
@@ -2709,13 +3489,27 @@ class ClassificationManager(Client):
2709
3489
 
2710
3490
  loop = asyncio.get_event_loop()
2711
3491
  loop.run_until_complete(
2712
- self._async_add_gov_definition_to_element(definition_guid, element_guid, effective_time, for_lineage,
2713
- for_duplicate_processing, server_name, time_out))
2714
-
2715
- async def _async_clear_gov_definition_from_element(self, definition_guid, element_guid: str,
2716
- for_lineage: bool = None, for_duplicate_processing: bool = None,
2717
- effective_time: str = None, server_name: str = None,
2718
- time_out: int = default_time_out) -> None:
3492
+ self._async_add_gov_definition_to_element(
3493
+ definition_guid,
3494
+ element_guid,
3495
+ effective_time,
3496
+ for_lineage,
3497
+ for_duplicate_processing,
3498
+ server_name,
3499
+ time_out,
3500
+ )
3501
+ )
3502
+
3503
+ async def _async_clear_gov_definition_from_element(
3504
+ self,
3505
+ definition_guid,
3506
+ element_guid: str,
3507
+ for_lineage: bool = None,
3508
+ for_duplicate_processing: bool = None,
3509
+ effective_time: str = None,
3510
+ server_name: str = None,
3511
+ time_out: int = default_time_out,
3512
+ ) -> None:
2719
3513
  """
2720
3514
  Remove the GovernedBy relationship between a governance definition and an element. Async Version.
2721
3515
 
@@ -2758,22 +3552,33 @@ class ClassificationManager(Client):
2758
3552
  server_name = self.server_name
2759
3553
 
2760
3554
  possible_query_params = query_string(
2761
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2762
-
2763
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/"
2764
- f"{definition_guid}/remove{possible_query_params}")
2765
-
2766
- body = {
2767
- "class": "ClassificationRequestBody",
2768
- "effectiveTime": effective_time
2769
- }
2770
-
2771
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2772
-
2773
- def clear_gov_definition_from_element(self, definition_guid, element_guid: str, for_lineage: bool = None,
2774
- for_duplicate_processing: bool = None, effective_time: str = None,
2775
- server_name: str = None,
2776
- time_out: int = default_time_out) -> None:
3555
+ [
3556
+ ("forLineage", for_lineage),
3557
+ ("forDuplicateProcessing", for_duplicate_processing),
3558
+ ]
3559
+ )
3560
+
3561
+ url = (
3562
+ f"{base_path(self, server_name)}/elements/{element_guid}/governed-by/definition/"
3563
+ f"{definition_guid}/remove{possible_query_params}"
3564
+ )
3565
+
3566
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
3567
+
3568
+ await self._async_make_request(
3569
+ "POST", url, body_slimmer(body), time_out=time_out
3570
+ )
3571
+
3572
+ def clear_gov_definition_from_element(
3573
+ self,
3574
+ definition_guid,
3575
+ element_guid: str,
3576
+ for_lineage: bool = None,
3577
+ for_duplicate_processing: bool = None,
3578
+ effective_time: str = None,
3579
+ server_name: str = None,
3580
+ time_out: int = default_time_out,
3581
+ ) -> None:
2777
3582
  """
2778
3583
  Remove the GovernedBy relationship between a governance definition and an element. Async Version.
2779
3584
 
@@ -2815,12 +3620,25 @@ class ClassificationManager(Client):
2815
3620
 
2816
3621
  loop = asyncio.get_event_loop()
2817
3622
  loop.run_until_complete(
2818
- self._async_clear_criticality_classification(element_guid, for_lineage, for_duplicate_processing,
2819
- effective_time, server_name, time_out))
2820
-
2821
- async def _async_add_ownership_to_element(self, element_guid: str, body: dict, for_lineage: bool = None,
2822
- for_duplicate_processing: bool = None, server_name: str = None,
2823
- time_out: int = default_time_out) -> None:
3623
+ self._async_clear_criticality_classification(
3624
+ element_guid,
3625
+ for_lineage,
3626
+ for_duplicate_processing,
3627
+ effective_time,
3628
+ server_name,
3629
+ time_out,
3630
+ )
3631
+ )
3632
+
3633
+ async def _async_add_ownership_to_element(
3634
+ self,
3635
+ element_guid: str,
3636
+ body: dict,
3637
+ for_lineage: bool = None,
3638
+ for_duplicate_processing: bool = None,
3639
+ server_name: str = None,
3640
+ time_out: int = default_time_out,
3641
+ ) -> None:
2824
3642
  """
2825
3643
  Add or replace the ownership classification for an element. Async version.
2826
3644
 
@@ -2873,16 +3691,30 @@ class ClassificationManager(Client):
2873
3691
  server_name = self.server_name
2874
3692
 
2875
3693
  possible_query_params = query_string(
2876
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2877
-
2878
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/ownership"
2879
- f"{possible_query_params}")
2880
-
2881
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2882
-
2883
- def add_ownership_to_element(self, element_guid: str, body: dict, for_lineage: bool = None,
2884
- for_duplicate_processing: bool = None, server_name: str = None,
2885
- time_out: int = default_time_out) -> None:
3694
+ [
3695
+ ("forLineage", for_lineage),
3696
+ ("forDuplicateProcessing", for_duplicate_processing),
3697
+ ]
3698
+ )
3699
+
3700
+ url = (
3701
+ f"{base_path(self, server_name)}/elements/{element_guid}/ownership"
3702
+ f"{possible_query_params}"
3703
+ )
3704
+
3705
+ await self._async_make_request(
3706
+ "POST", url, body_slimmer(body), time_out=time_out
3707
+ )
3708
+
3709
+ def add_ownership_to_element(
3710
+ self,
3711
+ element_guid: str,
3712
+ body: dict,
3713
+ for_lineage: bool = None,
3714
+ for_duplicate_processing: bool = None,
3715
+ server_name: str = None,
3716
+ time_out: int = default_time_out,
3717
+ ) -> None:
2886
3718
  """
2887
3719
  Add or replace the ownership classification for an element.
2888
3720
 
@@ -2934,13 +3766,25 @@ class ClassificationManager(Client):
2934
3766
 
2935
3767
  loop = asyncio.get_event_loop()
2936
3768
  loop.run_until_complete(
2937
- self._async_add_ownership_to_element(element_guid, body, for_lineage, for_duplicate_processing, server_name,
2938
- time_out))
2939
-
2940
- async def _async_clear_ownership_from_element(self, element_guid: str, for_lineage: bool = None,
2941
- for_duplicate_processing: bool = None, effective_time: str = None,
2942
- server_name: str = None,
2943
- time_out: int = default_time_out) -> None:
3769
+ self._async_add_ownership_to_element(
3770
+ element_guid,
3771
+ body,
3772
+ for_lineage,
3773
+ for_duplicate_processing,
3774
+ server_name,
3775
+ time_out,
3776
+ )
3777
+ )
3778
+
3779
+ async def _async_clear_ownership_from_element(
3780
+ self,
3781
+ element_guid: str,
3782
+ for_lineage: bool = None,
3783
+ for_duplicate_processing: bool = None,
3784
+ effective_time: str = None,
3785
+ server_name: str = None,
3786
+ time_out: int = default_time_out,
3787
+ ) -> None:
2944
3788
  """
2945
3789
  Remove the ownership classification from an element. Async version.
2946
3790
 
@@ -2980,22 +3824,32 @@ class ClassificationManager(Client):
2980
3824
  server_name = self.server_name
2981
3825
 
2982
3826
  possible_query_params = query_string(
2983
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
2984
-
2985
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/ownership/remove"
2986
- f"{possible_query_params}")
2987
-
2988
- body = {
2989
- "class": "ClassificationRequestBody",
2990
- "effectiveTime": effective_time
2991
- }
2992
-
2993
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
2994
-
2995
- def clear_ownership_from_element(self, element_guid: str, for_lineage: bool = None,
2996
- for_duplicate_processing: bool = None, effective_time: str = None,
2997
- server_name: str = None,
2998
- time_out: int = default_time_out) -> None:
3827
+ [
3828
+ ("forLineage", for_lineage),
3829
+ ("forDuplicateProcessing", for_duplicate_processing),
3830
+ ]
3831
+ )
3832
+
3833
+ url = (
3834
+ f"{base_path(self, server_name)}/elements/{element_guid}/ownership/remove"
3835
+ f"{possible_query_params}"
3836
+ )
3837
+
3838
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
3839
+
3840
+ await self._async_make_request(
3841
+ "POST", url, body_slimmer(body), time_out=time_out
3842
+ )
3843
+
3844
+ def clear_ownership_from_element(
3845
+ self,
3846
+ element_guid: str,
3847
+ for_lineage: bool = None,
3848
+ for_duplicate_processing: bool = None,
3849
+ effective_time: str = None,
3850
+ server_name: str = None,
3851
+ time_out: int = default_time_out,
3852
+ ) -> None:
2999
3853
  """
3000
3854
  Remove the ownership classification from an element.
3001
3855
 
@@ -3034,13 +3888,25 @@ class ClassificationManager(Client):
3034
3888
 
3035
3889
  loop = asyncio.get_event_loop()
3036
3890
  loop.run_until_complete(
3037
- self._async_clear_ownership_from_element(element_guid, for_lineage, for_duplicate_processing,
3038
- effective_time, server_name,
3039
- time_out))
3040
-
3041
- async def _async_set_retention_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
3042
- for_duplicate_processing: bool = None, server_name: str = None,
3043
- time_out: int = default_time_out) -> None:
3891
+ self._async_clear_ownership_from_element(
3892
+ element_guid,
3893
+ for_lineage,
3894
+ for_duplicate_processing,
3895
+ effective_time,
3896
+ server_name,
3897
+ time_out,
3898
+ )
3899
+ )
3900
+
3901
+ async def _async_set_retention_classification(
3902
+ self,
3903
+ element_guid: str,
3904
+ body: dict,
3905
+ for_lineage: bool = None,
3906
+ for_duplicate_processing: bool = None,
3907
+ server_name: str = None,
3908
+ time_out: int = default_time_out,
3909
+ ) -> None:
3044
3910
  """
3045
3911
  Classify/reclassify the element (typically an asset) to indicate how long the element (or associated resource)
3046
3912
  is to be retained by the organization. The policy to apply to the element/resource is captured by the retentionBasis
@@ -3106,16 +3972,30 @@ class ClassificationManager(Client):
3106
3972
  server_name = self.server_name
3107
3973
 
3108
3974
  possible_query_params = query_string(
3109
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3110
-
3111
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/retention"
3112
- f"{possible_query_params}")
3113
-
3114
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3115
-
3116
- def set_retention_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
3117
- for_duplicate_processing: bool = None, server_name: str = None,
3118
- time_out: int = default_time_out) -> None:
3975
+ [
3976
+ ("forLineage", for_lineage),
3977
+ ("forDuplicateProcessing", for_duplicate_processing),
3978
+ ]
3979
+ )
3980
+
3981
+ url = (
3982
+ f"{base_path(self, server_name)}/elements/{element_guid}/retention"
3983
+ f"{possible_query_params}"
3984
+ )
3985
+
3986
+ await self._async_make_request(
3987
+ "POST", url, body_slimmer(body), time_out=time_out
3988
+ )
3989
+
3990
+ def set_retention_classification(
3991
+ self,
3992
+ element_guid: str,
3993
+ body: dict,
3994
+ for_lineage: bool = None,
3995
+ for_duplicate_processing: bool = None,
3996
+ server_name: str = None,
3997
+ time_out: int = default_time_out,
3998
+ ) -> None:
3119
3999
  """
3120
4000
  Classify/reclassify the element (typically an asset) to indicate how long the element (or associated resource)
3121
4001
  is to be retained by the organization. The policy to apply to the element/resource is captured by the retentionBasis
@@ -3179,76 +4059,98 @@ class ClassificationManager(Client):
3179
4059
 
3180
4060
  loop = asyncio.get_event_loop()
3181
4061
  loop.run_until_complete(
3182
- self._async_set_retention_classification(element_guid, body, for_lineage, for_duplicate_processing,
3183
- server_name, time_out))
3184
-
3185
- async def _async_clear_retention_classification(self, element_guid: str, for_lineage: bool = None,
3186
- for_duplicate_processing: bool = None, effective_time: str = None,
3187
- server_name: str = None,
3188
- time_out: int = default_time_out) -> None:
4062
+ self._async_set_retention_classification(
4063
+ element_guid,
4064
+ body,
4065
+ for_lineage,
4066
+ for_duplicate_processing,
4067
+ server_name,
4068
+ time_out,
4069
+ )
4070
+ )
4071
+
4072
+ async def _async_clear_retention_classification(
4073
+ self,
4074
+ element_guid: str,
4075
+ for_lineage: bool = None,
4076
+ for_duplicate_processing: bool = None,
4077
+ effective_time: str = None,
4078
+ server_name: str = None,
4079
+ time_out: int = default_time_out,
4080
+ ) -> None:
3189
4081
  """
3190
- Remove the retention classification from the element. This normally occurs when the organization has lost
3191
- track of the level of retention to assign to the element. Async Version.
4082
+ Remove the retention classification from the element. This normally occurs when the organization has lost
4083
+ track of the level of retention to assign to the element. Async Version.
3192
4084
 
3193
- Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
4085
+ Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
3194
4086
 
3195
- Parameters
3196
- ----------
3197
- element_guid: str
3198
- - the identity of the element to update
3199
- for_lineage: bool, default is set by server
3200
- - determines if elements classified as Memento should be returned - normally false
3201
- for_duplicate_processing: bool, default is set by server
3202
- - Normally false. Set true when the caller is part of a deduplication function
3203
- effective_time: str, default = None
3204
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
3205
- server_name: str, default = None
3206
- - name of the server instances for this request.
3207
- time_out: int, default = default_time_out
3208
- - http request timeout for this request
4087
+ Parameters
4088
+ ----------
4089
+ element_guid: str
4090
+ - the identity of the element to update
4091
+ for_lineage: bool, default is set by server
4092
+ - determines if elements classified as Memento should be returned - normally false
4093
+ for_duplicate_processing: bool, default is set by server
4094
+ - Normally false. Set true when the caller is part of a deduplication function
4095
+ effective_time: str, default = None
4096
+ - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
4097
+ server_name: str, default = None
4098
+ - name of the server instances for this request.
4099
+ time_out: int, default = default_time_out
4100
+ - http request timeout for this request
3209
4101
 
3210
- Returns
3211
- -------
3212
- [dict] | str
3213
- Returns a string if no elements found and a list of dict of elements with the results.
4102
+ Returns
4103
+ -------
4104
+ [dict] | str
4105
+ Returns a string if no elements found and a list of dict of elements with the results.
3214
4106
 
3215
- Raises
3216
- ------
3217
- InvalidParameterException
3218
- one of the parameters is null or invalid or
3219
- PropertyServerException
3220
- There is a problem adding the element properties to the metadata repository or
3221
- UserNotAuthorizedException
3222
- the requesting user is not authorized to issue this request.
4107
+ Raises
4108
+ ------
4109
+ InvalidParameterException
4110
+ one of the parameters is null or invalid or
4111
+ PropertyServerException
4112
+ There is a problem adding the element properties to the metadata repository or
4113
+ UserNotAuthorizedException
4114
+ the requesting user is not authorized to issue this request.
3223
4115
 
3224
4116
 
3225
- """
4117
+ """
3226
4118
  if server_name is None:
3227
4119
  server_name = self.server_name
3228
4120
 
3229
4121
  possible_query_params = query_string(
3230
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3231
-
3232
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/retention/remove"
3233
- f"{possible_query_params}")
3234
-
3235
- body = {
3236
- "class": "ClassificationRequestBody",
3237
- "effectiveTime": effective_time
3238
- }
3239
-
3240
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3241
-
3242
- def clear_retention_classification(self, element_guid: str, for_lineage: bool = None,
3243
- for_duplicate_processing: bool = None, effective_time: str = None,
3244
- server_name: str = None,
3245
- time_out: int = default_time_out) -> None:
4122
+ [
4123
+ ("forLineage", for_lineage),
4124
+ ("forDuplicateProcessing", for_duplicate_processing),
4125
+ ]
4126
+ )
4127
+
4128
+ url = (
4129
+ f"{base_path(self, server_name)}/elements/{element_guid}/retention/remove"
4130
+ f"{possible_query_params}"
4131
+ )
4132
+
4133
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
4134
+
4135
+ await self._async_make_request(
4136
+ "POST", url, body_slimmer(body), time_out=time_out
4137
+ )
4138
+
4139
+ def clear_retention_classification(
4140
+ self,
4141
+ element_guid: str,
4142
+ for_lineage: bool = None,
4143
+ for_duplicate_processing: bool = None,
4144
+ effective_time: str = None,
4145
+ server_name: str = None,
4146
+ time_out: int = default_time_out,
4147
+ ) -> None:
3246
4148
  """
3247
4149
  Remove the retention classification from the element. This normally occurs when the organization has lost
3248
4150
  track of the level of retention to assign to the element.
3249
-
4151
+
3250
4152
  Governance Action Classifications: https://egeria-project.org/types/4/0422-Governance-Action-Classifications/
3251
-
4153
+
3252
4154
  Parameters
3253
4155
  ----------
3254
4156
  element_guid: str
@@ -3263,12 +4165,12 @@ class ClassificationManager(Client):
3263
4165
  - name of the server instances for this request.
3264
4166
  time_out: int, default = default_time_out
3265
4167
  - http request timeout for this request
3266
-
4168
+
3267
4169
  Returns
3268
4170
  -------
3269
4171
  [dict] | str
3270
4172
  Returns a string if no elements found and a list of dict of elements with the results.
3271
-
4173
+
3272
4174
  Raises
3273
4175
  ------
3274
4176
  InvalidParameterException
@@ -3277,19 +4179,31 @@ class ClassificationManager(Client):
3277
4179
  There is a problem adding the element properties to the metadata repository or
3278
4180
  UserNotAuthorizedException
3279
4181
  the requesting user is not authorized to issue this request.
3280
-
3281
-
4182
+
4183
+
3282
4184
  """
3283
4185
 
3284
4186
  loop = asyncio.get_event_loop()
3285
4187
  loop.run_until_complete(
3286
- self._async_clear_retention_classification(element_guid, for_lineage, for_duplicate_processing,
3287
- effective_time, server_name,
3288
- time_out))
3289
-
3290
- async def _async_set_security_tags_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
3291
- for_duplicate_processing: bool = None, server_name: str = None,
3292
- time_out: int = default_time_out) -> None:
4188
+ self._async_clear_retention_classification(
4189
+ element_guid,
4190
+ for_lineage,
4191
+ for_duplicate_processing,
4192
+ effective_time,
4193
+ server_name,
4194
+ time_out,
4195
+ )
4196
+ )
4197
+
4198
+ async def _async_set_security_tags_classification(
4199
+ self,
4200
+ element_guid: str,
4201
+ body: dict,
4202
+ for_lineage: bool = None,
4203
+ for_duplicate_processing: bool = None,
4204
+ server_name: str = None,
4205
+ time_out: int = default_time_out,
4206
+ ) -> None:
3293
4207
  """
3294
4208
  Add or replace the security tags for an element. Async versuib,
3295
4209
 
@@ -3351,16 +4265,30 @@ class ClassificationManager(Client):
3351
4265
  server_name = self.server_name
3352
4266
 
3353
4267
  possible_query_params = query_string(
3354
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3355
-
3356
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/security-tags"
3357
- f"{possible_query_params}")
3358
-
3359
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3360
-
3361
- def set_security_tags_classification(self, element_guid: str, body: dict, for_lineage: bool = None,
3362
- for_duplicate_processing: bool = None, server_name: str = None,
3363
- time_out: int = default_time_out) -> None:
4268
+ [
4269
+ ("forLineage", for_lineage),
4270
+ ("forDuplicateProcessing", for_duplicate_processing),
4271
+ ]
4272
+ )
4273
+
4274
+ url = (
4275
+ f"{base_path(self, server_name)}/elements/{element_guid}/security-tags"
4276
+ f"{possible_query_params}"
4277
+ )
4278
+
4279
+ await self._async_make_request(
4280
+ "POST", url, body_slimmer(body), time_out=time_out
4281
+ )
4282
+
4283
+ def set_security_tags_classification(
4284
+ self,
4285
+ element_guid: str,
4286
+ body: dict,
4287
+ for_lineage: bool = None,
4288
+ for_duplicate_processing: bool = None,
4289
+ server_name: str = None,
4290
+ time_out: int = default_time_out,
4291
+ ) -> None:
3364
4292
  """
3365
4293
  Add or replace the security tags for an element. Async versuib,
3366
4294
 
@@ -3421,110 +4349,146 @@ class ClassificationManager(Client):
3421
4349
 
3422
4350
  loop = asyncio.get_event_loop()
3423
4351
  loop.run_until_complete(
3424
- self._async_set_security_tags_classification(element_guid, body, for_lineage, for_duplicate_processing,
3425
- server_name, time_out))
3426
-
3427
- async def _async_clear_security_tags_classification(self, element_guid: str, for_lineage: bool = None,
3428
- for_duplicate_processing: bool = None,
3429
- effective_time: str = None, server_name: str = None,
3430
- time_out: int = default_time_out) -> None:
4352
+ self._async_set_security_tags_classification(
4353
+ element_guid,
4354
+ body,
4355
+ for_lineage,
4356
+ for_duplicate_processing,
4357
+ server_name,
4358
+ time_out,
4359
+ )
4360
+ )
4361
+
4362
+ async def _async_clear_security_tags_classification(
4363
+ self,
4364
+ element_guid: str,
4365
+ for_lineage: bool = None,
4366
+ for_duplicate_processing: bool = None,
4367
+ effective_time: str = None,
4368
+ server_name: str = None,
4369
+ time_out: int = default_time_out,
4370
+ ) -> None:
3431
4371
  """
3432
- Remove the security-tags classification from the element.
4372
+ Remove the security-tags classification from the element.
3433
4373
 
3434
- Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
4374
+ Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
3435
4375
 
3436
- Parameters
3437
- ----------
3438
- element_guid: str
3439
- - the identity of the element to update
3440
- for_lineage: bool, default is set by server
3441
- - determines if elements classified as Memento should be returned - normally false
3442
- for_duplicate_processing: bool, default is set by server
3443
- - Normally false. Set true when the caller is part of a deduplication function
3444
- server_name: str, default = None
3445
- - name of the server instances for this request.
3446
- time_out: int, default = default_time_out
3447
- - http request timeout for this request
4376
+ Parameters
4377
+ ----------
4378
+ element_guid: str
4379
+ - the identity of the element to update
4380
+ for_lineage: bool, default is set by server
4381
+ - determines if elements classified as Memento should be returned - normally false
4382
+ for_duplicate_processing: bool, default is set by server
4383
+ - Normally false. Set true when the caller is part of a deduplication function
4384
+ server_name: str, default = None
4385
+ - name of the server instances for this request.
4386
+ time_out: int, default = default_time_out
4387
+ - http request timeout for this request
3448
4388
 
3449
- Returns
3450
- -------
3451
- None
4389
+ Returns
4390
+ -------
4391
+ None
3452
4392
 
3453
- Raises
3454
- ------
3455
- InvalidParameterException
3456
- one of the parameters is null or invalid or
3457
- PropertyServerException
3458
- There is a problem adding the element properties to the metadata repository or
3459
- UserNotAuthorizedException
3460
- the requesting user is not authorized to issue this request.
4393
+ Raises
4394
+ ------
4395
+ InvalidParameterException
4396
+ one of the parameters is null or invalid or
4397
+ PropertyServerException
4398
+ There is a problem adding the element properties to the metadata repository or
4399
+ UserNotAuthorizedException
4400
+ the requesting user is not authorized to issue this request.
3461
4401
 
3462
4402
 
3463
- """
4403
+ """
3464
4404
  if server_name is None:
3465
4405
  server_name = self.server_name
3466
4406
 
3467
4407
  possible_query_params = query_string(
3468
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3469
-
3470
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/security-tags/remove"
3471
- f"{possible_query_params}")
3472
-
3473
- body = {
3474
- "class": "ClassificationRequestBody",
3475
- "effectiveTime": effective_time
3476
- }
3477
-
3478
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3479
-
3480
- def clear_security_tags_classification(self, element_guid: str, for_lineage: bool = None,
3481
- for_duplicate_processing: bool = None, effective_time: str = None,
3482
- server_name: str = None,
3483
- time_out: int = default_time_out) -> None:
4408
+ [
4409
+ ("forLineage", for_lineage),
4410
+ ("forDuplicateProcessing", for_duplicate_processing),
4411
+ ]
4412
+ )
4413
+
4414
+ url = (
4415
+ f"{base_path(self, server_name)}/elements/{element_guid}/security-tags/remove"
4416
+ f"{possible_query_params}"
4417
+ )
4418
+
4419
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
4420
+
4421
+ await self._async_make_request(
4422
+ "POST", url, body_slimmer(body), time_out=time_out
4423
+ )
4424
+
4425
+ def clear_security_tags_classification(
4426
+ self,
4427
+ element_guid: str,
4428
+ for_lineage: bool = None,
4429
+ for_duplicate_processing: bool = None,
4430
+ effective_time: str = None,
4431
+ server_name: str = None,
4432
+ time_out: int = default_time_out,
4433
+ ) -> None:
3484
4434
  """
3485
- Remove the security-tags classification from the element.
4435
+ Remove the security-tags classification from the element.
3486
4436
 
3487
- Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
4437
+ Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
3488
4438
 
3489
- Parameters
3490
- ----------
3491
- element_guid: str
3492
- - the identity of the element to update
3493
- for_lineage: bool, default is set by server
3494
- - determines if elements classified as Memento should be returned - normally false
3495
- for_duplicate_processing: bool, default is set by server
3496
- - Normally false. Set true when the caller is part of a deduplication function
3497
- effective_time: str, default = None
3498
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
3499
- server_name: str, default = None
3500
- - name of the server instances for this request.
3501
- time_out: int, default = default_time_out
3502
- - http request timeout for this request
4439
+ Parameters
4440
+ ----------
4441
+ element_guid: str
4442
+ - the identity of the element to update
4443
+ for_lineage: bool, default is set by server
4444
+ - determines if elements classified as Memento should be returned - normally false
4445
+ for_duplicate_processing: bool, default is set by server
4446
+ - Normally false. Set true when the caller is part of a deduplication function
4447
+ effective_time: str, default = None
4448
+ - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
4449
+ server_name: str, default = None
4450
+ - name of the server instances for this request.
4451
+ time_out: int, default = default_time_out
4452
+ - http request timeout for this request
3503
4453
 
3504
- Returns
3505
- -------
3506
- None
4454
+ Returns
4455
+ -------
4456
+ None
3507
4457
 
3508
- Raises
3509
- ------
3510
- InvalidParameterException
3511
- one of the parameters is null or invalid or
3512
- PropertyServerException
3513
- There is a problem adding the element properties to the metadata repository or
3514
- UserNotAuthorizedException
3515
- the requesting user is not authorized to issue this request.
4458
+ Raises
4459
+ ------
4460
+ InvalidParameterException
4461
+ one of the parameters is null or invalid or
4462
+ PropertyServerException
4463
+ There is a problem adding the element properties to the metadata repository or
4464
+ UserNotAuthorizedException
4465
+ the requesting user is not authorized to issue this request.
3516
4466
 
3517
4467
 
3518
- """
4468
+ """
3519
4469
 
3520
4470
  loop = asyncio.get_event_loop()
3521
4471
  loop.run_until_complete(
3522
- self._async_clear_security_tags_classification(element_guid, for_lineage, for_duplicate_processing,
3523
- effective_time, server_name, time_out))
3524
-
3525
- async def _async_setup_semantic_assignment(self, glossary_term_guid: str, element_guid: str, body: dict,
3526
- for_lineage: bool = None, for_duplicate_processing: bool = None,
3527
- server_name: str = None, time_out: int = default_time_out) -> None:
4472
+ self._async_clear_security_tags_classification(
4473
+ element_guid,
4474
+ for_lineage,
4475
+ for_duplicate_processing,
4476
+ effective_time,
4477
+ server_name,
4478
+ time_out,
4479
+ )
4480
+ )
4481
+
4482
+ async def _async_setup_semantic_assignment(
4483
+ self,
4484
+ glossary_term_guid: str,
4485
+ element_guid: str,
4486
+ body: dict,
4487
+ for_lineage: bool = None,
4488
+ for_duplicate_processing: bool = None,
4489
+ server_name: str = None,
4490
+ time_out: int = default_time_out,
4491
+ ) -> None:
3528
4492
  """
3529
4493
  Create a semantic assignment relationship between a glossary term and an element (normally a schema attribute,
3530
4494
  data field or asset). This relationship indicates that the data associated with the element meaning matches
@@ -3587,16 +4551,31 @@ class ClassificationManager(Client):
3587
4551
  server_name = self.server_name
3588
4552
 
3589
4553
  possible_query_params = query_string(
3590
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3591
-
3592
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms"
3593
- f"/{glossary_term_guid}{possible_query_params}")
3594
-
3595
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3596
-
3597
- def setup_semantic_assignment(self, glossary_term_guid: str, element_guid: str, body: dict,
3598
- for_lineage: bool = None, for_duplicate_processing: bool = None,
3599
- server_name: str = None, time_out: int = default_time_out) -> None:
4554
+ [
4555
+ ("forLineage", for_lineage),
4556
+ ("forDuplicateProcessing", for_duplicate_processing),
4557
+ ]
4558
+ )
4559
+
4560
+ url = (
4561
+ f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms"
4562
+ f"/{glossary_term_guid}{possible_query_params}"
4563
+ )
4564
+
4565
+ await self._async_make_request(
4566
+ "POST", url, body_slimmer(body), time_out=time_out
4567
+ )
4568
+
4569
+ def setup_semantic_assignment(
4570
+ self,
4571
+ glossary_term_guid: str,
4572
+ element_guid: str,
4573
+ body: dict,
4574
+ for_lineage: bool = None,
4575
+ for_duplicate_processing: bool = None,
4576
+ server_name: str = None,
4577
+ time_out: int = default_time_out,
4578
+ ) -> None:
3600
4579
  """
3601
4580
  Create a semantic assignment relationship between a glossary term and an element (normally a schema attribute,
3602
4581
  data field or asset). This relationship indicates that the data associated with the element meaning matches
@@ -3657,118 +4636,154 @@ class ClassificationManager(Client):
3657
4636
 
3658
4637
  loop = asyncio.get_event_loop()
3659
4638
  loop.run_until_complete(
3660
- self._async_setup_semantic_assignment(glossary_term_guid, element_guid, body, for_lineage,
3661
- for_duplicate_processing, server_name, time_out))
3662
-
3663
- async def _async_clear_semantic_assignment_classification(self, glossary_term_guid: str, element_guid: str,
3664
- for_lineage: bool = None,
3665
- for_duplicate_processing: bool = None,
3666
- effective_time: str = None,
3667
- server_name: str = None,
3668
- time_out: int = default_time_out) -> None:
4639
+ self._async_setup_semantic_assignment(
4640
+ glossary_term_guid,
4641
+ element_guid,
4642
+ body,
4643
+ for_lineage,
4644
+ for_duplicate_processing,
4645
+ server_name,
4646
+ time_out,
4647
+ )
4648
+ )
4649
+
4650
+ async def _async_clear_semantic_assignment_classification(
4651
+ self,
4652
+ glossary_term_guid: str,
4653
+ element_guid: str,
4654
+ for_lineage: bool = None,
4655
+ for_duplicate_processing: bool = None,
4656
+ effective_time: str = None,
4657
+ server_name: str = None,
4658
+ time_out: int = default_time_out,
4659
+ ) -> None:
3669
4660
  """
3670
- Remove the semantic_assignment classification from the element. Async version.
4661
+ Remove the semantic_assignment classification from the element. Async version.
3671
4662
 
3672
- Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
4663
+ Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
3673
4664
 
3674
- Parameters
3675
- ----------
3676
- glossary_term_guid: str
3677
- - identity of glossary to remove
3678
- element_guid: str
3679
- - the identity of the element to update
3680
- for_lineage: bool, default is set by server
3681
- - determines if elements classified as Memento should be returned - normally false
3682
- for_duplicate_processing: bool, default is set by server
3683
- - Normally false. Set true when the caller is part of a deduplication function
3684
- effective_time: str, default = None
3685
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
3686
- server_name: str, default = None
3687
- - name of the server instances for this request.
3688
- time_out: int, default = default_time_out
3689
- - http request timeout for this request
4665
+ Parameters
4666
+ ----------
4667
+ glossary_term_guid: str
4668
+ - identity of glossary to remove
4669
+ element_guid: str
4670
+ - the identity of the element to update
4671
+ for_lineage: bool, default is set by server
4672
+ - determines if elements classified as Memento should be returned - normally false
4673
+ for_duplicate_processing: bool, default is set by server
4674
+ - Normally false. Set true when the caller is part of a deduplication function
4675
+ effective_time: str, default = None
4676
+ - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
4677
+ server_name: str, default = None
4678
+ - name of the server instances for this request.
4679
+ time_out: int, default = default_time_out
4680
+ - http request timeout for this request
3690
4681
 
3691
- Returns
3692
- -------
3693
- None
4682
+ Returns
4683
+ -------
4684
+ None
3694
4685
 
3695
- Raises
3696
- ------
3697
- InvalidParameterException
3698
- one of the parameters is null or invalid or
3699
- PropertyServerException
3700
- There is a problem adding the element properties to the metadata repository or
3701
- UserNotAuthorizedException
3702
- the requesting user is not authorized to issue this request.
4686
+ Raises
4687
+ ------
4688
+ InvalidParameterException
4689
+ one of the parameters is null or invalid or
4690
+ PropertyServerException
4691
+ There is a problem adding the element properties to the metadata repository or
4692
+ UserNotAuthorizedException
4693
+ the requesting user is not authorized to issue this request.
3703
4694
 
3704
- """
4695
+ """
3705
4696
  if server_name is None:
3706
4697
  server_name = self.server_name
3707
4698
 
3708
4699
  possible_query_params = query_string(
3709
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3710
-
3711
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms/"
3712
- f"{glossary_term_guid}/remove{possible_query_params}")
3713
-
3714
- body = {
3715
- "class": "ClassificationRequestBody",
3716
- "effectiveTime": effective_time
3717
- }
3718
-
3719
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3720
-
3721
- def clear_semantic_assignment_classification(self, glossary_term_guid: str, element_guid: str,
3722
- for_lineage: bool = None, for_duplicate_processing: bool = None,
3723
- effective_time: str = None,
3724
- server_name: str = None, time_out: int = default_time_out) -> None:
4700
+ [
4701
+ ("forLineage", for_lineage),
4702
+ ("forDuplicateProcessing", for_duplicate_processing),
4703
+ ]
4704
+ )
4705
+
4706
+ url = (
4707
+ f"{base_path(self, server_name)}/elements/{element_guid}/semantic-assignment/terms/"
4708
+ f"{glossary_term_guid}/remove{possible_query_params}"
4709
+ )
4710
+
4711
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
4712
+
4713
+ await self._async_make_request(
4714
+ "POST", url, body_slimmer(body), time_out=time_out
4715
+ )
4716
+
4717
+ def clear_semantic_assignment_classification(
4718
+ self,
4719
+ glossary_term_guid: str,
4720
+ element_guid: str,
4721
+ for_lineage: bool = None,
4722
+ for_duplicate_processing: bool = None,
4723
+ effective_time: str = None,
4724
+ server_name: str = None,
4725
+ time_out: int = default_time_out,
4726
+ ) -> None:
3725
4727
  """
3726
- Remove the semantic_assignment classification from the element.
4728
+ Remove the semantic_assignment classification from the element.
3727
4729
 
3728
- Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
4730
+ Security Tags: https://egeria-project.org/types/4/0423-Security-Definitions/
3729
4731
 
3730
- Parameters
3731
- ----------
3732
- glossary_term_guid: str
3733
- - identity of glossary to remove
3734
- element_guid: str
3735
- - the identity of the element to update
3736
- for_lineage: bool, default is set by server
3737
- - determines if elements classified as Memento should be returned - normally false
3738
- for_duplicate_processing: bool, default is set by server
3739
- - Normally false. Set true when the caller is part of a deduplication function
3740
- effective_time: str, default = None
3741
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
3742
- server_name: str, default = None
3743
- - name of the server instances for this request.
3744
- time_out: int, default = default_time_out
3745
- - http request timeout for this request
4732
+ Parameters
4733
+ ----------
4734
+ glossary_term_guid: str
4735
+ - identity of glossary to remove
4736
+ element_guid: str
4737
+ - the identity of the element to update
4738
+ for_lineage: bool, default is set by server
4739
+ - determines if elements classified as Memento should be returned - normally false
4740
+ for_duplicate_processing: bool, default is set by server
4741
+ - Normally false. Set true when the caller is part of a deduplication function
4742
+ effective_time: str, default = None
4743
+ - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
4744
+ server_name: str, default = None
4745
+ - name of the server instances for this request.
4746
+ time_out: int, default = default_time_out
4747
+ - http request timeout for this request
3746
4748
 
3747
- Returns
3748
- -------
3749
- None
4749
+ Returns
4750
+ -------
4751
+ None
3750
4752
 
3751
- Raises
3752
- ------
3753
- InvalidParameterException
3754
- one of the parameters is null or invalid or
3755
- PropertyServerException
3756
- There is a problem adding the element properties to the metadata repository or
3757
- UserNotAuthorizedException
3758
- the requesting user is not authorized to issue this request.
4753
+ Raises
4754
+ ------
4755
+ InvalidParameterException
4756
+ one of the parameters is null or invalid or
4757
+ PropertyServerException
4758
+ There is a problem adding the element properties to the metadata repository or
4759
+ UserNotAuthorizedException
4760
+ the requesting user is not authorized to issue this request.
3759
4761
 
3760
4762
 
3761
- """
4763
+ """
3762
4764
 
3763
4765
  loop = asyncio.get_event_loop()
3764
4766
  loop.run_until_complete(
3765
- self._async_clear_semantic_assignment_classification(glossary_term_guid, element_guid, for_lineage,
3766
- for_duplicate_processing, effective_time, server_name,
3767
- time_out))
3768
-
3769
- async def _async_add_element_to_subject_area(self, element_guid: str, body: dict, for_lineage: bool = None,
3770
- for_duplicate_processing: bool = None, server_name: str = None,
3771
- time_out: int = default_time_out) -> None:
4767
+ self._async_clear_semantic_assignment_classification(
4768
+ glossary_term_guid,
4769
+ element_guid,
4770
+ for_lineage,
4771
+ for_duplicate_processing,
4772
+ effective_time,
4773
+ server_name,
4774
+ time_out,
4775
+ )
4776
+ )
4777
+
4778
+ async def _async_add_element_to_subject_area(
4779
+ self,
4780
+ element_guid: str,
4781
+ body: dict,
4782
+ for_lineage: bool = None,
4783
+ for_duplicate_processing: bool = None,
4784
+ server_name: str = None,
4785
+ time_out: int = default_time_out,
4786
+ ) -> None:
3772
4787
  """
3773
4788
  Classify the element to assert that the definitions it represents are part of a subject area definition. Async
3774
4789
 
@@ -3821,16 +4836,30 @@ class ClassificationManager(Client):
3821
4836
  server_name = self.server_name
3822
4837
 
3823
4838
  possible_query_params = query_string(
3824
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3825
-
3826
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
3827
- f"{possible_query_params}")
3828
-
3829
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3830
-
3831
- def add_element_to_subject_area(self, element_guid: str, body: dict, for_lineage: bool = None,
3832
- for_duplicate_processing: bool = None, server_name: str = None,
3833
- time_out: int = default_time_out) -> None:
4839
+ [
4840
+ ("forLineage", for_lineage),
4841
+ ("forDuplicateProcessing", for_duplicate_processing),
4842
+ ]
4843
+ )
4844
+
4845
+ url = (
4846
+ f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
4847
+ f"{possible_query_params}"
4848
+ )
4849
+
4850
+ await self._async_make_request(
4851
+ "POST", url, body_slimmer(body), time_out=time_out
4852
+ )
4853
+
4854
+ def add_element_to_subject_area(
4855
+ self,
4856
+ element_guid: str,
4857
+ body: dict,
4858
+ for_lineage: bool = None,
4859
+ for_duplicate_processing: bool = None,
4860
+ server_name: str = None,
4861
+ time_out: int = default_time_out,
4862
+ ) -> None:
3834
4863
  """
3835
4864
  Classify the element to assert that the definitions it represents are part of a subject area definition. Async
3836
4865
 
@@ -3882,13 +4911,25 @@ class ClassificationManager(Client):
3882
4911
 
3883
4912
  loop = asyncio.get_event_loop()
3884
4913
  loop.run_until_complete(
3885
- self._async_add_element_to_subject_area(element_guid, body, for_lineage, for_duplicate_processing,
3886
- server_name, time_out))
3887
-
3888
- async def _async_remove_element_from_subject_area(self, element_guid: str, for_lineage: bool = None,
3889
- for_duplicate_processing: bool = None, effective_time: str = None,
3890
- server_name: str = None,
3891
- time_out: int = default_time_out) -> None:
4914
+ self._async_add_element_to_subject_area(
4915
+ element_guid,
4916
+ body,
4917
+ for_lineage,
4918
+ for_duplicate_processing,
4919
+ server_name,
4920
+ time_out,
4921
+ )
4922
+ )
4923
+
4924
+ async def _async_remove_element_from_subject_area(
4925
+ self,
4926
+ element_guid: str,
4927
+ for_lineage: bool = None,
4928
+ for_duplicate_processing: bool = None,
4929
+ effective_time: str = None,
4930
+ server_name: str = None,
4931
+ time_out: int = default_time_out,
4932
+ ) -> None:
3892
4933
  """
3893
4934
  Remove the subject area designation from the identified element. Async version.
3894
4935
 
@@ -3923,27 +4964,37 @@ class ClassificationManager(Client):
3923
4964
  the requesting user is not authorized to issue this request.
3924
4965
 
3925
4966
 
3926
- """
4967
+ """
3927
4968
  if server_name is None:
3928
4969
  server_name = self.server_name
3929
4970
 
3930
4971
  possible_query_params = query_string(
3931
- [("forLineage", for_lineage), ("forDuplicateProcessing", for_duplicate_processing)])
3932
-
3933
- url = (f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
3934
- f"/remove{possible_query_params}")
3935
-
3936
- body = {
3937
- "class": "ClassificationRequestBody",
3938
- "effectiveTime": effective_time
3939
- }
3940
-
3941
- await self._async_make_request("POST", url, body_slimmer(body), time_out=time_out)
3942
-
3943
- def remove_element_from_subject_area(self, element_guid: str, for_lineage: bool = None,
3944
- for_duplicate_processing: bool = None, effective_time: str = None,
3945
- server_name: str = None,
3946
- time_out: int = default_time_out) -> None:
4972
+ [
4973
+ ("forLineage", for_lineage),
4974
+ ("forDuplicateProcessing", for_duplicate_processing),
4975
+ ]
4976
+ )
4977
+
4978
+ url = (
4979
+ f"{base_path(self, server_name)}/elements/{element_guid}/subject-area-member"
4980
+ f"/remove{possible_query_params}"
4981
+ )
4982
+
4983
+ body = {"class": "ClassificationRequestBody", "effectiveTime": effective_time}
4984
+
4985
+ await self._async_make_request(
4986
+ "POST", url, body_slimmer(body), time_out=time_out
4987
+ )
4988
+
4989
+ def remove_element_from_subject_area(
4990
+ self,
4991
+ element_guid: str,
4992
+ for_lineage: bool = None,
4993
+ for_duplicate_processing: bool = None,
4994
+ effective_time: str = None,
4995
+ server_name: str = None,
4996
+ time_out: int = default_time_out,
4997
+ ) -> None:
3947
4998
  """
3948
4999
  Remove the subject area designation from the identified element.
3949
5000
 
@@ -3978,9 +5029,16 @@ class ClassificationManager(Client):
3978
5029
  the requesting user is not authorized to issue this request.
3979
5030
 
3980
5031
 
3981
- """
5032
+ """
3982
5033
 
3983
5034
  loop = asyncio.get_event_loop()
3984
5035
  loop.run_until_complete(
3985
- self._async_remove_element_from_subject_area(element_guid, for_lineage, for_duplicate_processing,
3986
- effective_time, server_name, time_out))
5036
+ self._async_remove_element_from_subject_area(
5037
+ element_guid,
5038
+ for_lineage,
5039
+ for_duplicate_processing,
5040
+ effective_time,
5041
+ server_name,
5042
+ time_out,
5043
+ )
5044
+ )