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,84 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateCredentialProviderRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateCredentialProviderRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for CreateCredentialProviderRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, name, type, credential, desc=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize CreateCredentialProviderRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param name: 凭证提供方名称,1-64 字符,仅允许字母、数字、下划线和连字符(^[a-zA-Z0-9_-]+$)
|
|
20
|
+
:type name: str (required)
|
|
21
|
+
|
|
22
|
+
:param type: 凭证类型:API_KEY / OAUTH2 / STS
|
|
23
|
+
:type type: str (required)
|
|
24
|
+
|
|
25
|
+
:param desc: 描述,最多 128 字符
|
|
26
|
+
:type desc: str (optional)
|
|
27
|
+
|
|
28
|
+
:param credential: credential parameter
|
|
29
|
+
:type credential: object (required)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.name = name
|
|
33
|
+
self.type = type
|
|
34
|
+
self.desc = desc
|
|
35
|
+
self.credential = credential
|
|
36
|
+
|
|
37
|
+
def to_dict(self):
|
|
38
|
+
"""
|
|
39
|
+
Convert the request entity to a dictionary representation.
|
|
40
|
+
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the request
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
if self.name is not None:
|
|
51
|
+
result['name'] = self.name
|
|
52
|
+
if self.type is not None:
|
|
53
|
+
result['type'] = self.type
|
|
54
|
+
if self.desc is not None:
|
|
55
|
+
result['desc'] = self.desc
|
|
56
|
+
if self.credential is not None:
|
|
57
|
+
result['credential'] = self.credential
|
|
58
|
+
return result
|
|
59
|
+
|
|
60
|
+
def from_dict(self, m):
|
|
61
|
+
"""
|
|
62
|
+
Populate the request entity from a dictionary.
|
|
63
|
+
|
|
64
|
+
Nested dictionaries are recursively converted to model objects.
|
|
65
|
+
|
|
66
|
+
:param m: Dictionary containing request data
|
|
67
|
+
:type m: dict
|
|
68
|
+
|
|
69
|
+
:return: Self reference for method chaining
|
|
70
|
+
:rtype: CreateCredentialProviderRequest
|
|
71
|
+
|
|
72
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
73
|
+
:raises ValueError: If nested model conversion fails
|
|
74
|
+
"""
|
|
75
|
+
m = m or dict()
|
|
76
|
+
if m.get('name') is not None:
|
|
77
|
+
self.name = m.get('name')
|
|
78
|
+
if m.get('type') is not None:
|
|
79
|
+
self.type = m.get('type')
|
|
80
|
+
if m.get('desc') is not None:
|
|
81
|
+
self.desc = m.get('desc')
|
|
82
|
+
if m.get('credential') is not None:
|
|
83
|
+
self.credential = m.get('credential')
|
|
84
|
+
return self
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateIdpConfigurationRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateIdpConfigurationRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for CreateIdpConfigurationRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
user_pool_id,
|
|
18
|
+
name,
|
|
19
|
+
idp_type,
|
|
20
|
+
idp_provider=None,
|
|
21
|
+
client_id=None,
|
|
22
|
+
client_secret=None,
|
|
23
|
+
discovery_url=None,
|
|
24
|
+
authorization_endpoint=None,
|
|
25
|
+
token_endpoint=None,
|
|
26
|
+
userinfo_endpoint=None,
|
|
27
|
+
scopes=None,
|
|
28
|
+
user_id_claim=None,
|
|
29
|
+
display_name_claim=None,
|
|
30
|
+
auto_create_user=None,
|
|
31
|
+
):
|
|
32
|
+
"""
|
|
33
|
+
Initialize CreateIdpConfigurationRequest request entity.
|
|
34
|
+
|
|
35
|
+
:param user_pool_id: 用户池 ID
|
|
36
|
+
:type user_pool_id: str (required)
|
|
37
|
+
|
|
38
|
+
:param name: IdP 显示名称(1-64字符,池内唯一)
|
|
39
|
+
:type name: str (required)
|
|
40
|
+
|
|
41
|
+
:param idp_type: 协议类型:OAUTH2 / OIDC / CAS
|
|
42
|
+
:type idp_type: str (required)
|
|
43
|
+
|
|
44
|
+
:param idp_provider: idp_provider parameter
|
|
45
|
+
:type idp_provider: str (optional)
|
|
46
|
+
|
|
47
|
+
:param client_id: (条件必填)OAuth2 client_id(OAuth2 协议必填)
|
|
48
|
+
:type client_id: str (optional)
|
|
49
|
+
|
|
50
|
+
:param client_secret: (条件必填)OAuth2 client_secret 明文(OAuth2 协议必填,加密存储)
|
|
51
|
+
:type client_secret: str (optional)
|
|
52
|
+
|
|
53
|
+
:param discovery_url: OAuth2/OIDC Discovery URL(提供后自动解析端点)
|
|
54
|
+
:type discovery_url: str (optional)
|
|
55
|
+
|
|
56
|
+
:param authorization_endpoint: (条件必填)授权端点(idpProvider=CUSTOM 且无 discoveryUrl 时必填)
|
|
57
|
+
:type authorization_endpoint: str (optional)
|
|
58
|
+
|
|
59
|
+
:param token_endpoint: (条件必填)Token 端点(idpProvider=CUSTOM 且无 discoveryUrl 时必填)
|
|
60
|
+
:type token_endpoint: str (optional)
|
|
61
|
+
|
|
62
|
+
:param userinfo_endpoint: (条件必填)UserInfo 端点(idpProvider=CUSTOM 且无 discoveryUrl 时必填)
|
|
63
|
+
:type userinfo_endpoint: str (optional)
|
|
64
|
+
|
|
65
|
+
:param scopes: 请求的 scope 列表
|
|
66
|
+
:type scopes: List[str] (optional)
|
|
67
|
+
|
|
68
|
+
:param user_id_claim: IdP 用户信息中映射到本地 username 的字段名
|
|
69
|
+
:type user_id_claim: str (optional)
|
|
70
|
+
|
|
71
|
+
:param display_name_claim: IdP 用户信息中映射到本地 displayName 的字段名
|
|
72
|
+
:type display_name_claim: str (optional)
|
|
73
|
+
|
|
74
|
+
:param auto_create_user: 登录时用户不存在是否自动创建,默认 false
|
|
75
|
+
:type auto_create_user: bool (optional)
|
|
76
|
+
"""
|
|
77
|
+
super().__init__()
|
|
78
|
+
self.user_pool_id = user_pool_id
|
|
79
|
+
self.name = name
|
|
80
|
+
self.idp_type = idp_type
|
|
81
|
+
self.idp_provider = idp_provider
|
|
82
|
+
self.client_id = client_id
|
|
83
|
+
self.client_secret = client_secret
|
|
84
|
+
self.discovery_url = discovery_url
|
|
85
|
+
self.authorization_endpoint = authorization_endpoint
|
|
86
|
+
self.token_endpoint = token_endpoint
|
|
87
|
+
self.userinfo_endpoint = userinfo_endpoint
|
|
88
|
+
self.scopes = scopes
|
|
89
|
+
self.user_id_claim = user_id_claim
|
|
90
|
+
self.display_name_claim = display_name_claim
|
|
91
|
+
self.auto_create_user = auto_create_user
|
|
92
|
+
|
|
93
|
+
def to_dict(self):
|
|
94
|
+
"""
|
|
95
|
+
Convert the request entity to a dictionary representation.
|
|
96
|
+
|
|
97
|
+
Nested model objects are recursively converted to dictionaries.
|
|
98
|
+
|
|
99
|
+
:return: Dictionary representation of the request
|
|
100
|
+
:rtype: dict
|
|
101
|
+
"""
|
|
102
|
+
_map = super().to_dict()
|
|
103
|
+
if _map is not None:
|
|
104
|
+
return _map
|
|
105
|
+
result = dict()
|
|
106
|
+
if self.user_pool_id is not None:
|
|
107
|
+
result['userPoolId'] = self.user_pool_id
|
|
108
|
+
if self.name is not None:
|
|
109
|
+
result['name'] = self.name
|
|
110
|
+
if self.idp_type is not None:
|
|
111
|
+
result['idpType'] = self.idp_type
|
|
112
|
+
if self.idp_provider is not None:
|
|
113
|
+
result['idpProvider'] = self.idp_provider
|
|
114
|
+
if self.client_id is not None:
|
|
115
|
+
result['clientId'] = self.client_id
|
|
116
|
+
if self.client_secret is not None:
|
|
117
|
+
result['clientSecret'] = self.client_secret
|
|
118
|
+
if self.discovery_url is not None:
|
|
119
|
+
result['discoveryUrl'] = self.discovery_url
|
|
120
|
+
if self.authorization_endpoint is not None:
|
|
121
|
+
result['authorizationEndpoint'] = self.authorization_endpoint
|
|
122
|
+
if self.token_endpoint is not None:
|
|
123
|
+
result['tokenEndpoint'] = self.token_endpoint
|
|
124
|
+
if self.userinfo_endpoint is not None:
|
|
125
|
+
result['userinfoEndpoint'] = self.userinfo_endpoint
|
|
126
|
+
if self.scopes is not None:
|
|
127
|
+
result['scopes'] = self.scopes
|
|
128
|
+
if self.user_id_claim is not None:
|
|
129
|
+
result['userIdClaim'] = self.user_id_claim
|
|
130
|
+
if self.display_name_claim is not None:
|
|
131
|
+
result['displayNameClaim'] = self.display_name_claim
|
|
132
|
+
if self.auto_create_user is not None:
|
|
133
|
+
result['autoCreateUser'] = self.auto_create_user
|
|
134
|
+
return result
|
|
135
|
+
|
|
136
|
+
def from_dict(self, m):
|
|
137
|
+
"""
|
|
138
|
+
Populate the request entity from a dictionary.
|
|
139
|
+
|
|
140
|
+
Nested dictionaries are recursively converted to model objects.
|
|
141
|
+
|
|
142
|
+
:param m: Dictionary containing request data
|
|
143
|
+
:type m: dict
|
|
144
|
+
|
|
145
|
+
:return: Self reference for method chaining
|
|
146
|
+
:rtype: CreateIdpConfigurationRequest
|
|
147
|
+
|
|
148
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
149
|
+
:raises ValueError: If nested model conversion fails
|
|
150
|
+
"""
|
|
151
|
+
m = m or dict()
|
|
152
|
+
if m.get('userPoolId') is not None:
|
|
153
|
+
self.user_pool_id = m.get('userPoolId')
|
|
154
|
+
if m.get('name') is not None:
|
|
155
|
+
self.name = m.get('name')
|
|
156
|
+
if m.get('idpType') is not None:
|
|
157
|
+
self.idp_type = m.get('idpType')
|
|
158
|
+
if m.get('idpProvider') is not None:
|
|
159
|
+
self.idp_provider = m.get('idpProvider')
|
|
160
|
+
if m.get('clientId') is not None:
|
|
161
|
+
self.client_id = m.get('clientId')
|
|
162
|
+
if m.get('clientSecret') is not None:
|
|
163
|
+
self.client_secret = m.get('clientSecret')
|
|
164
|
+
if m.get('discoveryUrl') is not None:
|
|
165
|
+
self.discovery_url = m.get('discoveryUrl')
|
|
166
|
+
if m.get('authorizationEndpoint') is not None:
|
|
167
|
+
self.authorization_endpoint = m.get('authorizationEndpoint')
|
|
168
|
+
if m.get('tokenEndpoint') is not None:
|
|
169
|
+
self.token_endpoint = m.get('tokenEndpoint')
|
|
170
|
+
if m.get('userinfoEndpoint') is not None:
|
|
171
|
+
self.userinfo_endpoint = m.get('userinfoEndpoint')
|
|
172
|
+
if m.get('scopes') is not None:
|
|
173
|
+
self.scopes = m.get('scopes')
|
|
174
|
+
if m.get('userIdClaim') is not None:
|
|
175
|
+
self.user_id_claim = m.get('userIdClaim')
|
|
176
|
+
if m.get('displayNameClaim') is not None:
|
|
177
|
+
self.display_name_claim = m.get('displayNameClaim')
|
|
178
|
+
if m.get('autoCreateUser') is not None:
|
|
179
|
+
self.auto_create_user = m.get('autoCreateUser')
|
|
180
|
+
return self
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateOauth2ClientRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateOauth2ClientRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for CreateOauth2ClientRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
user_pool_id,
|
|
18
|
+
name,
|
|
19
|
+
redirect_uris,
|
|
20
|
+
description=None,
|
|
21
|
+
client_type=None,
|
|
22
|
+
grant_types=None,
|
|
23
|
+
scopes=None,
|
|
24
|
+
access_token_ttl=None,
|
|
25
|
+
refresh_token_ttl=None,
|
|
26
|
+
):
|
|
27
|
+
"""
|
|
28
|
+
Initialize CreateOauth2ClientRequest request entity.
|
|
29
|
+
|
|
30
|
+
:param user_pool_id: 用户池 ID
|
|
31
|
+
:type user_pool_id: str (required)
|
|
32
|
+
|
|
33
|
+
:param name: 客户端名称(1-64字符,池内唯一)
|
|
34
|
+
:type name: str (required)
|
|
35
|
+
|
|
36
|
+
:param description: 描述(最多128字符)
|
|
37
|
+
:type description: str (optional)
|
|
38
|
+
|
|
39
|
+
:param client_type: 客户端类型:WEB_APP / SPA / M2M,默认 WEB_APP
|
|
40
|
+
:type client_type: str (optional)
|
|
41
|
+
|
|
42
|
+
:param redirect_uris: 允许的回调地址白名单(至少1个,最多20个)
|
|
43
|
+
:type redirect_uris: List[str] (required)
|
|
44
|
+
|
|
45
|
+
:param grant_types: 允许的授权类型,默认 [\"authorization_code\"]
|
|
46
|
+
:type grant_types: List[str] (optional)
|
|
47
|
+
|
|
48
|
+
:param scopes: 允许的 scope
|
|
49
|
+
:type scopes: List[str] (optional)
|
|
50
|
+
|
|
51
|
+
:param access_token_ttl: access_token 有效期(秒),默认 3600
|
|
52
|
+
:type access_token_ttl: int (optional)
|
|
53
|
+
|
|
54
|
+
:param refresh_token_ttl: refresh_token 有效期(秒),默认 604800
|
|
55
|
+
:type refresh_token_ttl: int (optional)
|
|
56
|
+
"""
|
|
57
|
+
super().__init__()
|
|
58
|
+
self.user_pool_id = user_pool_id
|
|
59
|
+
self.name = name
|
|
60
|
+
self.description = description
|
|
61
|
+
self.client_type = client_type
|
|
62
|
+
self.redirect_uris = redirect_uris
|
|
63
|
+
self.grant_types = grant_types
|
|
64
|
+
self.scopes = scopes
|
|
65
|
+
self.access_token_ttl = access_token_ttl
|
|
66
|
+
self.refresh_token_ttl = refresh_token_ttl
|
|
67
|
+
|
|
68
|
+
def to_dict(self):
|
|
69
|
+
"""
|
|
70
|
+
Convert the request entity to a dictionary representation.
|
|
71
|
+
|
|
72
|
+
Nested model objects are recursively converted to dictionaries.
|
|
73
|
+
|
|
74
|
+
:return: Dictionary representation of the request
|
|
75
|
+
:rtype: dict
|
|
76
|
+
"""
|
|
77
|
+
_map = super().to_dict()
|
|
78
|
+
if _map is not None:
|
|
79
|
+
return _map
|
|
80
|
+
result = dict()
|
|
81
|
+
if self.user_pool_id is not None:
|
|
82
|
+
result['userPoolId'] = self.user_pool_id
|
|
83
|
+
if self.name is not None:
|
|
84
|
+
result['name'] = self.name
|
|
85
|
+
if self.description is not None:
|
|
86
|
+
result['description'] = self.description
|
|
87
|
+
if self.client_type is not None:
|
|
88
|
+
result['clientType'] = self.client_type
|
|
89
|
+
if self.redirect_uris is not None:
|
|
90
|
+
result['redirectUris'] = self.redirect_uris
|
|
91
|
+
if self.grant_types is not None:
|
|
92
|
+
result['grantTypes'] = self.grant_types
|
|
93
|
+
if self.scopes is not None:
|
|
94
|
+
result['scopes'] = self.scopes
|
|
95
|
+
if self.access_token_ttl is not None:
|
|
96
|
+
result['accessTokenTtl'] = self.access_token_ttl
|
|
97
|
+
if self.refresh_token_ttl is not None:
|
|
98
|
+
result['refreshTokenTtl'] = self.refresh_token_ttl
|
|
99
|
+
return result
|
|
100
|
+
|
|
101
|
+
def from_dict(self, m):
|
|
102
|
+
"""
|
|
103
|
+
Populate the request entity from a dictionary.
|
|
104
|
+
|
|
105
|
+
Nested dictionaries are recursively converted to model objects.
|
|
106
|
+
|
|
107
|
+
:param m: Dictionary containing request data
|
|
108
|
+
:type m: dict
|
|
109
|
+
|
|
110
|
+
:return: Self reference for method chaining
|
|
111
|
+
:rtype: CreateOauth2ClientRequest
|
|
112
|
+
|
|
113
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
114
|
+
:raises ValueError: If nested model conversion fails
|
|
115
|
+
"""
|
|
116
|
+
m = m or dict()
|
|
117
|
+
if m.get('userPoolId') is not None:
|
|
118
|
+
self.user_pool_id = m.get('userPoolId')
|
|
119
|
+
if m.get('name') is not None:
|
|
120
|
+
self.name = m.get('name')
|
|
121
|
+
if m.get('description') is not None:
|
|
122
|
+
self.description = m.get('description')
|
|
123
|
+
if m.get('clientType') is not None:
|
|
124
|
+
self.client_type = m.get('clientType')
|
|
125
|
+
if m.get('redirectUris') is not None:
|
|
126
|
+
self.redirect_uris = m.get('redirectUris')
|
|
127
|
+
if m.get('grantTypes') is not None:
|
|
128
|
+
self.grant_types = m.get('grantTypes')
|
|
129
|
+
if m.get('scopes') is not None:
|
|
130
|
+
self.scopes = m.get('scopes')
|
|
131
|
+
if m.get('accessTokenTtl') is not None:
|
|
132
|
+
self.access_token_ttl = m.get('accessTokenTtl')
|
|
133
|
+
if m.get('refreshTokenTtl') is not None:
|
|
134
|
+
self.refresh_token_ttl = m.get('refreshTokenTtl')
|
|
135
|
+
return self
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateUserPoolRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateUserPoolRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for CreateUserPoolRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, name, description=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize CreateUserPoolRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param name: 用户池名称(1-64字符,仅允许字母、数字、下划线、连字符)
|
|
20
|
+
:type name: str (required)
|
|
21
|
+
|
|
22
|
+
:param description: 用户池描述(最多256字符)
|
|
23
|
+
:type description: str (optional)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.name = name
|
|
27
|
+
self.description = description
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
"""
|
|
31
|
+
Convert the request entity to a dictionary representation.
|
|
32
|
+
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the request
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
if self.name is not None:
|
|
43
|
+
result['name'] = self.name
|
|
44
|
+
if self.description is not None:
|
|
45
|
+
result['description'] = self.description
|
|
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: CreateUserPoolRequest
|
|
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('name') is not None:
|
|
65
|
+
self.name = m.get('name')
|
|
66
|
+
if m.get('description') is not None:
|
|
67
|
+
self.description = m.get('description')
|
|
68
|
+
return self
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateUserRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateUserRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for CreateUserRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self, user_pool_id, username, display_name=None, description=None, password=None, force_reset_password=None
|
|
17
|
+
):
|
|
18
|
+
"""
|
|
19
|
+
Initialize CreateUserRequest request entity.
|
|
20
|
+
|
|
21
|
+
:param user_pool_id: 用户池 ID
|
|
22
|
+
:type user_pool_id: str (required)
|
|
23
|
+
|
|
24
|
+
:param username: 用户名(1-64字符,仅允许字母、数字、`_.@-`)
|
|
25
|
+
:type username: str (required)
|
|
26
|
+
|
|
27
|
+
:param display_name: 显示名称(最多64字符)
|
|
28
|
+
:type display_name: str (optional)
|
|
29
|
+
|
|
30
|
+
:param description: 用户描述(最多128字符)
|
|
31
|
+
:type description: str (optional)
|
|
32
|
+
|
|
33
|
+
:param password: 用户密码(8-32字符);不传则用户无密码,仅能通过 IdP 登录
|
|
34
|
+
:type password: str (optional)
|
|
35
|
+
|
|
36
|
+
:param force_reset_password: 是否强制用户首次登录时重置密码,默认 false
|
|
37
|
+
:type force_reset_password: bool (optional)
|
|
38
|
+
"""
|
|
39
|
+
super().__init__()
|
|
40
|
+
self.user_pool_id = user_pool_id
|
|
41
|
+
self.username = username
|
|
42
|
+
self.display_name = display_name
|
|
43
|
+
self.description = description
|
|
44
|
+
self.password = password
|
|
45
|
+
self.force_reset_password = force_reset_password
|
|
46
|
+
|
|
47
|
+
def to_dict(self):
|
|
48
|
+
"""
|
|
49
|
+
Convert the request entity to a dictionary representation.
|
|
50
|
+
|
|
51
|
+
Nested model objects are recursively converted to dictionaries.
|
|
52
|
+
|
|
53
|
+
:return: Dictionary representation of the request
|
|
54
|
+
:rtype: dict
|
|
55
|
+
"""
|
|
56
|
+
_map = super().to_dict()
|
|
57
|
+
if _map is not None:
|
|
58
|
+
return _map
|
|
59
|
+
result = dict()
|
|
60
|
+
if self.user_pool_id is not None:
|
|
61
|
+
result['userPoolId'] = self.user_pool_id
|
|
62
|
+
if self.username is not None:
|
|
63
|
+
result['username'] = self.username
|
|
64
|
+
if self.display_name is not None:
|
|
65
|
+
result['displayName'] = self.display_name
|
|
66
|
+
if self.description is not None:
|
|
67
|
+
result['description'] = self.description
|
|
68
|
+
if self.password is not None:
|
|
69
|
+
result['password'] = self.password
|
|
70
|
+
if self.force_reset_password is not None:
|
|
71
|
+
result['forceResetPassword'] = self.force_reset_password
|
|
72
|
+
return result
|
|
73
|
+
|
|
74
|
+
def from_dict(self, m):
|
|
75
|
+
"""
|
|
76
|
+
Populate the request entity from a dictionary.
|
|
77
|
+
|
|
78
|
+
Nested dictionaries are recursively converted to model objects.
|
|
79
|
+
|
|
80
|
+
:param m: Dictionary containing request data
|
|
81
|
+
:type m: dict
|
|
82
|
+
|
|
83
|
+
:return: Self reference for method chaining
|
|
84
|
+
:rtype: CreateUserRequest
|
|
85
|
+
|
|
86
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
87
|
+
:raises ValueError: If nested model conversion fails
|
|
88
|
+
"""
|
|
89
|
+
m = m or dict()
|
|
90
|
+
if m.get('userPoolId') is not None:
|
|
91
|
+
self.user_pool_id = m.get('userPoolId')
|
|
92
|
+
if m.get('username') is not None:
|
|
93
|
+
self.username = m.get('username')
|
|
94
|
+
if m.get('displayName') is not None:
|
|
95
|
+
self.display_name = m.get('displayName')
|
|
96
|
+
if m.get('description') is not None:
|
|
97
|
+
self.description = m.get('description')
|
|
98
|
+
if m.get('password') is not None:
|
|
99
|
+
self.password = m.get('password')
|
|
100
|
+
if m.get('forceResetPassword') is not None:
|
|
101
|
+
self.force_reset_password = m.get('forceResetPassword')
|
|
102
|
+
return self
|