baiducloud-python-sdk-agentidentity 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- baiducloud_python_sdk_agentidentity/__init__.py +5 -0
- baiducloud_python_sdk_agentidentity/api/__init__.py +0 -0
- baiducloud_python_sdk_agentidentity/api/agentidentity_client.py +1361 -0
- baiducloud_python_sdk_agentidentity/models/__init__.py +65 -0
- baiducloud_python_sdk_agentidentity/models/agent_dto.py +133 -0
- baiducloud_python_sdk_agentidentity/models/authorize_endpoint_request.py +94 -0
- baiducloud_python_sdk_agentidentity/models/batch_acquisition_of_users_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/batch_get_resource_api_key_request.py +86 -0
- baiducloud_python_sdk_agentidentity/models/batch_get_resource_api_key_response.py +62 -0
- baiducloud_python_sdk_agentidentity/models/complete_oauth2session_request.py +104 -0
- baiducloud_python_sdk_agentidentity/models/create_agent_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/create_credential_provider_request.py +84 -0
- baiducloud_python_sdk_agentidentity/models/create_idp_configuration_request.py +180 -0
- baiducloud_python_sdk_agentidentity/models/create_oauth2_client_request.py +135 -0
- baiducloud_python_sdk_agentidentity/models/create_user_pool_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/create_user_request.py +102 -0
- baiducloud_python_sdk_agentidentity/models/credential_config.py +205 -0
- baiducloud_python_sdk_agentidentity/models/credential_provider_dto.py +135 -0
- baiducloud_python_sdk_agentidentity/models/delete_agent_request.py +60 -0
- baiducloud_python_sdk_agentidentity/models/delete_credential_provider_request.py +60 -0
- baiducloud_python_sdk_agentidentity/models/delete_idp_configuration_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/delete_oauth2_client_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/delete_user_pool_request.py +60 -0
- baiducloud_python_sdk_agentidentity/models/delete_user_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/disable_idp_configuration_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/enable_idp_configuration_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/get_agent_request.py +60 -0
- baiducloud_python_sdk_agentidentity/models/get_credential_provider_request.py +60 -0
- baiducloud_python_sdk_agentidentity/models/get_idp_configuration_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/get_oauth2_client_request.py +68 -0
- baiducloud_python_sdk_agentidentity/models/get_resource_apikey_request.py +86 -0
- baiducloud_python_sdk_agentidentity/models/get_resource_oauth2token_request.py +136 -0
- baiducloud_python_sdk_agentidentity/models/get_user_pool_request.py +60 -0
- baiducloud_python_sdk_agentidentity/models/get_user_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/get_wat_for_user_request.py +102 -0
- baiducloud_python_sdk_agentidentity/models/get_workload_access_token_request.py +84 -0
- baiducloud_python_sdk_agentidentity/models/list_agents_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/list_agents_response.py +86 -0
- baiducloud_python_sdk_agentidentity/models/list_credential_providers_request.py +84 -0
- baiducloud_python_sdk_agentidentity/models/list_credential_providers_response.py +86 -0
- baiducloud_python_sdk_agentidentity/models/list_idp_configurations_request.py +84 -0
- baiducloud_python_sdk_agentidentity/models/list_idp_configurations_response.py +86 -0
- baiducloud_python_sdk_agentidentity/models/list_oauth2_clients_request.py +84 -0
- baiducloud_python_sdk_agentidentity/models/list_oauth2_clients_response.py +86 -0
- baiducloud_python_sdk_agentidentity/models/list_user_pools_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/list_user_pools_response.py +86 -0
- baiducloud_python_sdk_agentidentity/models/list_users_request.py +84 -0
- baiducloud_python_sdk_agentidentity/models/list_users_response.py +86 -0
- baiducloud_python_sdk_agentidentity/models/o_idc_discovery_request.py +58 -0
- baiducloud_python_sdk_agentidentity/models/oauth2idp_callback_request.py +70 -0
- baiducloud_python_sdk_agentidentity/models/reset_password_request.py +92 -0
- baiducloud_python_sdk_agentidentity/models/resource_credential_dto.py +90 -0
- baiducloud_python_sdk_agentidentity/models/token_endpoint_request.py +108 -0
- baiducloud_python_sdk_agentidentity/models/update_agent_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/update_credential_provider_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/update_idp_configuration_request.py +162 -0
- baiducloud_python_sdk_agentidentity/models/update_oauth2_client_request.py +135 -0
- baiducloud_python_sdk_agentidentity/models/update_user_pool_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/update_user_request.py +84 -0
- baiducloud_python_sdk_agentidentity/models/user_pool_dto.py +187 -0
- baiducloud_python_sdk_agentidentity/models/user_pool_idp_config_dto.py +205 -0
- baiducloud_python_sdk_agentidentity/models/user_pool_o_auth2_client_dto.py +178 -0
- baiducloud_python_sdk_agentidentity/models/user_pool_user_dto.py +115 -0
- baiducloud_python_sdk_agentidentity/models/userinfo_endpoint_request.py +76 -0
- baiducloud_python_sdk_agentidentity/models/userinfo_endpoint_response.py +77 -0
- baiducloud_python_sdk_agentidentity-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_agentidentity-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_agentidentity-0.0.1.dist-info/RECORD +70 -0
- baiducloud_python_sdk_agentidentity-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_agentidentity-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for OIdcDiscoveryRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class OIdcDiscoveryRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for OIdcDiscoveryRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_pool_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize OIdcDiscoveryRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_pool_id: user_pool_id parameter
|
|
20
|
+
:type user_pool_id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.user_pool_id = user_pool_id
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: OIdcDiscoveryRequest
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('userPoolId') is not None:
|
|
57
|
+
self.user_pool_id = m.get('userPoolId')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for Oauth2idpCallbackRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Oauth2idpCallbackRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for Oauth2idpCallbackRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, provider_id, code, state):
|
|
16
|
+
"""
|
|
17
|
+
Initialize Oauth2idpCallbackRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param provider_id: provider_id parameter
|
|
20
|
+
:type provider_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param code: code parameter
|
|
23
|
+
:type code: str (required)
|
|
24
|
+
|
|
25
|
+
:param state: state parameter
|
|
26
|
+
:type state: str (required)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.provider_id = provider_id
|
|
30
|
+
self.code = code
|
|
31
|
+
self.state = state
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the request entity to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the request
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
return result
|
|
47
|
+
|
|
48
|
+
def from_dict(self, m):
|
|
49
|
+
"""
|
|
50
|
+
Populate the request entity from a dictionary.
|
|
51
|
+
|
|
52
|
+
Nested dictionaries are recursively converted to model objects.
|
|
53
|
+
|
|
54
|
+
:param m: Dictionary containing request data
|
|
55
|
+
:type m: dict
|
|
56
|
+
|
|
57
|
+
:return: Self reference for method chaining
|
|
58
|
+
:rtype: Oauth2idpCallbackRequest
|
|
59
|
+
|
|
60
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
61
|
+
:raises ValueError: If nested model conversion fails
|
|
62
|
+
"""
|
|
63
|
+
m = m or dict()
|
|
64
|
+
if m.get('providerId') is not None:
|
|
65
|
+
self.provider_id = m.get('providerId')
|
|
66
|
+
if m.get('code') is not None:
|
|
67
|
+
self.code = m.get('code')
|
|
68
|
+
if m.get('state') is not None:
|
|
69
|
+
self.state = m.get('state')
|
|
70
|
+
return self
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ResetPasswordRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ResetPasswordRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ResetPasswordRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_pool_id, user_id, new_password, password=None, force_reset_password=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ResetPasswordRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_pool_id: 用户池 ID
|
|
20
|
+
:type user_pool_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param user_id: 用户 ID
|
|
23
|
+
:type user_id: str (required)
|
|
24
|
+
|
|
25
|
+
:param new_password: 新密码(8-32字符,须含大写、小写、数字)
|
|
26
|
+
:type new_password: str (required)
|
|
27
|
+
|
|
28
|
+
:param password: 当前密码;传入时校验当前密码,适用于用户自行修改场景;不传则为管理员重置,跳过校验
|
|
29
|
+
:type password: str (optional)
|
|
30
|
+
|
|
31
|
+
:param force_reset_password: 是否强制用户下次登录时重置密码,默认 true
|
|
32
|
+
:type force_reset_password: bool (optional)
|
|
33
|
+
"""
|
|
34
|
+
super().__init__()
|
|
35
|
+
self.user_pool_id = user_pool_id
|
|
36
|
+
self.user_id = user_id
|
|
37
|
+
self.new_password = new_password
|
|
38
|
+
self.password = password
|
|
39
|
+
self.force_reset_password = force_reset_password
|
|
40
|
+
|
|
41
|
+
def to_dict(self):
|
|
42
|
+
"""
|
|
43
|
+
Convert the request entity to a dictionary representation.
|
|
44
|
+
|
|
45
|
+
Nested model objects are recursively converted to dictionaries.
|
|
46
|
+
|
|
47
|
+
:return: Dictionary representation of the request
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
_map = super().to_dict()
|
|
51
|
+
if _map is not None:
|
|
52
|
+
return _map
|
|
53
|
+
result = dict()
|
|
54
|
+
if self.user_pool_id is not None:
|
|
55
|
+
result['userPoolId'] = self.user_pool_id
|
|
56
|
+
if self.user_id is not None:
|
|
57
|
+
result['userId'] = self.user_id
|
|
58
|
+
if self.new_password is not None:
|
|
59
|
+
result['newPassword'] = self.new_password
|
|
60
|
+
if self.password is not None:
|
|
61
|
+
result['password'] = self.password
|
|
62
|
+
if self.force_reset_password is not None:
|
|
63
|
+
result['forceResetPassword'] = self.force_reset_password
|
|
64
|
+
return result
|
|
65
|
+
|
|
66
|
+
def from_dict(self, m):
|
|
67
|
+
"""
|
|
68
|
+
Populate the request entity from a dictionary.
|
|
69
|
+
|
|
70
|
+
Nested dictionaries are recursively converted to model objects.
|
|
71
|
+
|
|
72
|
+
:param m: Dictionary containing request data
|
|
73
|
+
:type m: dict
|
|
74
|
+
|
|
75
|
+
:return: Self reference for method chaining
|
|
76
|
+
:rtype: ResetPasswordRequest
|
|
77
|
+
|
|
78
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
79
|
+
:raises ValueError: If nested model conversion fails
|
|
80
|
+
"""
|
|
81
|
+
m = m or dict()
|
|
82
|
+
if m.get('userPoolId') is not None:
|
|
83
|
+
self.user_pool_id = m.get('userPoolId')
|
|
84
|
+
if m.get('userId') is not None:
|
|
85
|
+
self.user_id = m.get('userId')
|
|
86
|
+
if m.get('newPassword') is not None:
|
|
87
|
+
self.new_password = m.get('newPassword')
|
|
88
|
+
if m.get('password') is not None:
|
|
89
|
+
self.password = m.get('password')
|
|
90
|
+
if m.get('forceResetPassword') is not None:
|
|
91
|
+
self.force_reset_password = m.get('forceResetPassword')
|
|
92
|
+
return self
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ResourceCredentialDTO information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ResourceCredentialDTO(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
ResourceCredentialDTO
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, type=None, name=None, credential=None, credential_api_key=None, expire_at=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize ResourceCredentialDTO instance.
|
|
16
|
+
|
|
17
|
+
:param type: 凭证类型(API_KEY)
|
|
18
|
+
:type type: str (optional)
|
|
19
|
+
|
|
20
|
+
:param name: 凭证提供方名称
|
|
21
|
+
:type name: str (optional)
|
|
22
|
+
|
|
23
|
+
:param credential: 凭证内容
|
|
24
|
+
:type credential: object (optional)
|
|
25
|
+
|
|
26
|
+
:param credential_api_key: API Key 明文值
|
|
27
|
+
:type credential_api_key: str (optional)
|
|
28
|
+
|
|
29
|
+
:param expire_at: 凭证缓存过期时间(ISO 8601)
|
|
30
|
+
:type expire_at: datetime (optional)
|
|
31
|
+
"""
|
|
32
|
+
super().__init__()
|
|
33
|
+
self.type = type
|
|
34
|
+
self.name = name
|
|
35
|
+
self.credential = credential
|
|
36
|
+
self.credential_api_key = credential_api_key
|
|
37
|
+
self.expire_at = expire_at
|
|
38
|
+
|
|
39
|
+
def to_dict(self):
|
|
40
|
+
"""
|
|
41
|
+
Convert the model instance to a dictionary representation.
|
|
42
|
+
|
|
43
|
+
Nested model objects are recursively converted to dictionaries.
|
|
44
|
+
|
|
45
|
+
:return: Dictionary representation of the model
|
|
46
|
+
:rtype: dict
|
|
47
|
+
"""
|
|
48
|
+
_map = super().to_dict()
|
|
49
|
+
if _map is not None:
|
|
50
|
+
return _map
|
|
51
|
+
result = dict()
|
|
52
|
+
if self.type is not None:
|
|
53
|
+
result['type'] = self.type
|
|
54
|
+
if self.name is not None:
|
|
55
|
+
result['name'] = self.name
|
|
56
|
+
if self.credential is not None:
|
|
57
|
+
result['credential'] = self.credential
|
|
58
|
+
if self.credential_api_key is not None:
|
|
59
|
+
result['credential.apiKey'] = self.credential_api_key
|
|
60
|
+
if self.expire_at is not None:
|
|
61
|
+
result['expireAt'] = self.expire_at
|
|
62
|
+
return result
|
|
63
|
+
|
|
64
|
+
def from_dict(self, m):
|
|
65
|
+
"""
|
|
66
|
+
Populate the model instance from a dictionary.
|
|
67
|
+
|
|
68
|
+
Nested dictionaries are recursively converted to model objects.
|
|
69
|
+
|
|
70
|
+
:param m: Dictionary containing model data
|
|
71
|
+
:type m: dict
|
|
72
|
+
|
|
73
|
+
:return: Self reference for method chaining
|
|
74
|
+
:rtype: ResourceCredentialDTO
|
|
75
|
+
|
|
76
|
+
:raises TypeError: If input is not a dictionary type
|
|
77
|
+
:raises ValueError: If nested model conversion fails
|
|
78
|
+
"""
|
|
79
|
+
m = m or dict()
|
|
80
|
+
if m.get('type') is not None:
|
|
81
|
+
self.type = m.get('type')
|
|
82
|
+
if m.get('name') is not None:
|
|
83
|
+
self.name = m.get('name')
|
|
84
|
+
if m.get('credential') is not None:
|
|
85
|
+
self.credential = m.get('credential')
|
|
86
|
+
if m.get('credential.apiKey') is not None:
|
|
87
|
+
self.credential_api_key = m.get('credential.apiKey')
|
|
88
|
+
if m.get('expireAt') is not None:
|
|
89
|
+
self.expire_at = m.get('expireAt')
|
|
90
|
+
return self
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for TokenEndpointRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TokenEndpointRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for TokenEndpointRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self, user_pool_id, grant_type, client_id, client_secret, code=None, refresh_token=None, redirect_uri=None
|
|
17
|
+
):
|
|
18
|
+
"""
|
|
19
|
+
Initialize TokenEndpointRequest request entity.
|
|
20
|
+
|
|
21
|
+
:param user_pool_id: user_pool_id parameter
|
|
22
|
+
:type user_pool_id: str (required)
|
|
23
|
+
|
|
24
|
+
:param grant_type: authorization_code 或 refresh_token
|
|
25
|
+
:type grant_type: str (required)
|
|
26
|
+
|
|
27
|
+
:param code: (条件必填)授权码(grant_type=authorization_code 时必填)
|
|
28
|
+
:type code: str (optional)
|
|
29
|
+
|
|
30
|
+
:param refresh_token: (条件必填)之前签发的 refresh_token JWT(grant_type=refresh_token 时必填)
|
|
31
|
+
:type refresh_token: str (optional)
|
|
32
|
+
|
|
33
|
+
:param client_id: OAuth2 client_id
|
|
34
|
+
:type client_id: str (required)
|
|
35
|
+
|
|
36
|
+
:param client_secret: OAuth2 client_secret
|
|
37
|
+
:type client_secret: str (required)
|
|
38
|
+
|
|
39
|
+
:param redirect_uri: (条件必填)需与 authorize 时一致(grant_type=authorization_code 时必填)
|
|
40
|
+
:type redirect_uri: str (optional)
|
|
41
|
+
"""
|
|
42
|
+
super().__init__()
|
|
43
|
+
self.user_pool_id = user_pool_id
|
|
44
|
+
self.grant_type = grant_type
|
|
45
|
+
self.code = code
|
|
46
|
+
self.refresh_token = refresh_token
|
|
47
|
+
self.client_id = client_id
|
|
48
|
+
self.client_secret = client_secret
|
|
49
|
+
self.redirect_uri = redirect_uri
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""
|
|
53
|
+
Convert the request entity to a dictionary representation.
|
|
54
|
+
|
|
55
|
+
Nested model objects are recursively converted to dictionaries.
|
|
56
|
+
|
|
57
|
+
:return: Dictionary representation of the request
|
|
58
|
+
:rtype: dict
|
|
59
|
+
"""
|
|
60
|
+
_map = super().to_dict()
|
|
61
|
+
if _map is not None:
|
|
62
|
+
return _map
|
|
63
|
+
result = dict()
|
|
64
|
+
if self.grant_type is not None:
|
|
65
|
+
result['grant_type'] = self.grant_type
|
|
66
|
+
if self.code is not None:
|
|
67
|
+
result['code'] = self.code
|
|
68
|
+
if self.refresh_token is not None:
|
|
69
|
+
result['refresh_token'] = self.refresh_token
|
|
70
|
+
if self.client_id is not None:
|
|
71
|
+
result['client_id'] = self.client_id
|
|
72
|
+
if self.client_secret is not None:
|
|
73
|
+
result['client_secret'] = self.client_secret
|
|
74
|
+
if self.redirect_uri is not None:
|
|
75
|
+
result['redirect_uri'] = self.redirect_uri
|
|
76
|
+
return result
|
|
77
|
+
|
|
78
|
+
def from_dict(self, m):
|
|
79
|
+
"""
|
|
80
|
+
Populate the request entity from a dictionary.
|
|
81
|
+
|
|
82
|
+
Nested dictionaries are recursively converted to model objects.
|
|
83
|
+
|
|
84
|
+
:param m: Dictionary containing request data
|
|
85
|
+
:type m: dict
|
|
86
|
+
|
|
87
|
+
:return: Self reference for method chaining
|
|
88
|
+
:rtype: TokenEndpointRequest
|
|
89
|
+
|
|
90
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
91
|
+
:raises ValueError: If nested model conversion fails
|
|
92
|
+
"""
|
|
93
|
+
m = m or dict()
|
|
94
|
+
if m.get('userPoolId') is not None:
|
|
95
|
+
self.user_pool_id = m.get('userPoolId')
|
|
96
|
+
if m.get('grant_type') is not None:
|
|
97
|
+
self.grant_type = m.get('grant_type')
|
|
98
|
+
if m.get('code') is not None:
|
|
99
|
+
self.code = m.get('code')
|
|
100
|
+
if m.get('refresh_token') is not None:
|
|
101
|
+
self.refresh_token = m.get('refresh_token')
|
|
102
|
+
if m.get('client_id') is not None:
|
|
103
|
+
self.client_id = m.get('client_id')
|
|
104
|
+
if m.get('client_secret') is not None:
|
|
105
|
+
self.client_secret = m.get('client_secret')
|
|
106
|
+
if m.get('redirect_uri') is not None:
|
|
107
|
+
self.redirect_uri = m.get('redirect_uri')
|
|
108
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateAgentRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateAgentRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateAgentRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, agent_id, description=None, allowed_resource_oauth2_return_urls=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UpdateAgentRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param agent_id: Agent ID
|
|
20
|
+
:type agent_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param description: 新的描述,1-128 字符
|
|
23
|
+
:type description: str (optional)
|
|
24
|
+
|
|
25
|
+
:param allowed_resource_oauth2_return_urls: OAuth2 回调 URL 白名单列表,最多 10 个(全量替换)
|
|
26
|
+
:type allowed_resource_oauth2_return_urls: List[str] (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.agent_id = agent_id
|
|
30
|
+
self.description = description
|
|
31
|
+
self.allowed_resource_oauth2_return_urls = allowed_resource_oauth2_return_urls
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the request entity to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the request
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.agent_id is not None:
|
|
47
|
+
result['agentId'] = self.agent_id
|
|
48
|
+
if self.description is not None:
|
|
49
|
+
result['description'] = self.description
|
|
50
|
+
if self.allowed_resource_oauth2_return_urls is not None:
|
|
51
|
+
result['allowedResourceOauth2ReturnUrls'] = self.allowed_resource_oauth2_return_urls
|
|
52
|
+
return result
|
|
53
|
+
|
|
54
|
+
def from_dict(self, m):
|
|
55
|
+
"""
|
|
56
|
+
Populate the request entity from a dictionary.
|
|
57
|
+
|
|
58
|
+
Nested dictionaries are recursively converted to model objects.
|
|
59
|
+
|
|
60
|
+
:param m: Dictionary containing request data
|
|
61
|
+
:type m: dict
|
|
62
|
+
|
|
63
|
+
:return: Self reference for method chaining
|
|
64
|
+
:rtype: UpdateAgentRequest
|
|
65
|
+
|
|
66
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
67
|
+
:raises ValueError: If nested model conversion fails
|
|
68
|
+
"""
|
|
69
|
+
m = m or dict()
|
|
70
|
+
if m.get('agentId') is not None:
|
|
71
|
+
self.agent_id = m.get('agentId')
|
|
72
|
+
if m.get('description') is not None:
|
|
73
|
+
self.description = m.get('description')
|
|
74
|
+
if m.get('allowedResourceOauth2ReturnUrls') is not None:
|
|
75
|
+
self.allowed_resource_oauth2_return_urls = m.get('allowedResourceOauth2ReturnUrls')
|
|
76
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateCredentialProviderRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateCredentialProviderRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateCredentialProviderRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, credential_provider_id, desc=None, credential=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UpdateCredentialProviderRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param credential_provider_id: 凭证提供方 ID
|
|
20
|
+
:type credential_provider_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param desc: 新的描述,最多 128 字符
|
|
23
|
+
:type desc: str (optional)
|
|
24
|
+
|
|
25
|
+
:param credential: 新的凭证内容(与 desc 至少提供一个)
|
|
26
|
+
:type credential: object (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.credential_provider_id = credential_provider_id
|
|
30
|
+
self.desc = desc
|
|
31
|
+
self.credential = credential
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the request entity to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the request
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.credential_provider_id is not None:
|
|
47
|
+
result['credentialProviderId'] = self.credential_provider_id
|
|
48
|
+
if self.desc is not None:
|
|
49
|
+
result['desc'] = self.desc
|
|
50
|
+
if self.credential is not None:
|
|
51
|
+
result['credential'] = self.credential
|
|
52
|
+
return result
|
|
53
|
+
|
|
54
|
+
def from_dict(self, m):
|
|
55
|
+
"""
|
|
56
|
+
Populate the request entity from a dictionary.
|
|
57
|
+
|
|
58
|
+
Nested dictionaries are recursively converted to model objects.
|
|
59
|
+
|
|
60
|
+
:param m: Dictionary containing request data
|
|
61
|
+
:type m: dict
|
|
62
|
+
|
|
63
|
+
:return: Self reference for method chaining
|
|
64
|
+
:rtype: UpdateCredentialProviderRequest
|
|
65
|
+
|
|
66
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
67
|
+
:raises ValueError: If nested model conversion fails
|
|
68
|
+
"""
|
|
69
|
+
m = m or dict()
|
|
70
|
+
if m.get('credentialProviderId') is not None:
|
|
71
|
+
self.credential_provider_id = m.get('credentialProviderId')
|
|
72
|
+
if m.get('desc') is not None:
|
|
73
|
+
self.desc = m.get('desc')
|
|
74
|
+
if m.get('credential') is not None:
|
|
75
|
+
self.credential = m.get('credential')
|
|
76
|
+
return self
|