scope-client 1.4.994__py3-none-any.whl → 1.4.996__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.
- scope_client/api_bindings/__init__.py +4 -0
- scope_client/api_bindings/api/tasks_v1_api.py +573 -0
- scope_client/api_bindings/models/__init__.py +4 -0
- scope_client/api_bindings/models/permission_name.py +2 -0
- scope_client/api_bindings/models/post_task_validation_api_key.py +91 -0
- scope_client/api_bindings/models/put_task_connection_info.py +93 -0
- scope_client/api_bindings/models/task_connection_info.py +93 -0
- scope_client/api_bindings/models/task_validation_api_key.py +91 -0
- {scope_client-1.4.994.dist-info → scope_client-1.4.996.dist-info}/METADATA +1 -1
- {scope_client-1.4.994.dist-info → scope_client-1.4.996.dist-info}/RECORD +12 -8
- {scope_client-1.4.994.dist-info → scope_client-1.4.996.dist-info}/WHEEL +0 -0
- {scope_client-1.4.994.dist-info → scope_client-1.4.996.dist-info}/top_level.txt +0 -0
|
@@ -243,6 +243,7 @@ from scope_client.api_bindings.models.post_project import PostProject
|
|
|
243
243
|
from scope_client.api_bindings.models.post_role_binding import PostRoleBinding
|
|
244
244
|
from scope_client.api_bindings.models.post_service_account import PostServiceAccount
|
|
245
245
|
from scope_client.api_bindings.models.post_task_request import PostTaskRequest
|
|
246
|
+
from scope_client.api_bindings.models.post_task_validation_api_key import PostTaskValidationAPIKey
|
|
246
247
|
from scope_client.api_bindings.models.post_upsolve_tenant import PostUpsolveTenant
|
|
247
248
|
from scope_client.api_bindings.models.post_webhook import PostWebhook
|
|
248
249
|
from scope_client.api_bindings.models.post_workspace import PostWorkspace
|
|
@@ -256,6 +257,7 @@ from scope_client.api_bindings.models.put_job_state import PutJobState
|
|
|
256
257
|
from scope_client.api_bindings.models.put_model_metric_spec import PutModelMetricSpec
|
|
257
258
|
from scope_client.api_bindings.models.put_model_metrics_schedule import PutModelMetricsSchedule
|
|
258
259
|
from scope_client.api_bindings.models.put_retrieved_data import PutRetrievedData
|
|
260
|
+
from scope_client.api_bindings.models.put_task_connection_info import PutTaskConnectionInfo
|
|
259
261
|
from scope_client.api_bindings.models.put_task_state_cache_request import PutTaskStateCacheRequest
|
|
260
262
|
from scope_client.api_bindings.models.regex_config import RegexConfig
|
|
261
263
|
from scope_client.api_bindings.models.register_user import RegisterUser
|
|
@@ -301,9 +303,11 @@ from scope_client.api_bindings.models.sketch_metric import SketchMetric
|
|
|
301
303
|
from scope_client.api_bindings.models.sketch_point import SketchPoint
|
|
302
304
|
from scope_client.api_bindings.models.sketch_time_series import SketchTimeSeries
|
|
303
305
|
from scope_client.api_bindings.models.sort_order import SortOrder
|
|
306
|
+
from scope_client.api_bindings.models.task_connection_info import TaskConnectionInfo
|
|
304
307
|
from scope_client.api_bindings.models.task_mutation_response import TaskMutationResponse
|
|
305
308
|
from scope_client.api_bindings.models.task_read_response import TaskReadResponse
|
|
306
309
|
from scope_client.api_bindings.models.task_response import TaskResponse
|
|
310
|
+
from scope_client.api_bindings.models.task_validation_api_key import TaskValidationAPIKey
|
|
307
311
|
from scope_client.api_bindings.models.toxicity_config import ToxicityConfig
|
|
308
312
|
from scope_client.api_bindings.models.update_model_task_rules_job_spec import UpdateModelTaskRulesJobSpec
|
|
309
313
|
from scope_client.api_bindings.models.upsolve_token import UpsolveToken
|
|
@@ -19,7 +19,9 @@ from typing_extensions import Annotated
|
|
|
19
19
|
from pydantic import StrictStr
|
|
20
20
|
from scope_client.api_bindings.models.patch_task_request import PatchTaskRequest
|
|
21
21
|
from scope_client.api_bindings.models.post_task_request import PostTaskRequest
|
|
22
|
+
from scope_client.api_bindings.models.put_task_connection_info import PutTaskConnectionInfo
|
|
22
23
|
from scope_client.api_bindings.models.put_task_state_cache_request import PutTaskStateCacheRequest
|
|
24
|
+
from scope_client.api_bindings.models.task_connection_info import TaskConnectionInfo
|
|
23
25
|
from scope_client.api_bindings.models.task_mutation_response import TaskMutationResponse
|
|
24
26
|
from scope_client.api_bindings.models.task_read_response import TaskReadResponse
|
|
25
27
|
|
|
@@ -311,6 +313,276 @@ class TasksV1Api:
|
|
|
311
313
|
|
|
312
314
|
|
|
313
315
|
|
|
316
|
+
@validate_call
|
|
317
|
+
def get_task_connection_info(
|
|
318
|
+
self,
|
|
319
|
+
model_id: StrictStr,
|
|
320
|
+
_request_timeout: Union[
|
|
321
|
+
None,
|
|
322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
323
|
+
Tuple[
|
|
324
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
325
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
326
|
+
]
|
|
327
|
+
] = None,
|
|
328
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
329
|
+
_content_type: Optional[StrictStr] = None,
|
|
330
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
331
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
332
|
+
) -> TaskConnectionInfo:
|
|
333
|
+
"""Get Task Connection Info
|
|
334
|
+
|
|
335
|
+
Retrieve the task connection information. Requires model_task_get_connection_info permission.
|
|
336
|
+
|
|
337
|
+
:param model_id: (required)
|
|
338
|
+
:type model_id: str
|
|
339
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
340
|
+
number provided, it will be total request
|
|
341
|
+
timeout. It can also be a pair (tuple) of
|
|
342
|
+
(connection, read) timeouts.
|
|
343
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
344
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
345
|
+
request; this effectively ignores the
|
|
346
|
+
authentication in the spec for a single request.
|
|
347
|
+
:type _request_auth: dict, optional
|
|
348
|
+
:param _content_type: force content-type for the request.
|
|
349
|
+
:type _content_type: str, Optional
|
|
350
|
+
:param _headers: set to override the headers for a single
|
|
351
|
+
request; this effectively ignores the headers
|
|
352
|
+
in the spec for a single request.
|
|
353
|
+
:type _headers: dict, optional
|
|
354
|
+
:param _host_index: set to override the host_index for a single
|
|
355
|
+
request; this effectively ignores the host_index
|
|
356
|
+
in the spec for a single request.
|
|
357
|
+
:type _host_index: int, optional
|
|
358
|
+
:return: Returns the result object.
|
|
359
|
+
""" # noqa: E501
|
|
360
|
+
|
|
361
|
+
_param = self._get_task_connection_info_serialize(
|
|
362
|
+
model_id=model_id,
|
|
363
|
+
_request_auth=_request_auth,
|
|
364
|
+
_content_type=_content_type,
|
|
365
|
+
_headers=_headers,
|
|
366
|
+
_host_index=_host_index
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
370
|
+
'200': "TaskConnectionInfo",
|
|
371
|
+
'500': "InternalServerError",
|
|
372
|
+
'404': "NotFoundError",
|
|
373
|
+
'422': "HTTPValidationError",
|
|
374
|
+
}
|
|
375
|
+
response_data = self.api_client.call_api(
|
|
376
|
+
*_param,
|
|
377
|
+
_request_timeout=_request_timeout
|
|
378
|
+
)
|
|
379
|
+
response_data.read()
|
|
380
|
+
return self.api_client.response_deserialize(
|
|
381
|
+
response_data=response_data,
|
|
382
|
+
response_types_map=_response_types_map,
|
|
383
|
+
).data
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
@validate_call
|
|
387
|
+
def get_task_connection_info_with_http_info(
|
|
388
|
+
self,
|
|
389
|
+
model_id: StrictStr,
|
|
390
|
+
_request_timeout: Union[
|
|
391
|
+
None,
|
|
392
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
393
|
+
Tuple[
|
|
394
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
395
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
396
|
+
]
|
|
397
|
+
] = None,
|
|
398
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
399
|
+
_content_type: Optional[StrictStr] = None,
|
|
400
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
401
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
402
|
+
) -> ApiResponse[TaskConnectionInfo]:
|
|
403
|
+
"""Get Task Connection Info
|
|
404
|
+
|
|
405
|
+
Retrieve the task connection information. Requires model_task_get_connection_info permission.
|
|
406
|
+
|
|
407
|
+
:param model_id: (required)
|
|
408
|
+
:type model_id: str
|
|
409
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
410
|
+
number provided, it will be total request
|
|
411
|
+
timeout. It can also be a pair (tuple) of
|
|
412
|
+
(connection, read) timeouts.
|
|
413
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
414
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
415
|
+
request; this effectively ignores the
|
|
416
|
+
authentication in the spec for a single request.
|
|
417
|
+
:type _request_auth: dict, optional
|
|
418
|
+
:param _content_type: force content-type for the request.
|
|
419
|
+
:type _content_type: str, Optional
|
|
420
|
+
:param _headers: set to override the headers for a single
|
|
421
|
+
request; this effectively ignores the headers
|
|
422
|
+
in the spec for a single request.
|
|
423
|
+
:type _headers: dict, optional
|
|
424
|
+
:param _host_index: set to override the host_index for a single
|
|
425
|
+
request; this effectively ignores the host_index
|
|
426
|
+
in the spec for a single request.
|
|
427
|
+
:type _host_index: int, optional
|
|
428
|
+
:return: Returns the result object.
|
|
429
|
+
""" # noqa: E501
|
|
430
|
+
|
|
431
|
+
_param = self._get_task_connection_info_serialize(
|
|
432
|
+
model_id=model_id,
|
|
433
|
+
_request_auth=_request_auth,
|
|
434
|
+
_content_type=_content_type,
|
|
435
|
+
_headers=_headers,
|
|
436
|
+
_host_index=_host_index
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
440
|
+
'200': "TaskConnectionInfo",
|
|
441
|
+
'500': "InternalServerError",
|
|
442
|
+
'404': "NotFoundError",
|
|
443
|
+
'422': "HTTPValidationError",
|
|
444
|
+
}
|
|
445
|
+
response_data = self.api_client.call_api(
|
|
446
|
+
*_param,
|
|
447
|
+
_request_timeout=_request_timeout
|
|
448
|
+
)
|
|
449
|
+
response_data.read()
|
|
450
|
+
return self.api_client.response_deserialize(
|
|
451
|
+
response_data=response_data,
|
|
452
|
+
response_types_map=_response_types_map,
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
@validate_call
|
|
457
|
+
def get_task_connection_info_without_preload_content(
|
|
458
|
+
self,
|
|
459
|
+
model_id: StrictStr,
|
|
460
|
+
_request_timeout: Union[
|
|
461
|
+
None,
|
|
462
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
463
|
+
Tuple[
|
|
464
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
465
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
466
|
+
]
|
|
467
|
+
] = None,
|
|
468
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
469
|
+
_content_type: Optional[StrictStr] = None,
|
|
470
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
471
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
472
|
+
) -> RESTResponseType:
|
|
473
|
+
"""Get Task Connection Info
|
|
474
|
+
|
|
475
|
+
Retrieve the task connection information. Requires model_task_get_connection_info permission.
|
|
476
|
+
|
|
477
|
+
:param model_id: (required)
|
|
478
|
+
:type model_id: str
|
|
479
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
480
|
+
number provided, it will be total request
|
|
481
|
+
timeout. It can also be a pair (tuple) of
|
|
482
|
+
(connection, read) timeouts.
|
|
483
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
484
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
485
|
+
request; this effectively ignores the
|
|
486
|
+
authentication in the spec for a single request.
|
|
487
|
+
:type _request_auth: dict, optional
|
|
488
|
+
:param _content_type: force content-type for the request.
|
|
489
|
+
:type _content_type: str, Optional
|
|
490
|
+
:param _headers: set to override the headers for a single
|
|
491
|
+
request; this effectively ignores the headers
|
|
492
|
+
in the spec for a single request.
|
|
493
|
+
:type _headers: dict, optional
|
|
494
|
+
:param _host_index: set to override the host_index for a single
|
|
495
|
+
request; this effectively ignores the host_index
|
|
496
|
+
in the spec for a single request.
|
|
497
|
+
:type _host_index: int, optional
|
|
498
|
+
:return: Returns the result object.
|
|
499
|
+
""" # noqa: E501
|
|
500
|
+
|
|
501
|
+
_param = self._get_task_connection_info_serialize(
|
|
502
|
+
model_id=model_id,
|
|
503
|
+
_request_auth=_request_auth,
|
|
504
|
+
_content_type=_content_type,
|
|
505
|
+
_headers=_headers,
|
|
506
|
+
_host_index=_host_index
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
510
|
+
'200': "TaskConnectionInfo",
|
|
511
|
+
'500': "InternalServerError",
|
|
512
|
+
'404': "NotFoundError",
|
|
513
|
+
'422': "HTTPValidationError",
|
|
514
|
+
}
|
|
515
|
+
response_data = self.api_client.call_api(
|
|
516
|
+
*_param,
|
|
517
|
+
_request_timeout=_request_timeout
|
|
518
|
+
)
|
|
519
|
+
return response_data.response
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
def _get_task_connection_info_serialize(
|
|
523
|
+
self,
|
|
524
|
+
model_id,
|
|
525
|
+
_request_auth,
|
|
526
|
+
_content_type,
|
|
527
|
+
_headers,
|
|
528
|
+
_host_index,
|
|
529
|
+
) -> RequestSerialized:
|
|
530
|
+
|
|
531
|
+
_host = None
|
|
532
|
+
|
|
533
|
+
_collection_formats: Dict[str, str] = {
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
_path_params: Dict[str, str] = {}
|
|
537
|
+
_query_params: List[Tuple[str, str]] = []
|
|
538
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
539
|
+
_form_params: List[Tuple[str, str]] = []
|
|
540
|
+
_files: Dict[
|
|
541
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
542
|
+
] = {}
|
|
543
|
+
_body_params: Optional[bytes] = None
|
|
544
|
+
|
|
545
|
+
# process the path parameters
|
|
546
|
+
if model_id is not None:
|
|
547
|
+
_path_params['model_id'] = model_id
|
|
548
|
+
# process the query parameters
|
|
549
|
+
# process the header parameters
|
|
550
|
+
# process the form parameters
|
|
551
|
+
# process the body parameter
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
# set the HTTP header `Accept`
|
|
555
|
+
if 'Accept' not in _header_params:
|
|
556
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
557
|
+
[
|
|
558
|
+
'application/json'
|
|
559
|
+
]
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
# authentication setting
|
|
564
|
+
_auth_settings: List[str] = [
|
|
565
|
+
'OAuth2AuthorizationCode'
|
|
566
|
+
]
|
|
567
|
+
|
|
568
|
+
return self.api_client.param_serialize(
|
|
569
|
+
method='GET',
|
|
570
|
+
resource_path='/api/v1/models/{model_id}/task/connection_info',
|
|
571
|
+
path_params=_path_params,
|
|
572
|
+
query_params=_query_params,
|
|
573
|
+
header_params=_header_params,
|
|
574
|
+
body=_body_params,
|
|
575
|
+
post_params=_form_params,
|
|
576
|
+
files=_files,
|
|
577
|
+
auth_settings=_auth_settings,
|
|
578
|
+
collection_formats=_collection_formats,
|
|
579
|
+
_host=_host,
|
|
580
|
+
_request_auth=_request_auth
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
314
586
|
@validate_call
|
|
315
587
|
def get_task_state_cache(
|
|
316
588
|
self,
|
|
@@ -1183,6 +1455,307 @@ class TasksV1Api:
|
|
|
1183
1455
|
|
|
1184
1456
|
|
|
1185
1457
|
|
|
1458
|
+
@validate_call
|
|
1459
|
+
def put_task_connection_info(
|
|
1460
|
+
self,
|
|
1461
|
+
model_id: StrictStr,
|
|
1462
|
+
put_task_connection_info: PutTaskConnectionInfo,
|
|
1463
|
+
_request_timeout: Union[
|
|
1464
|
+
None,
|
|
1465
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1466
|
+
Tuple[
|
|
1467
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1468
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1469
|
+
]
|
|
1470
|
+
] = None,
|
|
1471
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1472
|
+
_content_type: Optional[StrictStr] = None,
|
|
1473
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1474
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1475
|
+
) -> TaskConnectionInfo:
|
|
1476
|
+
"""Upload Task State
|
|
1477
|
+
|
|
1478
|
+
Upload the task connection information. Requires model_task_put_connection_info permission.
|
|
1479
|
+
|
|
1480
|
+
:param model_id: (required)
|
|
1481
|
+
:type model_id: str
|
|
1482
|
+
:param put_task_connection_info: (required)
|
|
1483
|
+
:type put_task_connection_info: PutTaskConnectionInfo
|
|
1484
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1485
|
+
number provided, it will be total request
|
|
1486
|
+
timeout. It can also be a pair (tuple) of
|
|
1487
|
+
(connection, read) timeouts.
|
|
1488
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1489
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1490
|
+
request; this effectively ignores the
|
|
1491
|
+
authentication in the spec for a single request.
|
|
1492
|
+
:type _request_auth: dict, optional
|
|
1493
|
+
:param _content_type: force content-type for the request.
|
|
1494
|
+
:type _content_type: str, Optional
|
|
1495
|
+
:param _headers: set to override the headers for a single
|
|
1496
|
+
request; this effectively ignores the headers
|
|
1497
|
+
in the spec for a single request.
|
|
1498
|
+
:type _headers: dict, optional
|
|
1499
|
+
:param _host_index: set to override the host_index for a single
|
|
1500
|
+
request; this effectively ignores the host_index
|
|
1501
|
+
in the spec for a single request.
|
|
1502
|
+
:type _host_index: int, optional
|
|
1503
|
+
:return: Returns the result object.
|
|
1504
|
+
""" # noqa: E501
|
|
1505
|
+
|
|
1506
|
+
_param = self._put_task_connection_info_serialize(
|
|
1507
|
+
model_id=model_id,
|
|
1508
|
+
put_task_connection_info=put_task_connection_info,
|
|
1509
|
+
_request_auth=_request_auth,
|
|
1510
|
+
_content_type=_content_type,
|
|
1511
|
+
_headers=_headers,
|
|
1512
|
+
_host_index=_host_index
|
|
1513
|
+
)
|
|
1514
|
+
|
|
1515
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1516
|
+
'200': "TaskConnectionInfo",
|
|
1517
|
+
'500': "InternalServerError",
|
|
1518
|
+
'404': "NotFoundError",
|
|
1519
|
+
'400': "BadRequestError",
|
|
1520
|
+
'422': "HTTPValidationError",
|
|
1521
|
+
}
|
|
1522
|
+
response_data = self.api_client.call_api(
|
|
1523
|
+
*_param,
|
|
1524
|
+
_request_timeout=_request_timeout
|
|
1525
|
+
)
|
|
1526
|
+
response_data.read()
|
|
1527
|
+
return self.api_client.response_deserialize(
|
|
1528
|
+
response_data=response_data,
|
|
1529
|
+
response_types_map=_response_types_map,
|
|
1530
|
+
).data
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
@validate_call
|
|
1534
|
+
def put_task_connection_info_with_http_info(
|
|
1535
|
+
self,
|
|
1536
|
+
model_id: StrictStr,
|
|
1537
|
+
put_task_connection_info: PutTaskConnectionInfo,
|
|
1538
|
+
_request_timeout: Union[
|
|
1539
|
+
None,
|
|
1540
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1541
|
+
Tuple[
|
|
1542
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1543
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1544
|
+
]
|
|
1545
|
+
] = None,
|
|
1546
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1547
|
+
_content_type: Optional[StrictStr] = None,
|
|
1548
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1549
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1550
|
+
) -> ApiResponse[TaskConnectionInfo]:
|
|
1551
|
+
"""Upload Task State
|
|
1552
|
+
|
|
1553
|
+
Upload the task connection information. Requires model_task_put_connection_info permission.
|
|
1554
|
+
|
|
1555
|
+
:param model_id: (required)
|
|
1556
|
+
:type model_id: str
|
|
1557
|
+
:param put_task_connection_info: (required)
|
|
1558
|
+
:type put_task_connection_info: PutTaskConnectionInfo
|
|
1559
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1560
|
+
number provided, it will be total request
|
|
1561
|
+
timeout. It can also be a pair (tuple) of
|
|
1562
|
+
(connection, read) timeouts.
|
|
1563
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1564
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1565
|
+
request; this effectively ignores the
|
|
1566
|
+
authentication in the spec for a single request.
|
|
1567
|
+
:type _request_auth: dict, optional
|
|
1568
|
+
:param _content_type: force content-type for the request.
|
|
1569
|
+
:type _content_type: str, Optional
|
|
1570
|
+
:param _headers: set to override the headers for a single
|
|
1571
|
+
request; this effectively ignores the headers
|
|
1572
|
+
in the spec for a single request.
|
|
1573
|
+
:type _headers: dict, optional
|
|
1574
|
+
:param _host_index: set to override the host_index for a single
|
|
1575
|
+
request; this effectively ignores the host_index
|
|
1576
|
+
in the spec for a single request.
|
|
1577
|
+
:type _host_index: int, optional
|
|
1578
|
+
:return: Returns the result object.
|
|
1579
|
+
""" # noqa: E501
|
|
1580
|
+
|
|
1581
|
+
_param = self._put_task_connection_info_serialize(
|
|
1582
|
+
model_id=model_id,
|
|
1583
|
+
put_task_connection_info=put_task_connection_info,
|
|
1584
|
+
_request_auth=_request_auth,
|
|
1585
|
+
_content_type=_content_type,
|
|
1586
|
+
_headers=_headers,
|
|
1587
|
+
_host_index=_host_index
|
|
1588
|
+
)
|
|
1589
|
+
|
|
1590
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1591
|
+
'200': "TaskConnectionInfo",
|
|
1592
|
+
'500': "InternalServerError",
|
|
1593
|
+
'404': "NotFoundError",
|
|
1594
|
+
'400': "BadRequestError",
|
|
1595
|
+
'422': "HTTPValidationError",
|
|
1596
|
+
}
|
|
1597
|
+
response_data = self.api_client.call_api(
|
|
1598
|
+
*_param,
|
|
1599
|
+
_request_timeout=_request_timeout
|
|
1600
|
+
)
|
|
1601
|
+
response_data.read()
|
|
1602
|
+
return self.api_client.response_deserialize(
|
|
1603
|
+
response_data=response_data,
|
|
1604
|
+
response_types_map=_response_types_map,
|
|
1605
|
+
)
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
@validate_call
|
|
1609
|
+
def put_task_connection_info_without_preload_content(
|
|
1610
|
+
self,
|
|
1611
|
+
model_id: StrictStr,
|
|
1612
|
+
put_task_connection_info: PutTaskConnectionInfo,
|
|
1613
|
+
_request_timeout: Union[
|
|
1614
|
+
None,
|
|
1615
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1616
|
+
Tuple[
|
|
1617
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1618
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1619
|
+
]
|
|
1620
|
+
] = None,
|
|
1621
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1622
|
+
_content_type: Optional[StrictStr] = None,
|
|
1623
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1624
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1625
|
+
) -> RESTResponseType:
|
|
1626
|
+
"""Upload Task State
|
|
1627
|
+
|
|
1628
|
+
Upload the task connection information. Requires model_task_put_connection_info permission.
|
|
1629
|
+
|
|
1630
|
+
:param model_id: (required)
|
|
1631
|
+
:type model_id: str
|
|
1632
|
+
:param put_task_connection_info: (required)
|
|
1633
|
+
:type put_task_connection_info: PutTaskConnectionInfo
|
|
1634
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1635
|
+
number provided, it will be total request
|
|
1636
|
+
timeout. It can also be a pair (tuple) of
|
|
1637
|
+
(connection, read) timeouts.
|
|
1638
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1639
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1640
|
+
request; this effectively ignores the
|
|
1641
|
+
authentication in the spec for a single request.
|
|
1642
|
+
:type _request_auth: dict, optional
|
|
1643
|
+
:param _content_type: force content-type for the request.
|
|
1644
|
+
:type _content_type: str, Optional
|
|
1645
|
+
:param _headers: set to override the headers for a single
|
|
1646
|
+
request; this effectively ignores the headers
|
|
1647
|
+
in the spec for a single request.
|
|
1648
|
+
:type _headers: dict, optional
|
|
1649
|
+
:param _host_index: set to override the host_index for a single
|
|
1650
|
+
request; this effectively ignores the host_index
|
|
1651
|
+
in the spec for a single request.
|
|
1652
|
+
:type _host_index: int, optional
|
|
1653
|
+
:return: Returns the result object.
|
|
1654
|
+
""" # noqa: E501
|
|
1655
|
+
|
|
1656
|
+
_param = self._put_task_connection_info_serialize(
|
|
1657
|
+
model_id=model_id,
|
|
1658
|
+
put_task_connection_info=put_task_connection_info,
|
|
1659
|
+
_request_auth=_request_auth,
|
|
1660
|
+
_content_type=_content_type,
|
|
1661
|
+
_headers=_headers,
|
|
1662
|
+
_host_index=_host_index
|
|
1663
|
+
)
|
|
1664
|
+
|
|
1665
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1666
|
+
'200': "TaskConnectionInfo",
|
|
1667
|
+
'500': "InternalServerError",
|
|
1668
|
+
'404': "NotFoundError",
|
|
1669
|
+
'400': "BadRequestError",
|
|
1670
|
+
'422': "HTTPValidationError",
|
|
1671
|
+
}
|
|
1672
|
+
response_data = self.api_client.call_api(
|
|
1673
|
+
*_param,
|
|
1674
|
+
_request_timeout=_request_timeout
|
|
1675
|
+
)
|
|
1676
|
+
return response_data.response
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
def _put_task_connection_info_serialize(
|
|
1680
|
+
self,
|
|
1681
|
+
model_id,
|
|
1682
|
+
put_task_connection_info,
|
|
1683
|
+
_request_auth,
|
|
1684
|
+
_content_type,
|
|
1685
|
+
_headers,
|
|
1686
|
+
_host_index,
|
|
1687
|
+
) -> RequestSerialized:
|
|
1688
|
+
|
|
1689
|
+
_host = None
|
|
1690
|
+
|
|
1691
|
+
_collection_formats: Dict[str, str] = {
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
_path_params: Dict[str, str] = {}
|
|
1695
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1696
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1697
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1698
|
+
_files: Dict[
|
|
1699
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1700
|
+
] = {}
|
|
1701
|
+
_body_params: Optional[bytes] = None
|
|
1702
|
+
|
|
1703
|
+
# process the path parameters
|
|
1704
|
+
if model_id is not None:
|
|
1705
|
+
_path_params['model_id'] = model_id
|
|
1706
|
+
# process the query parameters
|
|
1707
|
+
# process the header parameters
|
|
1708
|
+
# process the form parameters
|
|
1709
|
+
# process the body parameter
|
|
1710
|
+
if put_task_connection_info is not None:
|
|
1711
|
+
_body_params = put_task_connection_info
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
# set the HTTP header `Accept`
|
|
1715
|
+
if 'Accept' not in _header_params:
|
|
1716
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1717
|
+
[
|
|
1718
|
+
'application/json'
|
|
1719
|
+
]
|
|
1720
|
+
)
|
|
1721
|
+
|
|
1722
|
+
# set the HTTP header `Content-Type`
|
|
1723
|
+
if _content_type:
|
|
1724
|
+
_header_params['Content-Type'] = _content_type
|
|
1725
|
+
else:
|
|
1726
|
+
_default_content_type = (
|
|
1727
|
+
self.api_client.select_header_content_type(
|
|
1728
|
+
[
|
|
1729
|
+
'application/json'
|
|
1730
|
+
]
|
|
1731
|
+
)
|
|
1732
|
+
)
|
|
1733
|
+
if _default_content_type is not None:
|
|
1734
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1735
|
+
|
|
1736
|
+
# authentication setting
|
|
1737
|
+
_auth_settings: List[str] = [
|
|
1738
|
+
'OAuth2AuthorizationCode'
|
|
1739
|
+
]
|
|
1740
|
+
|
|
1741
|
+
return self.api_client.param_serialize(
|
|
1742
|
+
method='PUT',
|
|
1743
|
+
resource_path='/api/v1/models/{model_id}/task/connection_info',
|
|
1744
|
+
path_params=_path_params,
|
|
1745
|
+
query_params=_query_params,
|
|
1746
|
+
header_params=_header_params,
|
|
1747
|
+
body=_body_params,
|
|
1748
|
+
post_params=_form_params,
|
|
1749
|
+
files=_files,
|
|
1750
|
+
auth_settings=_auth_settings,
|
|
1751
|
+
collection_formats=_collection_formats,
|
|
1752
|
+
_host=_host,
|
|
1753
|
+
_request_auth=_request_auth
|
|
1754
|
+
)
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1186
1759
|
@validate_call
|
|
1187
1760
|
def put_task_state_cache(
|
|
1188
1761
|
self,
|
|
@@ -201,6 +201,7 @@ from scope_client.api_bindings.models.post_project import PostProject
|
|
|
201
201
|
from scope_client.api_bindings.models.post_role_binding import PostRoleBinding
|
|
202
202
|
from scope_client.api_bindings.models.post_service_account import PostServiceAccount
|
|
203
203
|
from scope_client.api_bindings.models.post_task_request import PostTaskRequest
|
|
204
|
+
from scope_client.api_bindings.models.post_task_validation_api_key import PostTaskValidationAPIKey
|
|
204
205
|
from scope_client.api_bindings.models.post_upsolve_tenant import PostUpsolveTenant
|
|
205
206
|
from scope_client.api_bindings.models.post_webhook import PostWebhook
|
|
206
207
|
from scope_client.api_bindings.models.post_workspace import PostWorkspace
|
|
@@ -214,6 +215,7 @@ from scope_client.api_bindings.models.put_job_state import PutJobState
|
|
|
214
215
|
from scope_client.api_bindings.models.put_model_metric_spec import PutModelMetricSpec
|
|
215
216
|
from scope_client.api_bindings.models.put_model_metrics_schedule import PutModelMetricsSchedule
|
|
216
217
|
from scope_client.api_bindings.models.put_retrieved_data import PutRetrievedData
|
|
218
|
+
from scope_client.api_bindings.models.put_task_connection_info import PutTaskConnectionInfo
|
|
217
219
|
from scope_client.api_bindings.models.put_task_state_cache_request import PutTaskStateCacheRequest
|
|
218
220
|
from scope_client.api_bindings.models.regex_config import RegexConfig
|
|
219
221
|
from scope_client.api_bindings.models.register_user import RegisterUser
|
|
@@ -259,9 +261,11 @@ from scope_client.api_bindings.models.sketch_metric import SketchMetric
|
|
|
259
261
|
from scope_client.api_bindings.models.sketch_point import SketchPoint
|
|
260
262
|
from scope_client.api_bindings.models.sketch_time_series import SketchTimeSeries
|
|
261
263
|
from scope_client.api_bindings.models.sort_order import SortOrder
|
|
264
|
+
from scope_client.api_bindings.models.task_connection_info import TaskConnectionInfo
|
|
262
265
|
from scope_client.api_bindings.models.task_mutation_response import TaskMutationResponse
|
|
263
266
|
from scope_client.api_bindings.models.task_read_response import TaskReadResponse
|
|
264
267
|
from scope_client.api_bindings.models.task_response import TaskResponse
|
|
268
|
+
from scope_client.api_bindings.models.task_validation_api_key import TaskValidationAPIKey
|
|
265
269
|
from scope_client.api_bindings.models.toxicity_config import ToxicityConfig
|
|
266
270
|
from scope_client.api_bindings.models.update_model_task_rules_job_spec import UpdateModelTaskRulesJobSpec
|
|
267
271
|
from scope_client.api_bindings.models.upsolve_token import UpsolveToken
|
|
@@ -105,6 +105,8 @@ class PermissionName(str, Enum):
|
|
|
105
105
|
MODEL_TASK_DELETE = 'model_task_delete'
|
|
106
106
|
MODEL_TASK_SYNC = 'model_task_sync'
|
|
107
107
|
MODEL_TASK_PUT_STATE_CACHE = 'model_task_put_state_cache'
|
|
108
|
+
MODEL_TASK_PUT_CONNECTION_INFO = 'model_task_put_connection_info'
|
|
109
|
+
MODEL_TASK_GET_CONNECTION_INFO = 'model_task_get_connection_info'
|
|
108
110
|
CONNECTOR_READ = 'connector_read'
|
|
109
111
|
CONNECTOR_UPDATE = 'connector_update'
|
|
110
112
|
CONNECTOR_DELETE = 'connector_delete'
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arthur Scope
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class PostTaskValidationAPIKey(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
PostTaskValidationAPIKey
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: StrictStr = Field(description="The Shield ID for the API key.")
|
|
30
|
+
name: StrictStr = Field(description="The user-friendly name of the API key.")
|
|
31
|
+
key: StrictStr = Field(description="The value of the API key.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["id", "name", "key"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of PostTaskValidationAPIKey from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of PostTaskValidationAPIKey from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"id": obj.get("id"),
|
|
86
|
+
"name": obj.get("name"),
|
|
87
|
+
"key": obj.get("key")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arthur Scope
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from scope_client.api_bindings.models.post_task_validation_api_key import PostTaskValidationAPIKey
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PutTaskConnectionInfo(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PutTaskConnectionInfo
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
validation_key: PostTaskValidationAPIKey = Field(description="The information for the API key with validation permissions for the task.")
|
|
31
|
+
api_host: StrictStr = Field(description="Host for the task.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["validation_key", "api_host"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of PutTaskConnectionInfo from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of validation_key
|
|
74
|
+
if self.validation_key:
|
|
75
|
+
_dict['validation_key'] = self.validation_key.to_dict()
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of PutTaskConnectionInfo from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"validation_key": PostTaskValidationAPIKey.from_dict(obj["validation_key"]) if obj.get("validation_key") is not None else None,
|
|
89
|
+
"api_host": obj.get("api_host")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arthur Scope
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from scope_client.api_bindings.models.task_validation_api_key import TaskValidationAPIKey
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class TaskConnectionInfo(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
TaskConnectionInfo
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
validation_key: TaskValidationAPIKey = Field(description="The information for the API key with validation permissions for the task.")
|
|
31
|
+
api_host: StrictStr = Field(description="Host for the task.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["validation_key", "api_host"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of TaskConnectionInfo from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of validation_key
|
|
74
|
+
if self.validation_key:
|
|
75
|
+
_dict['validation_key'] = self.validation_key.to_dict()
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of TaskConnectionInfo from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"validation_key": TaskValidationAPIKey.from_dict(obj["validation_key"]) if obj.get("validation_key") is not None else None,
|
|
89
|
+
"api_host": obj.get("api_host")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arthur Scope
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, SecretStr, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class TaskValidationAPIKey(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
TaskValidationAPIKey
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: StrictStr = Field(description="The Shield ID for the API key.")
|
|
30
|
+
name: StrictStr = Field(description="The user-friendly name of the API key.")
|
|
31
|
+
key: SecretStr = Field(description="The value of the API key.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["id", "name", "key"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of TaskValidationAPIKey from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of TaskValidationAPIKey from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"id": obj.get("id"),
|
|
86
|
+
"name": obj.get("name"),
|
|
87
|
+
"key": obj.get("key")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
scope_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
scope_client/api_bindings/__init__.py,sha256=
|
|
2
|
+
scope_client/api_bindings/__init__.py,sha256=J6R4LV1VgJqdoZ9FfYlt8iaCSUtxMDlLRqaSYtHlgiM,24793
|
|
3
3
|
scope_client/api_bindings/api_client.py,sha256=nkt88XDyPiuURu94lnI4MtOfMeYXd_jazGUde0T4xVU,27538
|
|
4
4
|
scope_client/api_bindings/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
5
5
|
scope_client/api_bindings/configuration.py,sha256=a0o2OhNYo7GdZscfNtFKW2kfgoln1mcWE-8E_UeiWv8,15338
|
|
@@ -27,12 +27,12 @@ scope_client/api_bindings/api/organizations_v1_api.py,sha256=qASaaC_sSMmY97VKhop
|
|
|
27
27
|
scope_client/api_bindings/api/projects_v1_api.py,sha256=wFqaLcwwxQDrF10VtOgaa8PbOE5VaC6ERNCSrRJaUFQ,59391
|
|
28
28
|
scope_client/api_bindings/api/registration_v1_api.py,sha256=cPmagSOgnne2cZNgYDKm2L7SZmy8tsaL_xZBFekmnH8,12175
|
|
29
29
|
scope_client/api_bindings/api/roles_v1_api.py,sha256=LnlGL0BhhNAsXpIIkCyoBV765rw2bcIwWPz3EsyQi18,11234
|
|
30
|
-
scope_client/api_bindings/api/tasks_v1_api.py,sha256=
|
|
30
|
+
scope_client/api_bindings/api/tasks_v1_api.py,sha256=oi9_V_ahTkWv84Fa05ys_-agfAmndGwlPXnVzR9sEEo,91189
|
|
31
31
|
scope_client/api_bindings/api/upsolve_v1_api.py,sha256=Vdep9x-_lIJq_kOwtsGqYqkssgSaCEy45_WDupKwrgA,12230
|
|
32
32
|
scope_client/api_bindings/api/users_v1_api.py,sha256=3DpuXoHuWZvN8hU409AuyltBBwfK1PEBTeF5kKnlaek,114510
|
|
33
33
|
scope_client/api_bindings/api/webhooks_v1_api.py,sha256=86tRi7pgwICshf8WVyYA1WrJggThpnsTaON9Mx8R-0M,71286
|
|
34
34
|
scope_client/api_bindings/api/workspaces_v1_api.py,sha256=OjMc-pJe2JAGgv5ZGTD8_TkQxw82vz2e381-5m37vJ4,58653
|
|
35
|
-
scope_client/api_bindings/models/__init__.py,sha256=
|
|
35
|
+
scope_client/api_bindings/models/__init__.py,sha256=7yaJ6hmZV24o7sFTjXmTbFPqbCDuzifSd6iIBEyMC80,22206
|
|
36
36
|
scope_client/api_bindings/models/aggregation_metric_type.py,sha256=USKpDqhX4TQ4lqIoHOp3q70mydsf1u_zc1EKus9QhYo,783
|
|
37
37
|
scope_client/api_bindings/models/aggregation_spec.py,sha256=gWFTgLqxNdiIw4iXwbNqKAnAwDpbcgeoFfQ_7VxtKOQ,4109
|
|
38
38
|
scope_client/api_bindings/models/aggregation_spec_schema.py,sha256=MHGlB9eF8NfOasOHiqj1ZzYiBaIl8y8J2SmQysoSWVU,4624
|
|
@@ -184,7 +184,7 @@ scope_client/api_bindings/models/patch_user.py,sha256=Q_RqYiqCFjWsHfTWK0RqpdKpJu
|
|
|
184
184
|
scope_client/api_bindings/models/patch_webhook.py,sha256=Nck18gezSVXn3Tsn2FgbmaVWvlajrm_rRY1Lt7XKRtU,3571
|
|
185
185
|
scope_client/api_bindings/models/patch_workspace.py,sha256=oX4U-aAgTlCZr5Xor8tyZWBZBll5BwgCeqNXyfC4rAc,2530
|
|
186
186
|
scope_client/api_bindings/models/permission.py,sha256=uxCnKjgZwGxr_-BidbwKWt_TVRnDhtliWd6uq9qI7yU,3002
|
|
187
|
-
scope_client/api_bindings/models/permission_name.py,sha256=
|
|
187
|
+
scope_client/api_bindings/models/permission_name.py,sha256=S9oimqQ9KCvM8u2HYRZ0bw57G35247JGB6t2iZ8cZyk,7810
|
|
188
188
|
scope_client/api_bindings/models/permission_request_item.py,sha256=czzZsHDgvFOyZe8mjnPJtYO-eDz42jzqjzPtGfPketc,3084
|
|
189
189
|
scope_client/api_bindings/models/permission_response_item.py,sha256=7D0mG1etQeYIYE9U6if8zIgJh0JEQOruk5aH6TtiNtw,3262
|
|
190
190
|
scope_client/api_bindings/models/permissions_request.py,sha256=dbh_2kJdTzuZzZ8UjQAdfxnDtOXwFeDIzvdflOaU_3A,3311
|
|
@@ -220,6 +220,7 @@ scope_client/api_bindings/models/post_project.py,sha256=8yrNEepmtdckb75U32g9A9pZ
|
|
|
220
220
|
scope_client/api_bindings/models/post_role_binding.py,sha256=eaw4eELQLRNlBJoMaK6Sb8WcikYqc7NR1shQKMhr2RE,3173
|
|
221
221
|
scope_client/api_bindings/models/post_service_account.py,sha256=KaOLpnB_kI0Cj1XMFVV3-HYBBhnMFkU9Q7dIhcIuOug,2551
|
|
222
222
|
scope_client/api_bindings/models/post_task_request.py,sha256=Y80glGQl7viuzp2a7tw6WpFUN65DefO0QY5xOoOMsZ8,3978
|
|
223
|
+
scope_client/api_bindings/models/post_task_validation_api_key.py,sha256=ri3QbNmVtxOPAFzmf_vLxmGz6jrw-0SDdnUgSir9CRw,2807
|
|
223
224
|
scope_client/api_bindings/models/post_upsolve_tenant.py,sha256=irDLUIOXKXX5DDS-0U0NixgFC1R9R5_OD3H94DctzsU,2869
|
|
224
225
|
scope_client/api_bindings/models/post_webhook.py,sha256=DRcXlSxpJHbtHbBhyWHMtfkw5pv4XJGQyR4xUgkw_uc,2909
|
|
225
226
|
scope_client/api_bindings/models/post_workspace.py,sha256=lZYMoo_9WcGEMMe9LDqTKX54jCHlqPAeo23Z4sQKarA,2526
|
|
@@ -233,6 +234,7 @@ scope_client/api_bindings/models/put_job_state.py,sha256=EJblUagbLQsV19ox-Dd7gP8
|
|
|
233
234
|
scope_client/api_bindings/models/put_model_metric_spec.py,sha256=UbR3DKfQx681epiBzU2rmrgE7XG3sePOepIaOF3mn0A,3204
|
|
234
235
|
scope_client/api_bindings/models/put_model_metrics_schedule.py,sha256=IV7Hb5ZXc_9lqT2A2S_rbGGS1A7vA_IrqgkXlCiEjF4,3175
|
|
235
236
|
scope_client/api_bindings/models/put_retrieved_data.py,sha256=WDSM5cHFoevAGyyLqfiB8ExxW4FCQf1a5XBSNhqGdKI,2547
|
|
237
|
+
scope_client/api_bindings/models/put_task_connection_info.py,sha256=eRYRUlhu3p-csmQIJRsLPO0VSIBTokGiGiMueX9XQxY,3162
|
|
236
238
|
scope_client/api_bindings/models/put_task_state_cache_request.py,sha256=KKXZlrZQqzB09NlJWHFB6h0nJ64DWU9dtk4mZmu0jSs,2879
|
|
237
239
|
scope_client/api_bindings/models/regex_config.py,sha256=y_miFKVjeqFGoF-O2Eo4Xt7wdBWbTzVWvZI8ZJfSXHA,2661
|
|
238
240
|
scope_client/api_bindings/models/register_user.py,sha256=n7yUSYBkZs1QH_jnqODH-Ht9_bffV99ftyenywDDjeo,2521
|
|
@@ -278,9 +280,11 @@ scope_client/api_bindings/models/sketch_metric.py,sha256=-V2OOnIKS36ucSdAWZQLD3Q
|
|
|
278
280
|
scope_client/api_bindings/models/sketch_point.py,sha256=liGTVlg7u3B83hX4vOVtKo987G-x8K5Hn97Ru2YNOc4,2784
|
|
279
281
|
scope_client/api_bindings/models/sketch_time_series.py,sha256=3xMJay64r1_Mg429Z_5KbXEIJ6Uoy3RxioMHz-JM7nk,3779
|
|
280
282
|
scope_client/api_bindings/models/sort_order.py,sha256=1k5KX8C4Z1-TPsNKsDcgszsH-9Y5mv4ritAHwwDY3xE,735
|
|
283
|
+
scope_client/api_bindings/models/task_connection_info.py,sha256=soX932jGRgTtikezYNIDgi7Grax8v11gArpxqZUsykE,3133
|
|
281
284
|
scope_client/api_bindings/models/task_mutation_response.py,sha256=gE26KTGgiGlukccssFhDZmtq2oyhAoG9DTEjugq9YHM,2589
|
|
282
285
|
scope_client/api_bindings/models/task_read_response.py,sha256=ZNSxrwoeAd0U42tEkbfqy20c0DI5br4XGV-6BPKuaiU,3580
|
|
283
286
|
scope_client/api_bindings/models/task_response.py,sha256=J_gaN6GokYLh7qcL6g10vnRxiP5y0zP6x3Q_4Erd3-g,3548
|
|
287
|
+
scope_client/api_bindings/models/task_validation_api_key.py,sha256=wkaqBkuuD5Fa5ik95caNwbuwXJ1l6R_jyuaQ2VFsC2Y,2802
|
|
284
288
|
scope_client/api_bindings/models/toxicity_config.py,sha256=hNi71Gj8Y6w7Bxy8uPwCNeY984zBFDYjNI-psWEERGc,3415
|
|
285
289
|
scope_client/api_bindings/models/update_model_task_rules_job_spec.py,sha256=KrwhSittkKBCnFhOTBqc3mLUkCg8rl3eb6lpA9YuNuQ,4536
|
|
286
290
|
scope_client/api_bindings/models/upsolve_token.py,sha256=Tp09Alv4XAG_1Jccgr1Wpn3XyuwupCmMqWvF8LHxnTI,2533
|
|
@@ -303,7 +307,7 @@ scope_client/auth/device_authorizer.py,sha256=bJMIZRjkwQwoSWTLEp7OoXM2MytO3ADSD9
|
|
|
303
307
|
scope_client/auth/discovery.py,sha256=hR0MglzRWHdwyi72If5hTnjO50fDJhquP_DD7OzjIQQ,1188
|
|
304
308
|
scope_client/auth/oauth_api_config.py,sha256=wcEslusOFKr0oTzW0Ku2MhM1mvc-nm4BEJU8LHo1uXA,1347
|
|
305
309
|
scope_client/auth/session.py,sha256=wCriib5ajfm1e1WTL_QXVCJmEOrGwQg_0v91e5qrC6g,2649
|
|
306
|
-
scope_client-1.4.
|
|
307
|
-
scope_client-1.4.
|
|
308
|
-
scope_client-1.4.
|
|
309
|
-
scope_client-1.4.
|
|
310
|
+
scope_client-1.4.996.dist-info/METADATA,sha256=p_erTrIVSyU-R6aMx_rl5v4P3w0aYy8cxYsUzCa4X6s,1776
|
|
311
|
+
scope_client-1.4.996.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
312
|
+
scope_client-1.4.996.dist-info/top_level.txt,sha256=x6MngS09hi-TUDoUGb3SLzmnf8_cf8IVAVNPSqtTzAY,13
|
|
313
|
+
scope_client-1.4.996.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|