lusid-sdk 2.1.887__py3-none-any.whl → 2.1.888__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.
@@ -0,0 +1,945 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ import re # noqa: F401
16
+ import io
17
+ import warnings
18
+
19
+ from pydantic.v1 import validate_arguments, ValidationError
20
+ from typing import overload, Optional, Union, Awaitable
21
+
22
+ from typing_extensions import Annotated
23
+ from datetime import datetime
24
+
25
+ from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator
26
+
27
+ from typing import Optional
28
+
29
+ from lusid.models.check_definition import CheckDefinition
30
+ from lusid.models.create_check_definition_request import CreateCheckDefinitionRequest
31
+ from lusid.models.deleted_entity_response import DeletedEntityResponse
32
+ from lusid.models.paged_resource_list_of_check_definition import PagedResourceListOfCheckDefinition
33
+ from lusid.models.update_check_definition_request import UpdateCheckDefinitionRequest
34
+
35
+ from lusid.api_client import ApiClient
36
+ from lusid.api_response import ApiResponse
37
+ from lusid.exceptions import ( # noqa: F401
38
+ ApiTypeError,
39
+ ApiValueError
40
+ )
41
+ from lusid.extensions.configuration_options import ConfigurationOptions
42
+
43
+ # ensure templated type usages are imported
44
+ from pydantic.v1 import Field, StrictStr
45
+ from typing import Optional
46
+ from typing_extensions import Annotated
47
+
48
+ class CheckDefinitionsApi:
49
+ """NOTE: This class is auto generated by OpenAPI Generator
50
+ Ref: https://openapi-generator.tech
51
+
52
+ Do not edit the class manually.
53
+ """
54
+
55
+ def __init__(self, api_client=None) -> None:
56
+ if api_client is None:
57
+ api_client = ApiClient.get_default()
58
+ self.api_client = api_client
59
+
60
+
61
+ @overload
62
+ async def create_check_definition(self, create_check_definition_request : Annotated[Optional[CreateCheckDefinitionRequest], Field(description="The request containing the details of the Check Definition")] = None, **kwargs) -> CheckDefinition: # noqa: E501
63
+ ...
64
+
65
+ @overload
66
+ def create_check_definition(self, create_check_definition_request : Annotated[Optional[CreateCheckDefinitionRequest], Field(description="The request containing the details of the Check Definition")] = None, async_req: Optional[bool]=True, **kwargs) -> CheckDefinition: # noqa: E501
67
+ ...
68
+
69
+ @validate_arguments
70
+ def create_check_definition(self, create_check_definition_request : Annotated[Optional[CreateCheckDefinitionRequest], Field(description="The request containing the details of the Check Definition")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[CheckDefinition, Awaitable[CheckDefinition]]: # noqa: E501
71
+ """[EXPERIMENTAL] CreateCheckDefinition: Create a Check Definition # noqa: E501
72
+
73
+ Creates a Check Definition. Returns the created Check Definition at the current effectiveAt. Note that Check Definitions are mono-temporal, however they can have Time-Variant Properties. Upserted Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
74
+ This method makes a synchronous HTTP request by default. To make an
75
+ asynchronous HTTP request, please pass async_req=True
76
+
77
+ >>> thread = api.create_check_definition(create_check_definition_request, async_req=True)
78
+ >>> result = thread.get()
79
+
80
+ :param create_check_definition_request: The request containing the details of the Check Definition
81
+ :type create_check_definition_request: CreateCheckDefinitionRequest
82
+ :param async_req: Whether to execute the request asynchronously.
83
+ :type async_req: bool, optional
84
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
85
+ :param opts: Configuration options for this request
86
+ :type opts: ConfigurationOptions, optional
87
+ :return: Returns the result object.
88
+ If the method is called asynchronously,
89
+ returns the request thread.
90
+ :rtype: CheckDefinition
91
+ """
92
+ kwargs['_return_http_data_only'] = True
93
+ if '_preload_content' in kwargs:
94
+ message = "Error! Please call the create_check_definition_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
95
+ raise ValueError(message)
96
+ if async_req is not None:
97
+ kwargs['async_req'] = async_req
98
+ return self.create_check_definition_with_http_info(create_check_definition_request, **kwargs) # noqa: E501
99
+
100
+ @validate_arguments
101
+ def create_check_definition_with_http_info(self, create_check_definition_request : Annotated[Optional[CreateCheckDefinitionRequest], Field(description="The request containing the details of the Check Definition")] = None, **kwargs) -> ApiResponse: # noqa: E501
102
+ """[EXPERIMENTAL] CreateCheckDefinition: Create a Check Definition # noqa: E501
103
+
104
+ Creates a Check Definition. Returns the created Check Definition at the current effectiveAt. Note that Check Definitions are mono-temporal, however they can have Time-Variant Properties. Upserted Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
105
+ This method makes a synchronous HTTP request by default. To make an
106
+ asynchronous HTTP request, please pass async_req=True
107
+
108
+ >>> thread = api.create_check_definition_with_http_info(create_check_definition_request, async_req=True)
109
+ >>> result = thread.get()
110
+
111
+ :param create_check_definition_request: The request containing the details of the Check Definition
112
+ :type create_check_definition_request: CreateCheckDefinitionRequest
113
+ :param async_req: Whether to execute the request asynchronously.
114
+ :type async_req: bool, optional
115
+ :param _preload_content: if False, the ApiResponse.data will
116
+ be set to none and raw_data will store the
117
+ HTTP response body without reading/decoding.
118
+ Default is True.
119
+ :type _preload_content: bool, optional
120
+ :param _return_http_data_only: response data instead of ApiResponse
121
+ object with status code, headers, etc
122
+ :type _return_http_data_only: bool, optional
123
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
124
+ :param opts: Configuration options for this request
125
+ :type opts: ConfigurationOptions, optional
126
+ :param _request_auth: set to override the auth_settings for an a single
127
+ request; this effectively ignores the authentication
128
+ in the spec for a single request.
129
+ :type _request_auth: dict, optional
130
+ :type _content_type: string, optional: force content-type for the request
131
+ :return: Returns the result object.
132
+ If the method is called asynchronously,
133
+ returns the request thread.
134
+ :rtype: tuple(CheckDefinition, status_code(int), headers(HTTPHeaderDict))
135
+ """
136
+
137
+ _params = locals()
138
+
139
+ _all_params = [
140
+ 'create_check_definition_request'
141
+ ]
142
+ _all_params.extend(
143
+ [
144
+ 'async_req',
145
+ '_return_http_data_only',
146
+ '_preload_content',
147
+ '_request_timeout',
148
+ '_request_auth',
149
+ '_content_type',
150
+ '_headers',
151
+ 'opts'
152
+ ]
153
+ )
154
+
155
+ # validate the arguments
156
+ for _key, _val in _params['kwargs'].items():
157
+ if _key not in _all_params:
158
+ raise ApiTypeError(
159
+ "Got an unexpected keyword argument '%s'"
160
+ " to method create_check_definition" % _key
161
+ )
162
+ _params[_key] = _val
163
+ del _params['kwargs']
164
+
165
+ _collection_formats = {}
166
+
167
+ # process the path parameters
168
+ _path_params = {}
169
+
170
+ # process the query parameters
171
+ _query_params = []
172
+ # process the header parameters
173
+ _header_params = dict(_params.get('_headers', {}))
174
+ # process the form parameters
175
+ _form_params = []
176
+ _files = {}
177
+ # process the body parameter
178
+ _body_params = None
179
+ if _params['create_check_definition_request'] is not None:
180
+ _body_params = _params['create_check_definition_request']
181
+
182
+ # set the HTTP header `Accept`
183
+ _header_params['Accept'] = self.api_client.select_header_accept(
184
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
185
+
186
+ # set the HTTP header `Content-Type`
187
+ _content_types_list = _params.get('_content_type',
188
+ self.api_client.select_header_content_type(
189
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
190
+ if _content_types_list:
191
+ _header_params['Content-Type'] = _content_types_list
192
+
193
+ # authentication setting
194
+ _auth_settings = ['oauth2'] # noqa: E501
195
+
196
+ _response_types_map = {
197
+ '201': "CheckDefinition",
198
+ '400': "LusidValidationProblemDetails",
199
+ }
200
+
201
+ return self.api_client.call_api(
202
+ '/api/dataquality/checkdefinitions', 'POST',
203
+ _path_params,
204
+ _query_params,
205
+ _header_params,
206
+ body=_body_params,
207
+ post_params=_form_params,
208
+ files=_files,
209
+ response_types_map=_response_types_map,
210
+ auth_settings=_auth_settings,
211
+ async_req=_params.get('async_req'),
212
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
213
+ _preload_content=_params.get('_preload_content', True),
214
+ _request_timeout=_params.get('_request_timeout'),
215
+ opts=_params.get('opts'),
216
+ collection_formats=_collection_formats,
217
+ _request_auth=_params.get('_request_auth'))
218
+
219
+
220
+ @overload
221
+ async def delete_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], **kwargs) -> DeletedEntityResponse: # noqa: E501
222
+ ...
223
+
224
+ @overload
225
+ def delete_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501
226
+ ...
227
+
228
+ @validate_arguments
229
+ def delete_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], async_req: Optional[bool]=None, **kwargs) -> Union[DeletedEntityResponse, Awaitable[DeletedEntityResponse]]: # noqa: E501
230
+ """[EXPERIMENTAL] DeleteCheckDefinition: Deletes a particular Check Definition # noqa: E501
231
+
232
+ The deletion will take effect from the Check Definition deletion datetime. i.e. will no longer exist at any asAt datetime after the asAt datetime of deletion. # noqa: E501
233
+ This method makes a synchronous HTTP request by default. To make an
234
+ asynchronous HTTP request, please pass async_req=True
235
+
236
+ >>> thread = api.delete_check_definition(scope, code, async_req=True)
237
+ >>> result = thread.get()
238
+
239
+ :param scope: The scope of the specified Check Definition. (required)
240
+ :type scope: str
241
+ :param code: The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition. (required)
242
+ :type code: str
243
+ :param async_req: Whether to execute the request asynchronously.
244
+ :type async_req: bool, optional
245
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
246
+ :param opts: Configuration options for this request
247
+ :type opts: ConfigurationOptions, optional
248
+ :return: Returns the result object.
249
+ If the method is called asynchronously,
250
+ returns the request thread.
251
+ :rtype: DeletedEntityResponse
252
+ """
253
+ kwargs['_return_http_data_only'] = True
254
+ if '_preload_content' in kwargs:
255
+ message = "Error! Please call the delete_check_definition_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
256
+ raise ValueError(message)
257
+ if async_req is not None:
258
+ kwargs['async_req'] = async_req
259
+ return self.delete_check_definition_with_http_info(scope, code, **kwargs) # noqa: E501
260
+
261
+ @validate_arguments
262
+ def delete_check_definition_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], **kwargs) -> ApiResponse: # noqa: E501
263
+ """[EXPERIMENTAL] DeleteCheckDefinition: Deletes a particular Check Definition # noqa: E501
264
+
265
+ The deletion will take effect from the Check Definition deletion datetime. i.e. will no longer exist at any asAt datetime after the asAt datetime of deletion. # noqa: E501
266
+ This method makes a synchronous HTTP request by default. To make an
267
+ asynchronous HTTP request, please pass async_req=True
268
+
269
+ >>> thread = api.delete_check_definition_with_http_info(scope, code, async_req=True)
270
+ >>> result = thread.get()
271
+
272
+ :param scope: The scope of the specified Check Definition. (required)
273
+ :type scope: str
274
+ :param code: The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition. (required)
275
+ :type code: str
276
+ :param async_req: Whether to execute the request asynchronously.
277
+ :type async_req: bool, optional
278
+ :param _preload_content: if False, the ApiResponse.data will
279
+ be set to none and raw_data will store the
280
+ HTTP response body without reading/decoding.
281
+ Default is True.
282
+ :type _preload_content: bool, optional
283
+ :param _return_http_data_only: response data instead of ApiResponse
284
+ object with status code, headers, etc
285
+ :type _return_http_data_only: bool, optional
286
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
287
+ :param opts: Configuration options for this request
288
+ :type opts: ConfigurationOptions, optional
289
+ :param _request_auth: set to override the auth_settings for an a single
290
+ request; this effectively ignores the authentication
291
+ in the spec for a single request.
292
+ :type _request_auth: dict, optional
293
+ :type _content_type: string, optional: force content-type for the request
294
+ :return: Returns the result object.
295
+ If the method is called asynchronously,
296
+ returns the request thread.
297
+ :rtype: tuple(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict))
298
+ """
299
+
300
+ _params = locals()
301
+
302
+ _all_params = [
303
+ 'scope',
304
+ 'code'
305
+ ]
306
+ _all_params.extend(
307
+ [
308
+ 'async_req',
309
+ '_return_http_data_only',
310
+ '_preload_content',
311
+ '_request_timeout',
312
+ '_request_auth',
313
+ '_content_type',
314
+ '_headers',
315
+ 'opts'
316
+ ]
317
+ )
318
+
319
+ # validate the arguments
320
+ for _key, _val in _params['kwargs'].items():
321
+ if _key not in _all_params:
322
+ raise ApiTypeError(
323
+ "Got an unexpected keyword argument '%s'"
324
+ " to method delete_check_definition" % _key
325
+ )
326
+ _params[_key] = _val
327
+ del _params['kwargs']
328
+
329
+ _collection_formats = {}
330
+
331
+ # process the path parameters
332
+ _path_params = {}
333
+ if _params['scope']:
334
+ _path_params['scope'] = _params['scope']
335
+
336
+ if _params['code']:
337
+ _path_params['code'] = _params['code']
338
+
339
+
340
+ # process the query parameters
341
+ _query_params = []
342
+ # process the header parameters
343
+ _header_params = dict(_params.get('_headers', {}))
344
+ # process the form parameters
345
+ _form_params = []
346
+ _files = {}
347
+ # process the body parameter
348
+ _body_params = None
349
+ # set the HTTP header `Accept`
350
+ _header_params['Accept'] = self.api_client.select_header_accept(
351
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
352
+
353
+ # authentication setting
354
+ _auth_settings = ['oauth2'] # noqa: E501
355
+
356
+ _response_types_map = {
357
+ '200': "DeletedEntityResponse",
358
+ '400': "LusidValidationProblemDetails",
359
+ }
360
+
361
+ return self.api_client.call_api(
362
+ '/api/dataquality/checkdefinitions/{scope}/{code}', 'DELETE',
363
+ _path_params,
364
+ _query_params,
365
+ _header_params,
366
+ body=_body_params,
367
+ post_params=_form_params,
368
+ files=_files,
369
+ response_types_map=_response_types_map,
370
+ auth_settings=_auth_settings,
371
+ async_req=_params.get('async_req'),
372
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
373
+ _preload_content=_params.get('_preload_content', True),
374
+ _request_timeout=_params.get('_request_timeout'),
375
+ opts=_params.get('opts'),
376
+ collection_formats=_collection_formats,
377
+ _request_auth=_params.get('_request_auth'))
378
+
379
+
380
+ @overload
381
+ async def get_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the scope this uniquely identifies the Check Definition.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Check Definition definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to retrieve the check definition properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto the Check Definition. These must have the format {domain}/{scope}/{code}, for example 'CheckDefinition/system/Name'.")] = None, **kwargs) -> CheckDefinition: # noqa: E501
382
+ ...
383
+
384
+ @overload
385
+ def get_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the scope this uniquely identifies the Check Definition.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Check Definition definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to retrieve the check definition properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto the Check Definition. These must have the format {domain}/{scope}/{code}, for example 'CheckDefinition/system/Name'.")] = None, async_req: Optional[bool]=True, **kwargs) -> CheckDefinition: # noqa: E501
386
+ ...
387
+
388
+ @validate_arguments
389
+ def get_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the scope this uniquely identifies the Check Definition.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Check Definition definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to retrieve the check definition properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto the Check Definition. These must have the format {domain}/{scope}/{code}, for example 'CheckDefinition/system/Name'.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[CheckDefinition, Awaitable[CheckDefinition]]: # noqa: E501
390
+ """[EXPERIMENTAL] GetCheckDefinition: Get a single Check Definition by scope and code. # noqa: E501
391
+
392
+ Retrieves one Check Definition by scope and code. Check Definitions are mono-temporal. The EffectiveAt is only applied to Time-Variant Properties. # noqa: E501
393
+ This method makes a synchronous HTTP request by default. To make an
394
+ asynchronous HTTP request, please pass async_req=True
395
+
396
+ >>> thread = api.get_check_definition(scope, code, as_at, effective_at, property_keys, async_req=True)
397
+ >>> result = thread.get()
398
+
399
+ :param scope: The scope of the specified Check Definition. (required)
400
+ :type scope: str
401
+ :param code: The code of the specified Check Definition. Together with the scope this uniquely identifies the Check Definition. (required)
402
+ :type code: str
403
+ :param as_at: The asAt datetime at which to retrieve the Check Definition definition. Defaults to return the latest version of the definition if not specified.
404
+ :type as_at: datetime
405
+ :param effective_at: The effective datetime or cut label at which to retrieve the check definition properties. Defaults to the current LUSID system datetime if not specified.
406
+ :type effective_at: str
407
+ :param property_keys: A list of property keys from the 'CheckDefinition' domain to decorate onto the Check Definition. These must have the format {domain}/{scope}/{code}, for example 'CheckDefinition/system/Name'.
408
+ :type property_keys: List[str]
409
+ :param async_req: Whether to execute the request asynchronously.
410
+ :type async_req: bool, optional
411
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
412
+ :param opts: Configuration options for this request
413
+ :type opts: ConfigurationOptions, optional
414
+ :return: Returns the result object.
415
+ If the method is called asynchronously,
416
+ returns the request thread.
417
+ :rtype: CheckDefinition
418
+ """
419
+ kwargs['_return_http_data_only'] = True
420
+ if '_preload_content' in kwargs:
421
+ message = "Error! Please call the get_check_definition_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
422
+ raise ValueError(message)
423
+ if async_req is not None:
424
+ kwargs['async_req'] = async_req
425
+ return self.get_check_definition_with_http_info(scope, code, as_at, effective_at, property_keys, **kwargs) # noqa: E501
426
+
427
+ @validate_arguments
428
+ def get_check_definition_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the scope this uniquely identifies the Check Definition.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Check Definition definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to retrieve the check definition properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto the Check Definition. These must have the format {domain}/{scope}/{code}, for example 'CheckDefinition/system/Name'.")] = None, **kwargs) -> ApiResponse: # noqa: E501
429
+ """[EXPERIMENTAL] GetCheckDefinition: Get a single Check Definition by scope and code. # noqa: E501
430
+
431
+ Retrieves one Check Definition by scope and code. Check Definitions are mono-temporal. The EffectiveAt is only applied to Time-Variant Properties. # noqa: E501
432
+ This method makes a synchronous HTTP request by default. To make an
433
+ asynchronous HTTP request, please pass async_req=True
434
+
435
+ >>> thread = api.get_check_definition_with_http_info(scope, code, as_at, effective_at, property_keys, async_req=True)
436
+ >>> result = thread.get()
437
+
438
+ :param scope: The scope of the specified Check Definition. (required)
439
+ :type scope: str
440
+ :param code: The code of the specified Check Definition. Together with the scope this uniquely identifies the Check Definition. (required)
441
+ :type code: str
442
+ :param as_at: The asAt datetime at which to retrieve the Check Definition definition. Defaults to return the latest version of the definition if not specified.
443
+ :type as_at: datetime
444
+ :param effective_at: The effective datetime or cut label at which to retrieve the check definition properties. Defaults to the current LUSID system datetime if not specified.
445
+ :type effective_at: str
446
+ :param property_keys: A list of property keys from the 'CheckDefinition' domain to decorate onto the Check Definition. These must have the format {domain}/{scope}/{code}, for example 'CheckDefinition/system/Name'.
447
+ :type property_keys: List[str]
448
+ :param async_req: Whether to execute the request asynchronously.
449
+ :type async_req: bool, optional
450
+ :param _preload_content: if False, the ApiResponse.data will
451
+ be set to none and raw_data will store the
452
+ HTTP response body without reading/decoding.
453
+ Default is True.
454
+ :type _preload_content: bool, optional
455
+ :param _return_http_data_only: response data instead of ApiResponse
456
+ object with status code, headers, etc
457
+ :type _return_http_data_only: bool, optional
458
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
459
+ :param opts: Configuration options for this request
460
+ :type opts: ConfigurationOptions, optional
461
+ :param _request_auth: set to override the auth_settings for an a single
462
+ request; this effectively ignores the authentication
463
+ in the spec for a single request.
464
+ :type _request_auth: dict, optional
465
+ :type _content_type: string, optional: force content-type for the request
466
+ :return: Returns the result object.
467
+ If the method is called asynchronously,
468
+ returns the request thread.
469
+ :rtype: tuple(CheckDefinition, status_code(int), headers(HTTPHeaderDict))
470
+ """
471
+
472
+ _params = locals()
473
+
474
+ _all_params = [
475
+ 'scope',
476
+ 'code',
477
+ 'as_at',
478
+ 'effective_at',
479
+ 'property_keys'
480
+ ]
481
+ _all_params.extend(
482
+ [
483
+ 'async_req',
484
+ '_return_http_data_only',
485
+ '_preload_content',
486
+ '_request_timeout',
487
+ '_request_auth',
488
+ '_content_type',
489
+ '_headers',
490
+ 'opts'
491
+ ]
492
+ )
493
+
494
+ # validate the arguments
495
+ for _key, _val in _params['kwargs'].items():
496
+ if _key not in _all_params:
497
+ raise ApiTypeError(
498
+ "Got an unexpected keyword argument '%s'"
499
+ " to method get_check_definition" % _key
500
+ )
501
+ _params[_key] = _val
502
+ del _params['kwargs']
503
+
504
+ _collection_formats = {}
505
+
506
+ # process the path parameters
507
+ _path_params = {}
508
+ if _params['scope']:
509
+ _path_params['scope'] = _params['scope']
510
+
511
+ if _params['code']:
512
+ _path_params['code'] = _params['code']
513
+
514
+
515
+ # process the query parameters
516
+ _query_params = []
517
+ if _params.get('as_at') is not None: # noqa: E501
518
+ if isinstance(_params['as_at'], datetime):
519
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
520
+ else:
521
+ _query_params.append(('asAt', _params['as_at']))
522
+
523
+ if _params.get('effective_at') is not None: # noqa: E501
524
+ _query_params.append(('effectiveAt', _params['effective_at']))
525
+
526
+ if _params.get('property_keys') is not None: # noqa: E501
527
+ _query_params.append(('propertyKeys', _params['property_keys']))
528
+ _collection_formats['propertyKeys'] = 'multi'
529
+
530
+ # process the header parameters
531
+ _header_params = dict(_params.get('_headers', {}))
532
+ # process the form parameters
533
+ _form_params = []
534
+ _files = {}
535
+ # process the body parameter
536
+ _body_params = None
537
+ # set the HTTP header `Accept`
538
+ _header_params['Accept'] = self.api_client.select_header_accept(
539
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
540
+
541
+ # authentication setting
542
+ _auth_settings = ['oauth2'] # noqa: E501
543
+
544
+ _response_types_map = {
545
+ '200': "CheckDefinition",
546
+ '400': "LusidValidationProblemDetails",
547
+ }
548
+
549
+ return self.api_client.call_api(
550
+ '/api/dataquality/checkdefinitions/{scope}/{code}', 'GET',
551
+ _path_params,
552
+ _query_params,
553
+ _header_params,
554
+ body=_body_params,
555
+ post_params=_form_params,
556
+ files=_files,
557
+ response_types_map=_response_types_map,
558
+ auth_settings=_auth_settings,
559
+ async_req=_params.get('async_req'),
560
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
561
+ _preload_content=_params.get('_preload_content', True),
562
+ _request_timeout=_params.get('_request_timeout'),
563
+ opts=_params.get('opts'),
564
+ collection_formats=_collection_formats,
565
+ _request_auth=_params.get('_request_auth'))
566
+
567
+
568
+ @overload
569
+ async def list_check_definitions(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the Check Definitions. Defaults to returning the latest version of each Check Definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to list the Check Definitions. Note that Check Definitions are monotemporal, the effectiveAt is for Timevariant Properties on the Check Definition only. Defaults to the current LUSID system datetime if not specified.")] = None, page : Annotated[Optional[StrictStr], Field( description="The pagination token to use to continue listing Check Definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[StrictStr], Field( description="Expression to filter the results. For example, to filter on the displayName, specify \"displayName eq 'MyCheckDefinition'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto each Check Definition. These must take the format {domain}/{scope}/{code}, for example 'CheckDefinition/Account/id'.")] = None, **kwargs) -> PagedResourceListOfCheckDefinition: # noqa: E501
570
+ ...
571
+
572
+ @overload
573
+ def list_check_definitions(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the Check Definitions. Defaults to returning the latest version of each Check Definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to list the Check Definitions. Note that Check Definitions are monotemporal, the effectiveAt is for Timevariant Properties on the Check Definition only. Defaults to the current LUSID system datetime if not specified.")] = None, page : Annotated[Optional[StrictStr], Field( description="The pagination token to use to continue listing Check Definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[StrictStr], Field( description="Expression to filter the results. For example, to filter on the displayName, specify \"displayName eq 'MyCheckDefinition'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto each Check Definition. These must take the format {domain}/{scope}/{code}, for example 'CheckDefinition/Account/id'.")] = None, async_req: Optional[bool]=True, **kwargs) -> PagedResourceListOfCheckDefinition: # noqa: E501
574
+ ...
575
+
576
+ @validate_arguments
577
+ def list_check_definitions(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the Check Definitions. Defaults to returning the latest version of each Check Definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to list the Check Definitions. Note that Check Definitions are monotemporal, the effectiveAt is for Timevariant Properties on the Check Definition only. Defaults to the current LUSID system datetime if not specified.")] = None, page : Annotated[Optional[StrictStr], Field( description="The pagination token to use to continue listing Check Definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[StrictStr], Field( description="Expression to filter the results. For example, to filter on the displayName, specify \"displayName eq 'MyCheckDefinition'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto each Check Definition. These must take the format {domain}/{scope}/{code}, for example 'CheckDefinition/Account/id'.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[PagedResourceListOfCheckDefinition, Awaitable[PagedResourceListOfCheckDefinition]]: # noqa: E501
578
+ """[EXPERIMENTAL] ListCheckDefinitions: List Check Definitions # noqa: E501
579
+
580
+ List all the Check Definitions matching a particular criteria. # noqa: E501
581
+ This method makes a synchronous HTTP request by default. To make an
582
+ asynchronous HTTP request, please pass async_req=True
583
+
584
+ >>> thread = api.list_check_definitions(as_at, effective_at, page, limit, filter, sort_by, property_keys, async_req=True)
585
+ >>> result = thread.get()
586
+
587
+ :param as_at: The asAt datetime at which to list the Check Definitions. Defaults to returning the latest version of each Check Definition if not specified.
588
+ :type as_at: datetime
589
+ :param effective_at: The effective datetime or cut label at which to list the Check Definitions. Note that Check Definitions are monotemporal, the effectiveAt is for Timevariant Properties on the Check Definition only. Defaults to the current LUSID system datetime if not specified.
590
+ :type effective_at: str
591
+ :param page: The pagination token to use to continue listing Check Definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.
592
+ :type page: str
593
+ :param limit: When paginating, limit the results to this number. Defaults to 100 if not specified.
594
+ :type limit: int
595
+ :param filter: Expression to filter the results. For example, to filter on the displayName, specify \"displayName eq 'MyCheckDefinition'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.
596
+ :type filter: str
597
+ :param sort_by: A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"
598
+ :type sort_by: List[str]
599
+ :param property_keys: A list of property keys from the 'CheckDefinition' domain to decorate onto each Check Definition. These must take the format {domain}/{scope}/{code}, for example 'CheckDefinition/Account/id'.
600
+ :type property_keys: List[str]
601
+ :param async_req: Whether to execute the request asynchronously.
602
+ :type async_req: bool, optional
603
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
604
+ :param opts: Configuration options for this request
605
+ :type opts: ConfigurationOptions, optional
606
+ :return: Returns the result object.
607
+ If the method is called asynchronously,
608
+ returns the request thread.
609
+ :rtype: PagedResourceListOfCheckDefinition
610
+ """
611
+ kwargs['_return_http_data_only'] = True
612
+ if '_preload_content' in kwargs:
613
+ message = "Error! Please call the list_check_definitions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
614
+ raise ValueError(message)
615
+ if async_req is not None:
616
+ kwargs['async_req'] = async_req
617
+ return self.list_check_definitions_with_http_info(as_at, effective_at, page, limit, filter, sort_by, property_keys, **kwargs) # noqa: E501
618
+
619
+ @validate_arguments
620
+ def list_check_definitions_with_http_info(self, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the Check Definitions. Defaults to returning the latest version of each Check Definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to list the Check Definitions. Note that Check Definitions are monotemporal, the effectiveAt is for Timevariant Properties on the Check Definition only. Defaults to the current LUSID system datetime if not specified.")] = None, page : Annotated[Optional[StrictStr], Field( description="The pagination token to use to continue listing Check Definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[StrictStr], Field( description="Expression to filter the results. For example, to filter on the displayName, specify \"displayName eq 'MyCheckDefinition'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CheckDefinition' domain to decorate onto each Check Definition. These must take the format {domain}/{scope}/{code}, for example 'CheckDefinition/Account/id'.")] = None, **kwargs) -> ApiResponse: # noqa: E501
621
+ """[EXPERIMENTAL] ListCheckDefinitions: List Check Definitions # noqa: E501
622
+
623
+ List all the Check Definitions matching a particular criteria. # noqa: E501
624
+ This method makes a synchronous HTTP request by default. To make an
625
+ asynchronous HTTP request, please pass async_req=True
626
+
627
+ >>> thread = api.list_check_definitions_with_http_info(as_at, effective_at, page, limit, filter, sort_by, property_keys, async_req=True)
628
+ >>> result = thread.get()
629
+
630
+ :param as_at: The asAt datetime at which to list the Check Definitions. Defaults to returning the latest version of each Check Definition if not specified.
631
+ :type as_at: datetime
632
+ :param effective_at: The effective datetime or cut label at which to list the Check Definitions. Note that Check Definitions are monotemporal, the effectiveAt is for Timevariant Properties on the Check Definition only. Defaults to the current LUSID system datetime if not specified.
633
+ :type effective_at: str
634
+ :param page: The pagination token to use to continue listing Check Definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.
635
+ :type page: str
636
+ :param limit: When paginating, limit the results to this number. Defaults to 100 if not specified.
637
+ :type limit: int
638
+ :param filter: Expression to filter the results. For example, to filter on the displayName, specify \"displayName eq 'MyCheckDefinition'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.
639
+ :type filter: str
640
+ :param sort_by: A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"
641
+ :type sort_by: List[str]
642
+ :param property_keys: A list of property keys from the 'CheckDefinition' domain to decorate onto each Check Definition. These must take the format {domain}/{scope}/{code}, for example 'CheckDefinition/Account/id'.
643
+ :type property_keys: List[str]
644
+ :param async_req: Whether to execute the request asynchronously.
645
+ :type async_req: bool, optional
646
+ :param _preload_content: if False, the ApiResponse.data will
647
+ be set to none and raw_data will store the
648
+ HTTP response body without reading/decoding.
649
+ Default is True.
650
+ :type _preload_content: bool, optional
651
+ :param _return_http_data_only: response data instead of ApiResponse
652
+ object with status code, headers, etc
653
+ :type _return_http_data_only: bool, optional
654
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
655
+ :param opts: Configuration options for this request
656
+ :type opts: ConfigurationOptions, optional
657
+ :param _request_auth: set to override the auth_settings for an a single
658
+ request; this effectively ignores the authentication
659
+ in the spec for a single request.
660
+ :type _request_auth: dict, optional
661
+ :type _content_type: string, optional: force content-type for the request
662
+ :return: Returns the result object.
663
+ If the method is called asynchronously,
664
+ returns the request thread.
665
+ :rtype: tuple(PagedResourceListOfCheckDefinition, status_code(int), headers(HTTPHeaderDict))
666
+ """
667
+
668
+ _params = locals()
669
+
670
+ _all_params = [
671
+ 'as_at',
672
+ 'effective_at',
673
+ 'page',
674
+ 'limit',
675
+ 'filter',
676
+ 'sort_by',
677
+ 'property_keys'
678
+ ]
679
+ _all_params.extend(
680
+ [
681
+ 'async_req',
682
+ '_return_http_data_only',
683
+ '_preload_content',
684
+ '_request_timeout',
685
+ '_request_auth',
686
+ '_content_type',
687
+ '_headers',
688
+ 'opts'
689
+ ]
690
+ )
691
+
692
+ # validate the arguments
693
+ for _key, _val in _params['kwargs'].items():
694
+ if _key not in _all_params:
695
+ raise ApiTypeError(
696
+ "Got an unexpected keyword argument '%s'"
697
+ " to method list_check_definitions" % _key
698
+ )
699
+ _params[_key] = _val
700
+ del _params['kwargs']
701
+
702
+ _collection_formats = {}
703
+
704
+ # process the path parameters
705
+ _path_params = {}
706
+
707
+ # process the query parameters
708
+ _query_params = []
709
+ if _params.get('as_at') is not None: # noqa: E501
710
+ if isinstance(_params['as_at'], datetime):
711
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
712
+ else:
713
+ _query_params.append(('asAt', _params['as_at']))
714
+
715
+ if _params.get('effective_at') is not None: # noqa: E501
716
+ _query_params.append(('effectiveAt', _params['effective_at']))
717
+
718
+ if _params.get('page') is not None: # noqa: E501
719
+ _query_params.append(('page', _params['page']))
720
+
721
+ if _params.get('limit') is not None: # noqa: E501
722
+ _query_params.append(('limit', _params['limit']))
723
+
724
+ if _params.get('filter') is not None: # noqa: E501
725
+ _query_params.append(('filter', _params['filter']))
726
+
727
+ if _params.get('sort_by') is not None: # noqa: E501
728
+ _query_params.append(('sortBy', _params['sort_by']))
729
+ _collection_formats['sortBy'] = 'multi'
730
+
731
+ if _params.get('property_keys') is not None: # noqa: E501
732
+ _query_params.append(('propertyKeys', _params['property_keys']))
733
+ _collection_formats['propertyKeys'] = 'multi'
734
+
735
+ # process the header parameters
736
+ _header_params = dict(_params.get('_headers', {}))
737
+ # process the form parameters
738
+ _form_params = []
739
+ _files = {}
740
+ # process the body parameter
741
+ _body_params = None
742
+ # set the HTTP header `Accept`
743
+ _header_params['Accept'] = self.api_client.select_header_accept(
744
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
745
+
746
+ # authentication setting
747
+ _auth_settings = ['oauth2'] # noqa: E501
748
+
749
+ _response_types_map = {
750
+ '200': "PagedResourceListOfCheckDefinition",
751
+ '400': "LusidValidationProblemDetails",
752
+ }
753
+
754
+ return self.api_client.call_api(
755
+ '/api/dataquality/checkdefinitions', 'GET',
756
+ _path_params,
757
+ _query_params,
758
+ _header_params,
759
+ body=_body_params,
760
+ post_params=_form_params,
761
+ files=_files,
762
+ response_types_map=_response_types_map,
763
+ auth_settings=_auth_settings,
764
+ async_req=_params.get('async_req'),
765
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
766
+ _preload_content=_params.get('_preload_content', True),
767
+ _request_timeout=_params.get('_request_timeout'),
768
+ opts=_params.get('opts'),
769
+ collection_formats=_collection_formats,
770
+ _request_auth=_params.get('_request_auth'))
771
+
772
+
773
+ @overload
774
+ async def update_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], update_check_definition_request : Annotated[Optional[UpdateCheckDefinitionRequest], Field(description="The request containing the updated details of the Check Definition")] = None, **kwargs) -> CheckDefinition: # noqa: E501
775
+ ...
776
+
777
+ @overload
778
+ def update_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], update_check_definition_request : Annotated[Optional[UpdateCheckDefinitionRequest], Field(description="The request containing the updated details of the Check Definition")] = None, async_req: Optional[bool]=True, **kwargs) -> CheckDefinition: # noqa: E501
779
+ ...
780
+
781
+ @validate_arguments
782
+ def update_check_definition(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], update_check_definition_request : Annotated[Optional[UpdateCheckDefinitionRequest], Field(description="The request containing the updated details of the Check Definition")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[CheckDefinition, Awaitable[CheckDefinition]]: # noqa: E501
783
+ """[EXPERIMENTAL] UpdateCheckDefinition: Update Check Definition defined by scope and code # noqa: E501
784
+
785
+ Overwrites an existing Check Definition Update request has the same required fields as Create apart from the id. Returns the updated Check Definition at the current effectiveAt. Note that Check Definitions are mono-temporal, however they can have Time-Variant Properties. Updated Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
786
+ This method makes a synchronous HTTP request by default. To make an
787
+ asynchronous HTTP request, please pass async_req=True
788
+
789
+ >>> thread = api.update_check_definition(scope, code, update_check_definition_request, async_req=True)
790
+ >>> result = thread.get()
791
+
792
+ :param scope: The scope of the specified Check Definition. (required)
793
+ :type scope: str
794
+ :param code: The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition. (required)
795
+ :type code: str
796
+ :param update_check_definition_request: The request containing the updated details of the Check Definition
797
+ :type update_check_definition_request: UpdateCheckDefinitionRequest
798
+ :param async_req: Whether to execute the request asynchronously.
799
+ :type async_req: bool, optional
800
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
801
+ :param opts: Configuration options for this request
802
+ :type opts: ConfigurationOptions, optional
803
+ :return: Returns the result object.
804
+ If the method is called asynchronously,
805
+ returns the request thread.
806
+ :rtype: CheckDefinition
807
+ """
808
+ kwargs['_return_http_data_only'] = True
809
+ if '_preload_content' in kwargs:
810
+ message = "Error! Please call the update_check_definition_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
811
+ raise ValueError(message)
812
+ if async_req is not None:
813
+ kwargs['async_req'] = async_req
814
+ return self.update_check_definition_with_http_info(scope, code, update_check_definition_request, **kwargs) # noqa: E501
815
+
816
+ @validate_arguments
817
+ def update_check_definition_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the specified Check Definition.")], code : Annotated[StrictStr, Field(..., description="The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition.")], update_check_definition_request : Annotated[Optional[UpdateCheckDefinitionRequest], Field(description="The request containing the updated details of the Check Definition")] = None, **kwargs) -> ApiResponse: # noqa: E501
818
+ """[EXPERIMENTAL] UpdateCheckDefinition: Update Check Definition defined by scope and code # noqa: E501
819
+
820
+ Overwrites an existing Check Definition Update request has the same required fields as Create apart from the id. Returns the updated Check Definition at the current effectiveAt. Note that Check Definitions are mono-temporal, however they can have Time-Variant Properties. Updated Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
821
+ This method makes a synchronous HTTP request by default. To make an
822
+ asynchronous HTTP request, please pass async_req=True
823
+
824
+ >>> thread = api.update_check_definition_with_http_info(scope, code, update_check_definition_request, async_req=True)
825
+ >>> result = thread.get()
826
+
827
+ :param scope: The scope of the specified Check Definition. (required)
828
+ :type scope: str
829
+ :param code: The code of the specified Check Definition. Together with the domain and scope this uniquely identifies the Check Definition. (required)
830
+ :type code: str
831
+ :param update_check_definition_request: The request containing the updated details of the Check Definition
832
+ :type update_check_definition_request: UpdateCheckDefinitionRequest
833
+ :param async_req: Whether to execute the request asynchronously.
834
+ :type async_req: bool, optional
835
+ :param _preload_content: if False, the ApiResponse.data will
836
+ be set to none and raw_data will store the
837
+ HTTP response body without reading/decoding.
838
+ Default is True.
839
+ :type _preload_content: bool, optional
840
+ :param _return_http_data_only: response data instead of ApiResponse
841
+ object with status code, headers, etc
842
+ :type _return_http_data_only: bool, optional
843
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
844
+ :param opts: Configuration options for this request
845
+ :type opts: ConfigurationOptions, optional
846
+ :param _request_auth: set to override the auth_settings for an a single
847
+ request; this effectively ignores the authentication
848
+ in the spec for a single request.
849
+ :type _request_auth: dict, optional
850
+ :type _content_type: string, optional: force content-type for the request
851
+ :return: Returns the result object.
852
+ If the method is called asynchronously,
853
+ returns the request thread.
854
+ :rtype: tuple(CheckDefinition, status_code(int), headers(HTTPHeaderDict))
855
+ """
856
+
857
+ _params = locals()
858
+
859
+ _all_params = [
860
+ 'scope',
861
+ 'code',
862
+ 'update_check_definition_request'
863
+ ]
864
+ _all_params.extend(
865
+ [
866
+ 'async_req',
867
+ '_return_http_data_only',
868
+ '_preload_content',
869
+ '_request_timeout',
870
+ '_request_auth',
871
+ '_content_type',
872
+ '_headers',
873
+ 'opts'
874
+ ]
875
+ )
876
+
877
+ # validate the arguments
878
+ for _key, _val in _params['kwargs'].items():
879
+ if _key not in _all_params:
880
+ raise ApiTypeError(
881
+ "Got an unexpected keyword argument '%s'"
882
+ " to method update_check_definition" % _key
883
+ )
884
+ _params[_key] = _val
885
+ del _params['kwargs']
886
+
887
+ _collection_formats = {}
888
+
889
+ # process the path parameters
890
+ _path_params = {}
891
+ if _params['scope']:
892
+ _path_params['scope'] = _params['scope']
893
+
894
+ if _params['code']:
895
+ _path_params['code'] = _params['code']
896
+
897
+
898
+ # process the query parameters
899
+ _query_params = []
900
+ # process the header parameters
901
+ _header_params = dict(_params.get('_headers', {}))
902
+ # process the form parameters
903
+ _form_params = []
904
+ _files = {}
905
+ # process the body parameter
906
+ _body_params = None
907
+ if _params['update_check_definition_request'] is not None:
908
+ _body_params = _params['update_check_definition_request']
909
+
910
+ # set the HTTP header `Accept`
911
+ _header_params['Accept'] = self.api_client.select_header_accept(
912
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
913
+
914
+ # set the HTTP header `Content-Type`
915
+ _content_types_list = _params.get('_content_type',
916
+ self.api_client.select_header_content_type(
917
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
918
+ if _content_types_list:
919
+ _header_params['Content-Type'] = _content_types_list
920
+
921
+ # authentication setting
922
+ _auth_settings = ['oauth2'] # noqa: E501
923
+
924
+ _response_types_map = {
925
+ '200': "CheckDefinition",
926
+ '400': "LusidValidationProblemDetails",
927
+ }
928
+
929
+ return self.api_client.call_api(
930
+ '/api/dataquality/checkdefinitions/{scope}/{code}', 'PUT',
931
+ _path_params,
932
+ _query_params,
933
+ _header_params,
934
+ body=_body_params,
935
+ post_params=_form_params,
936
+ files=_files,
937
+ response_types_map=_response_types_map,
938
+ auth_settings=_auth_settings,
939
+ async_req=_params.get('async_req'),
940
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
941
+ _preload_content=_params.get('_preload_content', True),
942
+ _request_timeout=_params.get('_request_timeout'),
943
+ opts=_params.get('opts'),
944
+ collection_formats=_collection_formats,
945
+ _request_auth=_params.get('_request_auth'))