scope-client 1.4.984__py3-none-any.whl → 1.4.986__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 +2 -0
- scope_client/api_bindings/api/users_v1_api.py +290 -0
- scope_client/api_bindings/models/__init__.py +2 -0
- scope_client/api_bindings/models/invite_new_user.py +105 -0
- scope_client/api_bindings/models/permission_name.py +1 -0
- scope_client/api_bindings/models/post_global_role_binding.py +92 -0
- {scope_client-1.4.984.dist-info → scope_client-1.4.986.dist-info}/METADATA +1 -1
- {scope_client-1.4.984.dist-info → scope_client-1.4.986.dist-info}/RECORD +10 -8
- {scope_client-1.4.984.dist-info → scope_client-1.4.986.dist-info}/WHEEL +0 -0
- {scope_client-1.4.984.dist-info → scope_client-1.4.986.dist-info}/top_level.txt +0 -0
|
@@ -139,6 +139,7 @@ from scope_client.api_bindings.models.infinite_pagination import InfinitePaginat
|
|
|
139
139
|
from scope_client.api_bindings.models.infinite_resource_list_alert import InfiniteResourceListAlert
|
|
140
140
|
from scope_client.api_bindings.models.infinite_resource_list_job import InfiniteResourceListJob
|
|
141
141
|
from scope_client.api_bindings.models.internal_server_error import InternalServerError
|
|
142
|
+
from scope_client.api_bindings.models.invite_new_user import InviteNewUser
|
|
142
143
|
from scope_client.api_bindings.models.items import Items
|
|
143
144
|
from scope_client.api_bindings.models.items1 import Items1
|
|
144
145
|
from scope_client.api_bindings.models.job import Job
|
|
@@ -220,6 +221,7 @@ from scope_client.api_bindings.models.post_data_retrieval_operation import PostD
|
|
|
220
221
|
from scope_client.api_bindings.models.post_dataset import PostDataset
|
|
221
222
|
from scope_client.api_bindings.models.post_dataset_join_spec import PostDatasetJoinSpec
|
|
222
223
|
from scope_client.api_bindings.models.post_end_user import PostEndUser
|
|
224
|
+
from scope_client.api_bindings.models.post_global_role_binding import PostGlobalRoleBinding
|
|
223
225
|
from scope_client.api_bindings.models.post_group import PostGroup
|
|
224
226
|
from scope_client.api_bindings.models.post_group_membership import PostGroupMembership
|
|
225
227
|
from scope_client.api_bindings.models.post_job import PostJob
|
|
@@ -19,6 +19,7 @@ from typing_extensions import Annotated
|
|
|
19
19
|
from pydantic import Field, StrictStr
|
|
20
20
|
from typing import List, Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
|
+
from scope_client.api_bindings.models.invite_new_user import InviteNewUser
|
|
22
23
|
from scope_client.api_bindings.models.patch_service_account_user import PatchServiceAccountUser
|
|
23
24
|
from scope_client.api_bindings.models.patch_user import PatchUser
|
|
24
25
|
from scope_client.api_bindings.models.post_end_user import PostEndUser
|
|
@@ -2373,6 +2374,295 @@ class UsersV1Api:
|
|
|
2373
2374
|
|
|
2374
2375
|
|
|
2375
2376
|
|
|
2377
|
+
@validate_call
|
|
2378
|
+
def post_organization_user_invite(
|
|
2379
|
+
self,
|
|
2380
|
+
invite_new_user: InviteNewUser,
|
|
2381
|
+
_request_timeout: Union[
|
|
2382
|
+
None,
|
|
2383
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2384
|
+
Tuple[
|
|
2385
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2386
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2387
|
+
]
|
|
2388
|
+
] = None,
|
|
2389
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2390
|
+
_content_type: Optional[StrictStr] = None,
|
|
2391
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2392
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2393
|
+
) -> User:
|
|
2394
|
+
"""Create User Via Email Invite
|
|
2395
|
+
|
|
2396
|
+
Requires organization_invite_user permission. Also requires underlying permissions for managing user permissions: group_create_group_membership, organization_create_role_binding, workspace_create_role_binding, or project_create_role_binding depending on whether the user is being added to a group or granted a role bound to an organization, workspace, or project.
|
|
2397
|
+
|
|
2398
|
+
:param invite_new_user: (required)
|
|
2399
|
+
:type invite_new_user: InviteNewUser
|
|
2400
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2401
|
+
number provided, it will be total request
|
|
2402
|
+
timeout. It can also be a pair (tuple) of
|
|
2403
|
+
(connection, read) timeouts.
|
|
2404
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2405
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2406
|
+
request; this effectively ignores the
|
|
2407
|
+
authentication in the spec for a single request.
|
|
2408
|
+
:type _request_auth: dict, optional
|
|
2409
|
+
:param _content_type: force content-type for the request.
|
|
2410
|
+
:type _content_type: str, Optional
|
|
2411
|
+
:param _headers: set to override the headers for a single
|
|
2412
|
+
request; this effectively ignores the headers
|
|
2413
|
+
in the spec for a single request.
|
|
2414
|
+
:type _headers: dict, optional
|
|
2415
|
+
:param _host_index: set to override the host_index for a single
|
|
2416
|
+
request; this effectively ignores the host_index
|
|
2417
|
+
in the spec for a single request.
|
|
2418
|
+
:type _host_index: int, optional
|
|
2419
|
+
:return: Returns the result object.
|
|
2420
|
+
""" # noqa: E501
|
|
2421
|
+
|
|
2422
|
+
_param = self._post_organization_user_invite_serialize(
|
|
2423
|
+
invite_new_user=invite_new_user,
|
|
2424
|
+
_request_auth=_request_auth,
|
|
2425
|
+
_content_type=_content_type,
|
|
2426
|
+
_headers=_headers,
|
|
2427
|
+
_host_index=_host_index
|
|
2428
|
+
)
|
|
2429
|
+
|
|
2430
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2431
|
+
'200': "User",
|
|
2432
|
+
'500': "InternalServerError",
|
|
2433
|
+
'400': "BadRequestError",
|
|
2434
|
+
'404': "NotFoundError",
|
|
2435
|
+
'201': None,
|
|
2436
|
+
'422': "HTTPValidationError",
|
|
2437
|
+
}
|
|
2438
|
+
response_data = self.api_client.call_api(
|
|
2439
|
+
*_param,
|
|
2440
|
+
_request_timeout=_request_timeout
|
|
2441
|
+
)
|
|
2442
|
+
response_data.read()
|
|
2443
|
+
return self.api_client.response_deserialize(
|
|
2444
|
+
response_data=response_data,
|
|
2445
|
+
response_types_map=_response_types_map,
|
|
2446
|
+
).data
|
|
2447
|
+
|
|
2448
|
+
|
|
2449
|
+
@validate_call
|
|
2450
|
+
def post_organization_user_invite_with_http_info(
|
|
2451
|
+
self,
|
|
2452
|
+
invite_new_user: InviteNewUser,
|
|
2453
|
+
_request_timeout: Union[
|
|
2454
|
+
None,
|
|
2455
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2456
|
+
Tuple[
|
|
2457
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2458
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2459
|
+
]
|
|
2460
|
+
] = None,
|
|
2461
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2462
|
+
_content_type: Optional[StrictStr] = None,
|
|
2463
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2464
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2465
|
+
) -> ApiResponse[User]:
|
|
2466
|
+
"""Create User Via Email Invite
|
|
2467
|
+
|
|
2468
|
+
Requires organization_invite_user permission. Also requires underlying permissions for managing user permissions: group_create_group_membership, organization_create_role_binding, workspace_create_role_binding, or project_create_role_binding depending on whether the user is being added to a group or granted a role bound to an organization, workspace, or project.
|
|
2469
|
+
|
|
2470
|
+
:param invite_new_user: (required)
|
|
2471
|
+
:type invite_new_user: InviteNewUser
|
|
2472
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2473
|
+
number provided, it will be total request
|
|
2474
|
+
timeout. It can also be a pair (tuple) of
|
|
2475
|
+
(connection, read) timeouts.
|
|
2476
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2477
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2478
|
+
request; this effectively ignores the
|
|
2479
|
+
authentication in the spec for a single request.
|
|
2480
|
+
:type _request_auth: dict, optional
|
|
2481
|
+
:param _content_type: force content-type for the request.
|
|
2482
|
+
:type _content_type: str, Optional
|
|
2483
|
+
:param _headers: set to override the headers for a single
|
|
2484
|
+
request; this effectively ignores the headers
|
|
2485
|
+
in the spec for a single request.
|
|
2486
|
+
:type _headers: dict, optional
|
|
2487
|
+
:param _host_index: set to override the host_index for a single
|
|
2488
|
+
request; this effectively ignores the host_index
|
|
2489
|
+
in the spec for a single request.
|
|
2490
|
+
:type _host_index: int, optional
|
|
2491
|
+
:return: Returns the result object.
|
|
2492
|
+
""" # noqa: E501
|
|
2493
|
+
|
|
2494
|
+
_param = self._post_organization_user_invite_serialize(
|
|
2495
|
+
invite_new_user=invite_new_user,
|
|
2496
|
+
_request_auth=_request_auth,
|
|
2497
|
+
_content_type=_content_type,
|
|
2498
|
+
_headers=_headers,
|
|
2499
|
+
_host_index=_host_index
|
|
2500
|
+
)
|
|
2501
|
+
|
|
2502
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2503
|
+
'200': "User",
|
|
2504
|
+
'500': "InternalServerError",
|
|
2505
|
+
'400': "BadRequestError",
|
|
2506
|
+
'404': "NotFoundError",
|
|
2507
|
+
'201': None,
|
|
2508
|
+
'422': "HTTPValidationError",
|
|
2509
|
+
}
|
|
2510
|
+
response_data = self.api_client.call_api(
|
|
2511
|
+
*_param,
|
|
2512
|
+
_request_timeout=_request_timeout
|
|
2513
|
+
)
|
|
2514
|
+
response_data.read()
|
|
2515
|
+
return self.api_client.response_deserialize(
|
|
2516
|
+
response_data=response_data,
|
|
2517
|
+
response_types_map=_response_types_map,
|
|
2518
|
+
)
|
|
2519
|
+
|
|
2520
|
+
|
|
2521
|
+
@validate_call
|
|
2522
|
+
def post_organization_user_invite_without_preload_content(
|
|
2523
|
+
self,
|
|
2524
|
+
invite_new_user: InviteNewUser,
|
|
2525
|
+
_request_timeout: Union[
|
|
2526
|
+
None,
|
|
2527
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2528
|
+
Tuple[
|
|
2529
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2530
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2531
|
+
]
|
|
2532
|
+
] = None,
|
|
2533
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2534
|
+
_content_type: Optional[StrictStr] = None,
|
|
2535
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2536
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2537
|
+
) -> RESTResponseType:
|
|
2538
|
+
"""Create User Via Email Invite
|
|
2539
|
+
|
|
2540
|
+
Requires organization_invite_user permission. Also requires underlying permissions for managing user permissions: group_create_group_membership, organization_create_role_binding, workspace_create_role_binding, or project_create_role_binding depending on whether the user is being added to a group or granted a role bound to an organization, workspace, or project.
|
|
2541
|
+
|
|
2542
|
+
:param invite_new_user: (required)
|
|
2543
|
+
:type invite_new_user: InviteNewUser
|
|
2544
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2545
|
+
number provided, it will be total request
|
|
2546
|
+
timeout. It can also be a pair (tuple) of
|
|
2547
|
+
(connection, read) timeouts.
|
|
2548
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2549
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2550
|
+
request; this effectively ignores the
|
|
2551
|
+
authentication in the spec for a single request.
|
|
2552
|
+
:type _request_auth: dict, optional
|
|
2553
|
+
:param _content_type: force content-type for the request.
|
|
2554
|
+
:type _content_type: str, Optional
|
|
2555
|
+
:param _headers: set to override the headers for a single
|
|
2556
|
+
request; this effectively ignores the headers
|
|
2557
|
+
in the spec for a single request.
|
|
2558
|
+
:type _headers: dict, optional
|
|
2559
|
+
:param _host_index: set to override the host_index for a single
|
|
2560
|
+
request; this effectively ignores the host_index
|
|
2561
|
+
in the spec for a single request.
|
|
2562
|
+
:type _host_index: int, optional
|
|
2563
|
+
:return: Returns the result object.
|
|
2564
|
+
""" # noqa: E501
|
|
2565
|
+
|
|
2566
|
+
_param = self._post_organization_user_invite_serialize(
|
|
2567
|
+
invite_new_user=invite_new_user,
|
|
2568
|
+
_request_auth=_request_auth,
|
|
2569
|
+
_content_type=_content_type,
|
|
2570
|
+
_headers=_headers,
|
|
2571
|
+
_host_index=_host_index
|
|
2572
|
+
)
|
|
2573
|
+
|
|
2574
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2575
|
+
'200': "User",
|
|
2576
|
+
'500': "InternalServerError",
|
|
2577
|
+
'400': "BadRequestError",
|
|
2578
|
+
'404': "NotFoundError",
|
|
2579
|
+
'201': None,
|
|
2580
|
+
'422': "HTTPValidationError",
|
|
2581
|
+
}
|
|
2582
|
+
response_data = self.api_client.call_api(
|
|
2583
|
+
*_param,
|
|
2584
|
+
_request_timeout=_request_timeout
|
|
2585
|
+
)
|
|
2586
|
+
return response_data.response
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
def _post_organization_user_invite_serialize(
|
|
2590
|
+
self,
|
|
2591
|
+
invite_new_user,
|
|
2592
|
+
_request_auth,
|
|
2593
|
+
_content_type,
|
|
2594
|
+
_headers,
|
|
2595
|
+
_host_index,
|
|
2596
|
+
) -> RequestSerialized:
|
|
2597
|
+
|
|
2598
|
+
_host = None
|
|
2599
|
+
|
|
2600
|
+
_collection_formats: Dict[str, str] = {
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
_path_params: Dict[str, str] = {}
|
|
2604
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2605
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2606
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2607
|
+
_files: Dict[
|
|
2608
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2609
|
+
] = {}
|
|
2610
|
+
_body_params: Optional[bytes] = None
|
|
2611
|
+
|
|
2612
|
+
# process the path parameters
|
|
2613
|
+
# process the query parameters
|
|
2614
|
+
# process the header parameters
|
|
2615
|
+
# process the form parameters
|
|
2616
|
+
# process the body parameter
|
|
2617
|
+
if invite_new_user is not None:
|
|
2618
|
+
_body_params = invite_new_user
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
# set the HTTP header `Accept`
|
|
2622
|
+
if 'Accept' not in _header_params:
|
|
2623
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2624
|
+
[
|
|
2625
|
+
'application/json'
|
|
2626
|
+
]
|
|
2627
|
+
)
|
|
2628
|
+
|
|
2629
|
+
# set the HTTP header `Content-Type`
|
|
2630
|
+
if _content_type:
|
|
2631
|
+
_header_params['Content-Type'] = _content_type
|
|
2632
|
+
else:
|
|
2633
|
+
_default_content_type = (
|
|
2634
|
+
self.api_client.select_header_content_type(
|
|
2635
|
+
[
|
|
2636
|
+
'application/json'
|
|
2637
|
+
]
|
|
2638
|
+
)
|
|
2639
|
+
)
|
|
2640
|
+
if _default_content_type is not None:
|
|
2641
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2642
|
+
|
|
2643
|
+
# authentication setting
|
|
2644
|
+
_auth_settings: List[str] = [
|
|
2645
|
+
'OAuth2AuthorizationCode'
|
|
2646
|
+
]
|
|
2647
|
+
|
|
2648
|
+
return self.api_client.param_serialize(
|
|
2649
|
+
method='POST',
|
|
2650
|
+
resource_path='/api/v1/organization/users/invite-user',
|
|
2651
|
+
path_params=_path_params,
|
|
2652
|
+
query_params=_query_params,
|
|
2653
|
+
header_params=_header_params,
|
|
2654
|
+
body=_body_params,
|
|
2655
|
+
post_params=_form_params,
|
|
2656
|
+
files=_files,
|
|
2657
|
+
auth_settings=_auth_settings,
|
|
2658
|
+
collection_formats=_collection_formats,
|
|
2659
|
+
_host=_host,
|
|
2660
|
+
_request_auth=_request_auth
|
|
2661
|
+
)
|
|
2662
|
+
|
|
2663
|
+
|
|
2664
|
+
|
|
2665
|
+
|
|
2376
2666
|
@validate_call
|
|
2377
2667
|
def post_user_creds(
|
|
2378
2668
|
self,
|
|
@@ -97,6 +97,7 @@ from scope_client.api_bindings.models.infinite_pagination import InfinitePaginat
|
|
|
97
97
|
from scope_client.api_bindings.models.infinite_resource_list_alert import InfiniteResourceListAlert
|
|
98
98
|
from scope_client.api_bindings.models.infinite_resource_list_job import InfiniteResourceListJob
|
|
99
99
|
from scope_client.api_bindings.models.internal_server_error import InternalServerError
|
|
100
|
+
from scope_client.api_bindings.models.invite_new_user import InviteNewUser
|
|
100
101
|
from scope_client.api_bindings.models.items import Items
|
|
101
102
|
from scope_client.api_bindings.models.items1 import Items1
|
|
102
103
|
from scope_client.api_bindings.models.job import Job
|
|
@@ -178,6 +179,7 @@ from scope_client.api_bindings.models.post_data_retrieval_operation import PostD
|
|
|
178
179
|
from scope_client.api_bindings.models.post_dataset import PostDataset
|
|
179
180
|
from scope_client.api_bindings.models.post_dataset_join_spec import PostDatasetJoinSpec
|
|
180
181
|
from scope_client.api_bindings.models.post_end_user import PostEndUser
|
|
182
|
+
from scope_client.api_bindings.models.post_global_role_binding import PostGlobalRoleBinding
|
|
181
183
|
from scope_client.api_bindings.models.post_group import PostGroup
|
|
182
184
|
from scope_client.api_bindings.models.post_group_membership import PostGroupMembership
|
|
183
185
|
from scope_client.api_bindings.models.post_job import PostJob
|
|
@@ -0,0 +1,105 @@
|
|
|
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, Optional
|
|
22
|
+
from scope_client.api_bindings.models.post_global_role_binding import PostGlobalRoleBinding
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class InviteNewUser(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InviteNewUser
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
email: StrictStr = Field(description="The user's email.")
|
|
31
|
+
role_binding: Optional[PostGlobalRoleBinding] = None
|
|
32
|
+
group_ids: Optional[List[StrictStr]] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["email", "role_binding", "group_ids"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of InviteNewUser from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of role_binding
|
|
75
|
+
if self.role_binding:
|
|
76
|
+
_dict['role_binding'] = self.role_binding.to_dict()
|
|
77
|
+
# set to None if role_binding (nullable) is None
|
|
78
|
+
# and model_fields_set contains the field
|
|
79
|
+
if self.role_binding is None and "role_binding" in self.model_fields_set:
|
|
80
|
+
_dict['role_binding'] = None
|
|
81
|
+
|
|
82
|
+
# set to None if group_ids (nullable) is None
|
|
83
|
+
# and model_fields_set contains the field
|
|
84
|
+
if self.group_ids is None and "group_ids" in self.model_fields_set:
|
|
85
|
+
_dict['group_ids'] = None
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of InviteNewUser from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"email": obj.get("email"),
|
|
100
|
+
"role_binding": PostGlobalRoleBinding.from_dict(obj["role_binding"]) if obj.get("role_binding") is not None else None,
|
|
101
|
+
"group_ids": obj.get("group_ids")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -33,6 +33,7 @@ class PermissionName(str, Enum):
|
|
|
33
33
|
ORGANIZATION_CREATE_WORKSPACE = 'organization_create_workspace'
|
|
34
34
|
ORGANIZATION_LIST_GROUP_MEMBERSHIPS = 'organization_list_group_memberships'
|
|
35
35
|
ORGANIZATION_CREATE_USER = 'organization_create_user'
|
|
36
|
+
ORGANIZATION_INVITE_USER = 'organization_invite_user'
|
|
36
37
|
ORGANIZATION_CREATE_SERVICE_ACCOUNT = 'organization_create_service_account'
|
|
37
38
|
DELETE_USER = 'delete_user'
|
|
38
39
|
USER_UPDATE = 'user_update'
|
|
@@ -0,0 +1,92 @@
|
|
|
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.bound_resource_kind import BoundResourceKind
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PostGlobalRoleBinding(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PostGlobalRoleBinding
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
role_id: StrictStr = Field(description="ID of the bound role.")
|
|
31
|
+
bound_resource_kind: BoundResourceKind = Field(description="Kind of the bound resource.")
|
|
32
|
+
resource_id: StrictStr = Field(description="Id of the bound resource.")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["role_id", "bound_resource_kind", "resource_id"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of PostGlobalRoleBinding from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of PostGlobalRoleBinding from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"role_id": obj.get("role_id"),
|
|
87
|
+
"bound_resource_kind": obj.get("bound_resource_kind"),
|
|
88
|
+
"resource_id": obj.get("resource_id")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
91
|
+
|
|
92
|
+
|
|
@@ -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=6oJE6wA3E3C2iK0flRPas2vPYibIT0Dr0jGTjbB9Ha0,24234
|
|
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
|
|
@@ -29,10 +29,10 @@ scope_client/api_bindings/api/registration_v1_api.py,sha256=cPmagSOgnne2cZNgYDKm
|
|
|
29
29
|
scope_client/api_bindings/api/roles_v1_api.py,sha256=LnlGL0BhhNAsXpIIkCyoBV765rw2bcIwWPz3EsyQi18,11234
|
|
30
30
|
scope_client/api_bindings/api/tasks_v1_api.py,sha256=9G2YNDXlV0f05yCJPM8aCinmDkDtz_o7Rbn5sQzSl54,68732
|
|
31
31
|
scope_client/api_bindings/api/upsolve_v1_api.py,sha256=Vdep9x-_lIJq_kOwtsGqYqkssgSaCEy45_WDupKwrgA,12230
|
|
32
|
-
scope_client/api_bindings/api/users_v1_api.py,sha256=
|
|
32
|
+
scope_client/api_bindings/api/users_v1_api.py,sha256=wo-yZd1da0O8NgAuBCo8784NY1vTo4H8J7pf7sFavCc,114570
|
|
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=xKjjY_ZLVhqfR_AzdwOYFGY9UgQ4_lczjIHibrrkww4,21647
|
|
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
|
|
@@ -116,6 +116,7 @@ scope_client/api_bindings/models/infinite_pagination.py,sha256=v4US1ii-Jn-mN-t-S
|
|
|
116
116
|
scope_client/api_bindings/models/infinite_resource_list_alert.py,sha256=wX-_vpWkD2CnIl1qH-oQtYAW5dQ26brSuV_CksW4Yjg,3514
|
|
117
117
|
scope_client/api_bindings/models/infinite_resource_list_job.py,sha256=sBR_s6AS-NMbInnotz3bCszsmx_imNT8pnec9FR0oRw,3498
|
|
118
118
|
scope_client/api_bindings/models/internal_server_error.py,sha256=CSFjhuEhPdT25KHc9KEfcCYOLnGs2_sP0shqTl_dmm8,2613
|
|
119
|
+
scope_client/api_bindings/models/invite_new_user.py,sha256=hYoChkvCzFazxBbanMOfJYjQDp2a0dciixg-A70goPc,3574
|
|
119
120
|
scope_client/api_bindings/models/items.py,sha256=Pf6JlvMqLuWQDmYghT4tAkR8HgpLSop49V0V2zsDo_U,5845
|
|
120
121
|
scope_client/api_bindings/models/items1.py,sha256=86_zaxay9-HC3SYC30lJPLh0P7aJdVYq57ffsdwqu0Q,5534
|
|
121
122
|
scope_client/api_bindings/models/job.py,sha256=3dpiy8u05WFEV082bMw5FtbLQU___89Z7KAjTBkG9UA,7660
|
|
@@ -181,7 +182,7 @@ scope_client/api_bindings/models/patch_user.py,sha256=Q_RqYiqCFjWsHfTWK0RqpdKpJu
|
|
|
181
182
|
scope_client/api_bindings/models/patch_webhook.py,sha256=Nck18gezSVXn3Tsn2FgbmaVWvlajrm_rRY1Lt7XKRtU,3571
|
|
182
183
|
scope_client/api_bindings/models/patch_workspace.py,sha256=oX4U-aAgTlCZr5Xor8tyZWBZBll5BwgCeqNXyfC4rAc,2530
|
|
183
184
|
scope_client/api_bindings/models/permission.py,sha256=uxCnKjgZwGxr_-BidbwKWt_TVRnDhtliWd6uq9qI7yU,3002
|
|
184
|
-
scope_client/api_bindings/models/permission_name.py,sha256=
|
|
185
|
+
scope_client/api_bindings/models/permission_name.py,sha256=X7p1shYpoQrw6TmXXmpOCiCtvXQ93xWuF7MYM1Trtsk,7670
|
|
185
186
|
scope_client/api_bindings/models/permission_request_item.py,sha256=czzZsHDgvFOyZe8mjnPJtYO-eDz42jzqjzPtGfPketc,3084
|
|
186
187
|
scope_client/api_bindings/models/permission_response_item.py,sha256=7D0mG1etQeYIYE9U6if8zIgJh0JEQOruk5aH6TtiNtw,3262
|
|
187
188
|
scope_client/api_bindings/models/permissions_request.py,sha256=dbh_2kJdTzuZzZ8UjQAdfxnDtOXwFeDIzvdflOaU_3A,3311
|
|
@@ -197,6 +198,7 @@ scope_client/api_bindings/models/post_data_retrieval_operation.py,sha256=3qMB06e
|
|
|
197
198
|
scope_client/api_bindings/models/post_dataset.py,sha256=dbPxCV2Cexl9lOpHKlkYNSr8-5Y30bKGDtwy2MdXdWE,5185
|
|
198
199
|
scope_client/api_bindings/models/post_dataset_join_spec.py,sha256=DsZo-dgW28IumilIQFZAadVqMQ0MKySBcQ1iBKECPgI,3438
|
|
199
200
|
scope_client/api_bindings/models/post_end_user.py,sha256=dyyj7R3ff8CUmQ6dIRMapj7pApc3WVL3H-1LtUpMsGc,3424
|
|
201
|
+
scope_client/api_bindings/models/post_global_role_binding.py,sha256=-pMHMU5davn12Ibw8UbLoXvFnkJLpxSNJ4e0HpVeQHk,2978
|
|
200
202
|
scope_client/api_bindings/models/post_group.py,sha256=iVXr8DzpOVqjMFTHQ-6GrWjJGVqL7WW2NOCyNhLSLcE,2857
|
|
201
203
|
scope_client/api_bindings/models/post_group_membership.py,sha256=U2iIN_YwDS1aIpZM_X0wEYb5QEaBC51Del2dr_ROlvk,2589
|
|
202
204
|
scope_client/api_bindings/models/post_job.py,sha256=Se-f7PDR21gQZqssBhV3h0gVNa90sWkJRJc0KunI53Y,4347
|
|
@@ -299,7 +301,7 @@ scope_client/auth/device_authorizer.py,sha256=bJMIZRjkwQwoSWTLEp7OoXM2MytO3ADSD9
|
|
|
299
301
|
scope_client/auth/discovery.py,sha256=hR0MglzRWHdwyi72If5hTnjO50fDJhquP_DD7OzjIQQ,1188
|
|
300
302
|
scope_client/auth/oauth_api_config.py,sha256=wcEslusOFKr0oTzW0Ku2MhM1mvc-nm4BEJU8LHo1uXA,1347
|
|
301
303
|
scope_client/auth/session.py,sha256=wCriib5ajfm1e1WTL_QXVCJmEOrGwQg_0v91e5qrC6g,2649
|
|
302
|
-
scope_client-1.4.
|
|
303
|
-
scope_client-1.4.
|
|
304
|
-
scope_client-1.4.
|
|
305
|
-
scope_client-1.4.
|
|
304
|
+
scope_client-1.4.986.dist-info/METADATA,sha256=Qr6UPZtGFPIJ1hehS8pym859RAO2PK1Y5HLjuUM1pdw,1776
|
|
305
|
+
scope_client-1.4.986.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
|
306
|
+
scope_client-1.4.986.dist-info/top_level.txt,sha256=x6MngS09hi-TUDoUGb3SLzmnf8_cf8IVAVNPSqtTzAY,13
|
|
307
|
+
scope_client-1.4.986.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|