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.
Files changed (70) hide show
  1. baiducloud_python_sdk_agentidentity/__init__.py +5 -0
  2. baiducloud_python_sdk_agentidentity/api/__init__.py +0 -0
  3. baiducloud_python_sdk_agentidentity/api/agentidentity_client.py +1361 -0
  4. baiducloud_python_sdk_agentidentity/models/__init__.py +65 -0
  5. baiducloud_python_sdk_agentidentity/models/agent_dto.py +133 -0
  6. baiducloud_python_sdk_agentidentity/models/authorize_endpoint_request.py +94 -0
  7. baiducloud_python_sdk_agentidentity/models/batch_acquisition_of_users_request.py +68 -0
  8. baiducloud_python_sdk_agentidentity/models/batch_get_resource_api_key_request.py +86 -0
  9. baiducloud_python_sdk_agentidentity/models/batch_get_resource_api_key_response.py +62 -0
  10. baiducloud_python_sdk_agentidentity/models/complete_oauth2session_request.py +104 -0
  11. baiducloud_python_sdk_agentidentity/models/create_agent_request.py +76 -0
  12. baiducloud_python_sdk_agentidentity/models/create_credential_provider_request.py +84 -0
  13. baiducloud_python_sdk_agentidentity/models/create_idp_configuration_request.py +180 -0
  14. baiducloud_python_sdk_agentidentity/models/create_oauth2_client_request.py +135 -0
  15. baiducloud_python_sdk_agentidentity/models/create_user_pool_request.py +68 -0
  16. baiducloud_python_sdk_agentidentity/models/create_user_request.py +102 -0
  17. baiducloud_python_sdk_agentidentity/models/credential_config.py +205 -0
  18. baiducloud_python_sdk_agentidentity/models/credential_provider_dto.py +135 -0
  19. baiducloud_python_sdk_agentidentity/models/delete_agent_request.py +60 -0
  20. baiducloud_python_sdk_agentidentity/models/delete_credential_provider_request.py +60 -0
  21. baiducloud_python_sdk_agentidentity/models/delete_idp_configuration_request.py +68 -0
  22. baiducloud_python_sdk_agentidentity/models/delete_oauth2_client_request.py +68 -0
  23. baiducloud_python_sdk_agentidentity/models/delete_user_pool_request.py +60 -0
  24. baiducloud_python_sdk_agentidentity/models/delete_user_request.py +68 -0
  25. baiducloud_python_sdk_agentidentity/models/disable_idp_configuration_request.py +68 -0
  26. baiducloud_python_sdk_agentidentity/models/enable_idp_configuration_request.py +68 -0
  27. baiducloud_python_sdk_agentidentity/models/get_agent_request.py +60 -0
  28. baiducloud_python_sdk_agentidentity/models/get_credential_provider_request.py +60 -0
  29. baiducloud_python_sdk_agentidentity/models/get_idp_configuration_request.py +68 -0
  30. baiducloud_python_sdk_agentidentity/models/get_oauth2_client_request.py +68 -0
  31. baiducloud_python_sdk_agentidentity/models/get_resource_apikey_request.py +86 -0
  32. baiducloud_python_sdk_agentidentity/models/get_resource_oauth2token_request.py +136 -0
  33. baiducloud_python_sdk_agentidentity/models/get_user_pool_request.py +60 -0
  34. baiducloud_python_sdk_agentidentity/models/get_user_request.py +76 -0
  35. baiducloud_python_sdk_agentidentity/models/get_wat_for_user_request.py +102 -0
  36. baiducloud_python_sdk_agentidentity/models/get_workload_access_token_request.py +84 -0
  37. baiducloud_python_sdk_agentidentity/models/list_agents_request.py +76 -0
  38. baiducloud_python_sdk_agentidentity/models/list_agents_response.py +86 -0
  39. baiducloud_python_sdk_agentidentity/models/list_credential_providers_request.py +84 -0
  40. baiducloud_python_sdk_agentidentity/models/list_credential_providers_response.py +86 -0
  41. baiducloud_python_sdk_agentidentity/models/list_idp_configurations_request.py +84 -0
  42. baiducloud_python_sdk_agentidentity/models/list_idp_configurations_response.py +86 -0
  43. baiducloud_python_sdk_agentidentity/models/list_oauth2_clients_request.py +84 -0
  44. baiducloud_python_sdk_agentidentity/models/list_oauth2_clients_response.py +86 -0
  45. baiducloud_python_sdk_agentidentity/models/list_user_pools_request.py +76 -0
  46. baiducloud_python_sdk_agentidentity/models/list_user_pools_response.py +86 -0
  47. baiducloud_python_sdk_agentidentity/models/list_users_request.py +84 -0
  48. baiducloud_python_sdk_agentidentity/models/list_users_response.py +86 -0
  49. baiducloud_python_sdk_agentidentity/models/o_idc_discovery_request.py +58 -0
  50. baiducloud_python_sdk_agentidentity/models/oauth2idp_callback_request.py +70 -0
  51. baiducloud_python_sdk_agentidentity/models/reset_password_request.py +92 -0
  52. baiducloud_python_sdk_agentidentity/models/resource_credential_dto.py +90 -0
  53. baiducloud_python_sdk_agentidentity/models/token_endpoint_request.py +108 -0
  54. baiducloud_python_sdk_agentidentity/models/update_agent_request.py +76 -0
  55. baiducloud_python_sdk_agentidentity/models/update_credential_provider_request.py +76 -0
  56. baiducloud_python_sdk_agentidentity/models/update_idp_configuration_request.py +162 -0
  57. baiducloud_python_sdk_agentidentity/models/update_oauth2_client_request.py +135 -0
  58. baiducloud_python_sdk_agentidentity/models/update_user_pool_request.py +76 -0
  59. baiducloud_python_sdk_agentidentity/models/update_user_request.py +84 -0
  60. baiducloud_python_sdk_agentidentity/models/user_pool_dto.py +187 -0
  61. baiducloud_python_sdk_agentidentity/models/user_pool_idp_config_dto.py +205 -0
  62. baiducloud_python_sdk_agentidentity/models/user_pool_o_auth2_client_dto.py +178 -0
  63. baiducloud_python_sdk_agentidentity/models/user_pool_user_dto.py +115 -0
  64. baiducloud_python_sdk_agentidentity/models/userinfo_endpoint_request.py +76 -0
  65. baiducloud_python_sdk_agentidentity/models/userinfo_endpoint_response.py +77 -0
  66. baiducloud_python_sdk_agentidentity-0.0.1.dist-info/LICENSE +177 -0
  67. baiducloud_python_sdk_agentidentity-0.0.1.dist-info/METADATA +76 -0
  68. baiducloud_python_sdk_agentidentity-0.0.1.dist-info/RECORD +70 -0
  69. baiducloud_python_sdk_agentidentity-0.0.1.dist-info/WHEEL +5 -0
  70. baiducloud_python_sdk_agentidentity-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,205 @@
1
+ """
2
+ UserPoolIdpConfigDTO information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class UserPoolIdpConfigDTO(AbstractModel):
9
+ """
10
+ UserPoolIdpConfigDTO
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ id=None,
16
+ name=None,
17
+ idp_type=None,
18
+ idp_provider=None,
19
+ client_id=None,
20
+ client_secret=None,
21
+ discovery_url=None,
22
+ authorization_endpoint=None,
23
+ token_endpoint=None,
24
+ userinfo_endpoint=None,
25
+ scopes=None,
26
+ user_id_claim=None,
27
+ display_name_claim=None,
28
+ auto_create_user=None,
29
+ enabled=None,
30
+ callback_url=None,
31
+ created_at=None,
32
+ ):
33
+ """
34
+ Initialize UserPoolIdpConfigDTO instance.
35
+
36
+ :param id: IdP 配置 ID
37
+ :type id: str (optional)
38
+
39
+ :param name: 显示名称
40
+ :type name: str (optional)
41
+
42
+ :param idp_type: 协议类型:OAUTH2 / OIDC / CAS
43
+ :type idp_type: str (optional)
44
+
45
+ :param idp_provider: OAuth2 提供方:CUSTOM / DINGTALK / FEISHU;非 OAuth2 为 null
46
+ :type idp_provider: str (optional)
47
+
48
+ :param client_id: OAuth2 client_id
49
+ :type client_id: str (optional)
50
+
51
+ :param client_secret: client_secret(get 返回明文,list 不返回)
52
+ :type client_secret: str (optional)
53
+
54
+ :param discovery_url: Discovery URL
55
+ :type discovery_url: str (optional)
56
+
57
+ :param authorization_endpoint: 授权端点
58
+ :type authorization_endpoint: str (optional)
59
+
60
+ :param token_endpoint: Token 端点
61
+ :type token_endpoint: str (optional)
62
+
63
+ :param userinfo_endpoint: UserInfo 端点
64
+ :type userinfo_endpoint: str (optional)
65
+
66
+ :param scopes: 请求的 scope
67
+ :type scopes: List[str] (optional)
68
+
69
+ :param user_id_claim: 用户 ID 映射字段
70
+ :type user_id_claim: str (optional)
71
+
72
+ :param display_name_claim: 显示名称映射字段
73
+ :type display_name_claim: str (optional)
74
+
75
+ :param auto_create_user: 是否自动创建用户
76
+ :type auto_create_user: bool (optional)
77
+
78
+ :param enabled: 是否启用
79
+ :type enabled: bool (optional)
80
+
81
+ :param callback_url: 统一 IdP 回调地址(运行时派生)
82
+ :type callback_url: str (optional)
83
+
84
+ :param created_at: 创建时间
85
+ :type created_at: datetime (optional)
86
+ """
87
+ super().__init__()
88
+ self.id = id
89
+ self.name = name
90
+ self.idp_type = idp_type
91
+ self.idp_provider = idp_provider
92
+ self.client_id = client_id
93
+ self.client_secret = client_secret
94
+ self.discovery_url = discovery_url
95
+ self.authorization_endpoint = authorization_endpoint
96
+ self.token_endpoint = token_endpoint
97
+ self.userinfo_endpoint = userinfo_endpoint
98
+ self.scopes = scopes
99
+ self.user_id_claim = user_id_claim
100
+ self.display_name_claim = display_name_claim
101
+ self.auto_create_user = auto_create_user
102
+ self.enabled = enabled
103
+ self.callback_url = callback_url
104
+ self.created_at = created_at
105
+
106
+ def to_dict(self):
107
+ """
108
+ Convert the model instance to a dictionary representation.
109
+
110
+ Nested model objects are recursively converted to dictionaries.
111
+
112
+ :return: Dictionary representation of the model
113
+ :rtype: dict
114
+ """
115
+ _map = super().to_dict()
116
+ if _map is not None:
117
+ return _map
118
+ result = dict()
119
+ if self.id is not None:
120
+ result['id'] = self.id
121
+ if self.name is not None:
122
+ result['name'] = self.name
123
+ if self.idp_type is not None:
124
+ result['idpType'] = self.idp_type
125
+ if self.idp_provider is not None:
126
+ result['idpProvider'] = self.idp_provider
127
+ if self.client_id is not None:
128
+ result['clientId'] = self.client_id
129
+ if self.client_secret is not None:
130
+ result['clientSecret'] = self.client_secret
131
+ if self.discovery_url is not None:
132
+ result['discoveryUrl'] = self.discovery_url
133
+ if self.authorization_endpoint is not None:
134
+ result['authorizationEndpoint'] = self.authorization_endpoint
135
+ if self.token_endpoint is not None:
136
+ result['tokenEndpoint'] = self.token_endpoint
137
+ if self.userinfo_endpoint is not None:
138
+ result['userinfoEndpoint'] = self.userinfo_endpoint
139
+ if self.scopes is not None:
140
+ result['scopes'] = self.scopes
141
+ if self.user_id_claim is not None:
142
+ result['userIdClaim'] = self.user_id_claim
143
+ if self.display_name_claim is not None:
144
+ result['displayNameClaim'] = self.display_name_claim
145
+ if self.auto_create_user is not None:
146
+ result['autoCreateUser'] = self.auto_create_user
147
+ if self.enabled is not None:
148
+ result['enabled'] = self.enabled
149
+ if self.callback_url is not None:
150
+ result['callbackUrl'] = self.callback_url
151
+ if self.created_at is not None:
152
+ result['createdAt'] = self.created_at
153
+ return result
154
+
155
+ def from_dict(self, m):
156
+ """
157
+ Populate the model instance from a dictionary.
158
+
159
+ Nested dictionaries are recursively converted to model objects.
160
+
161
+ :param m: Dictionary containing model data
162
+ :type m: dict
163
+
164
+ :return: Self reference for method chaining
165
+ :rtype: UserPoolIdpConfigDTO
166
+
167
+ :raises TypeError: If input is not a dictionary type
168
+ :raises ValueError: If nested model conversion fails
169
+ """
170
+ m = m or dict()
171
+ if m.get('id') is not None:
172
+ self.id = m.get('id')
173
+ if m.get('name') is not None:
174
+ self.name = m.get('name')
175
+ if m.get('idpType') is not None:
176
+ self.idp_type = m.get('idpType')
177
+ if m.get('idpProvider') is not None:
178
+ self.idp_provider = m.get('idpProvider')
179
+ if m.get('clientId') is not None:
180
+ self.client_id = m.get('clientId')
181
+ if m.get('clientSecret') is not None:
182
+ self.client_secret = m.get('clientSecret')
183
+ if m.get('discoveryUrl') is not None:
184
+ self.discovery_url = m.get('discoveryUrl')
185
+ if m.get('authorizationEndpoint') is not None:
186
+ self.authorization_endpoint = m.get('authorizationEndpoint')
187
+ if m.get('tokenEndpoint') is not None:
188
+ self.token_endpoint = m.get('tokenEndpoint')
189
+ if m.get('userinfoEndpoint') is not None:
190
+ self.userinfo_endpoint = m.get('userinfoEndpoint')
191
+ if m.get('scopes') is not None:
192
+ self.scopes = m.get('scopes')
193
+ if m.get('userIdClaim') is not None:
194
+ self.user_id_claim = m.get('userIdClaim')
195
+ if m.get('displayNameClaim') is not None:
196
+ self.display_name_claim = m.get('displayNameClaim')
197
+ if m.get('autoCreateUser') is not None:
198
+ self.auto_create_user = m.get('autoCreateUser')
199
+ if m.get('enabled') is not None:
200
+ self.enabled = m.get('enabled')
201
+ if m.get('callbackUrl') is not None:
202
+ self.callback_url = m.get('callbackUrl')
203
+ if m.get('createdAt') is not None:
204
+ self.created_at = m.get('createdAt')
205
+ return self
@@ -0,0 +1,178 @@
1
+ """
2
+ UserPoolOAuth2ClientDTO information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class UserPoolOAuth2ClientDTO(AbstractModel):
9
+ """
10
+ UserPoolOAuth2ClientDTO
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ id=None,
16
+ client_id=None,
17
+ client_secret=None,
18
+ name=None,
19
+ description=None,
20
+ client_type=None,
21
+ redirect_uris=None,
22
+ grant_types=None,
23
+ scopes=None,
24
+ access_token_ttl=None,
25
+ refresh_token_ttl=None,
26
+ enabled=None,
27
+ login_url=None,
28
+ created_at=None,
29
+ ):
30
+ """
31
+ Initialize UserPoolOAuth2ClientDTO instance.
32
+
33
+ :param id: 客户端记录 ID
34
+ :type id: str (optional)
35
+
36
+ :param client_id: OAuth2 client_id
37
+ :type client_id: str (optional)
38
+
39
+ :param client_secret: client_secret(get 返回明文,list 不返回)
40
+ :type client_secret: str (optional)
41
+
42
+ :param name: 客户端名称
43
+ :type name: str (optional)
44
+
45
+ :param description: 描述
46
+ :type description: str (optional)
47
+
48
+ :param client_type: 客户端类型:WEB_APP / SPA / M2M
49
+ :type client_type: str (optional)
50
+
51
+ :param redirect_uris: 回调地址白名单
52
+ :type redirect_uris: List[str] (optional)
53
+
54
+ :param grant_types: 授权类型
55
+ :type grant_types: List[str] (optional)
56
+
57
+ :param scopes: 允许的 scope
58
+ :type scopes: List[str] (optional)
59
+
60
+ :param access_token_ttl: access_token 有效期(秒)
61
+ :type access_token_ttl: int (optional)
62
+
63
+ :param refresh_token_ttl: refresh_token 有效期(秒)
64
+ :type refresh_token_ttl: int (optional)
65
+
66
+ :param enabled: 是否启用
67
+ :type enabled: bool (optional)
68
+
69
+ :param login_url: 拼装好的 OAuth2 authorize 链接
70
+ :type login_url: str (optional)
71
+
72
+ :param created_at: 创建时间
73
+ :type created_at: datetime (optional)
74
+ """
75
+ super().__init__()
76
+ self.id = id
77
+ self.client_id = client_id
78
+ self.client_secret = client_secret
79
+ self.name = name
80
+ self.description = description
81
+ self.client_type = client_type
82
+ self.redirect_uris = redirect_uris
83
+ self.grant_types = grant_types
84
+ self.scopes = scopes
85
+ self.access_token_ttl = access_token_ttl
86
+ self.refresh_token_ttl = refresh_token_ttl
87
+ self.enabled = enabled
88
+ self.login_url = login_url
89
+ self.created_at = created_at
90
+
91
+ def to_dict(self):
92
+ """
93
+ Convert the model instance to a dictionary representation.
94
+
95
+ Nested model objects are recursively converted to dictionaries.
96
+
97
+ :return: Dictionary representation of the model
98
+ :rtype: dict
99
+ """
100
+ _map = super().to_dict()
101
+ if _map is not None:
102
+ return _map
103
+ result = dict()
104
+ if self.id is not None:
105
+ result['id'] = self.id
106
+ if self.client_id is not None:
107
+ result['clientId'] = self.client_id
108
+ if self.client_secret is not None:
109
+ result['clientSecret'] = self.client_secret
110
+ if self.name is not None:
111
+ result['name'] = self.name
112
+ if self.description is not None:
113
+ result['description'] = self.description
114
+ if self.client_type is not None:
115
+ result['clientType'] = self.client_type
116
+ if self.redirect_uris is not None:
117
+ result['redirectUris'] = self.redirect_uris
118
+ if self.grant_types is not None:
119
+ result['grantTypes'] = self.grant_types
120
+ if self.scopes is not None:
121
+ result['scopes'] = self.scopes
122
+ if self.access_token_ttl is not None:
123
+ result['accessTokenTtl'] = self.access_token_ttl
124
+ if self.refresh_token_ttl is not None:
125
+ result['refreshTokenTtl'] = self.refresh_token_ttl
126
+ if self.enabled is not None:
127
+ result['enabled'] = self.enabled
128
+ if self.login_url is not None:
129
+ result['loginUrl'] = self.login_url
130
+ if self.created_at is not None:
131
+ result['createdAt'] = self.created_at
132
+ return result
133
+
134
+ def from_dict(self, m):
135
+ """
136
+ Populate the model instance from a dictionary.
137
+
138
+ Nested dictionaries are recursively converted to model objects.
139
+
140
+ :param m: Dictionary containing model data
141
+ :type m: dict
142
+
143
+ :return: Self reference for method chaining
144
+ :rtype: UserPoolOAuth2ClientDTO
145
+
146
+ :raises TypeError: If input is not a dictionary type
147
+ :raises ValueError: If nested model conversion fails
148
+ """
149
+ m = m or dict()
150
+ if m.get('id') is not None:
151
+ self.id = m.get('id')
152
+ if m.get('clientId') is not None:
153
+ self.client_id = m.get('clientId')
154
+ if m.get('clientSecret') is not None:
155
+ self.client_secret = m.get('clientSecret')
156
+ if m.get('name') is not None:
157
+ self.name = m.get('name')
158
+ if m.get('description') is not None:
159
+ self.description = m.get('description')
160
+ if m.get('clientType') is not None:
161
+ self.client_type = m.get('clientType')
162
+ if m.get('redirectUris') is not None:
163
+ self.redirect_uris = m.get('redirectUris')
164
+ if m.get('grantTypes') is not None:
165
+ self.grant_types = m.get('grantTypes')
166
+ if m.get('scopes') is not None:
167
+ self.scopes = m.get('scopes')
168
+ if m.get('accessTokenTtl') is not None:
169
+ self.access_token_ttl = m.get('accessTokenTtl')
170
+ if m.get('refreshTokenTtl') is not None:
171
+ self.refresh_token_ttl = m.get('refreshTokenTtl')
172
+ if m.get('enabled') is not None:
173
+ self.enabled = m.get('enabled')
174
+ if m.get('loginUrl') is not None:
175
+ self.login_url = m.get('loginUrl')
176
+ if m.get('createdAt') is not None:
177
+ self.created_at = m.get('createdAt')
178
+ return self
@@ -0,0 +1,115 @@
1
+ """
2
+ UserPoolUserDTO information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class UserPoolUserDTO(AbstractModel):
9
+ """
10
+ UserPoolUserDTO
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ id=None,
16
+ username=None,
17
+ display_name=None,
18
+ description=None,
19
+ source=None,
20
+ has_password=None,
21
+ created_at=None,
22
+ ):
23
+ """
24
+ Initialize UserPoolUserDTO instance.
25
+
26
+ :param id: 用户 ID
27
+ :type id: str (optional)
28
+
29
+ :param username: 用户名
30
+ :type username: str (optional)
31
+
32
+ :param display_name: 显示名称
33
+ :type display_name: str (optional)
34
+
35
+ :param description: 描述
36
+ :type description: str (optional)
37
+
38
+ :param source: 来源:MANUAL / AUTO
39
+ :type source: str (optional)
40
+
41
+ :param has_password: 是否已设置密码
42
+ :type has_password: bool (optional)
43
+
44
+ :param created_at: 创建时间
45
+ :type created_at: datetime (optional)
46
+ """
47
+ super().__init__()
48
+ self.id = id
49
+ self.username = username
50
+ self.display_name = display_name
51
+ self.description = description
52
+ self.source = source
53
+ self.has_password = has_password
54
+ self.created_at = created_at
55
+
56
+ def to_dict(self):
57
+ """
58
+ Convert the model instance to a dictionary representation.
59
+
60
+ Nested model objects are recursively converted to dictionaries.
61
+
62
+ :return: Dictionary representation of the model
63
+ :rtype: dict
64
+ """
65
+ _map = super().to_dict()
66
+ if _map is not None:
67
+ return _map
68
+ result = dict()
69
+ if self.id is not None:
70
+ result['id'] = self.id
71
+ if self.username is not None:
72
+ result['username'] = self.username
73
+ if self.display_name is not None:
74
+ result['displayName'] = self.display_name
75
+ if self.description is not None:
76
+ result['description'] = self.description
77
+ if self.source is not None:
78
+ result['source'] = self.source
79
+ if self.has_password is not None:
80
+ result['hasPassword'] = self.has_password
81
+ if self.created_at is not None:
82
+ result['createdAt'] = self.created_at
83
+ return result
84
+
85
+ def from_dict(self, m):
86
+ """
87
+ Populate the model instance from a dictionary.
88
+
89
+ Nested dictionaries are recursively converted to model objects.
90
+
91
+ :param m: Dictionary containing model data
92
+ :type m: dict
93
+
94
+ :return: Self reference for method chaining
95
+ :rtype: UserPoolUserDTO
96
+
97
+ :raises TypeError: If input is not a dictionary type
98
+ :raises ValueError: If nested model conversion fails
99
+ """
100
+ m = m or dict()
101
+ if m.get('id') is not None:
102
+ self.id = m.get('id')
103
+ if m.get('username') is not None:
104
+ self.username = m.get('username')
105
+ if m.get('displayName') is not None:
106
+ self.display_name = m.get('displayName')
107
+ if m.get('description') is not None:
108
+ self.description = m.get('description')
109
+ if m.get('source') is not None:
110
+ self.source = m.get('source')
111
+ if m.get('hasPassword') is not None:
112
+ self.has_password = m.get('hasPassword')
113
+ if m.get('createdAt') is not None:
114
+ self.created_at = m.get('createdAt')
115
+ return self
@@ -0,0 +1,76 @@
1
+ """
2
+ Request entity for UserinfoEndpointRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_core.annotation import host
7
+
8
+
9
+ class UserinfoEndpointRequest(AbstractModel):
10
+ """
11
+ Request entity for UserinfoEndpointRequest operation.
12
+
13
+ This class encapsulates all parameters for the API request.
14
+ """
15
+
16
+ def __init__(self, user_pool_id, authorization):
17
+ """
18
+ Initialize UserinfoEndpointRequest request entity.
19
+
20
+ :param user_pool_id: user_pool_id parameter
21
+ :type user_pool_id: str (required)
22
+
23
+ :param authorization: authorization parameter
24
+ :type authorization: str (required)
25
+ """
26
+ super().__init__()
27
+ self.user_pool_id = user_pool_id
28
+ self._authorization = authorization
29
+
30
+ @property
31
+ @host
32
+ def authorization(self):
33
+ """authorization property"""
34
+ return self._authorization
35
+
36
+ @authorization.setter
37
+ def authorization(self, value):
38
+ """Set authorization value"""
39
+ self._authorization = value
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
+ return result
55
+
56
+ def from_dict(self, m):
57
+ """
58
+ Populate the request entity from a dictionary.
59
+
60
+ Nested dictionaries are recursively converted to model objects.
61
+
62
+ :param m: Dictionary containing request data
63
+ :type m: dict
64
+
65
+ :return: Self reference for method chaining
66
+ :rtype: UserinfoEndpointRequest
67
+
68
+ :raises TypeError: If input is not a dictionary or field type mismatch
69
+ :raises ValueError: If nested model conversion fails
70
+ """
71
+ m = m or dict()
72
+ if m.get('userPoolId') is not None:
73
+ self.user_pool_id = m.get('userPoolId')
74
+ if m.get('Authorization') is not None:
75
+ self.authorization = m.get('Authorization')
76
+ return self
@@ -0,0 +1,77 @@
1
+ """
2
+ Request entity for UserinfoEndpointResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class UserinfoEndpointResponse(BceResponse):
9
+ """
10
+ UserinfoEndpointResponse
11
+ """
12
+
13
+ def __init__(self, sub=None, username=None, display_name=None):
14
+ """
15
+ Initialize UserinfoEndpointResponse response.
16
+
17
+ :param sub: 用户池用户 ID
18
+ :type sub: str (optional)
19
+
20
+ :param username: 用户名
21
+ :type username: str (optional)
22
+
23
+ :param display_name: 显示名称
24
+ :type display_name: str (optional)
25
+ """
26
+ super().__init__()
27
+ self.sub = sub
28
+ self.username = username
29
+ self.display_name = display_name
30
+
31
+ def to_dict(self):
32
+ """
33
+ Convert the response instance to a dictionary representation.
34
+
35
+ Includes metadata from the parent BceResponse class.
36
+ Nested model objects are recursively converted to dictionaries.
37
+
38
+ :return: Dictionary representation of the response
39
+ :rtype: dict
40
+ """
41
+ _map = super().to_dict()
42
+ if _map is not None:
43
+ return _map
44
+ result = dict()
45
+ if self.metadata is not None:
46
+ result['metadata'] = dict(self.metadata)
47
+ if self.sub is not None:
48
+ result['sub'] = self.sub
49
+ if self.username is not None:
50
+ result['username'] = self.username
51
+ if self.display_name is not None:
52
+ result['display_name'] = self.display_name
53
+ return result
54
+
55
+ def from_dict(self, m):
56
+ """
57
+ Populate the response instance from a dictionary.
58
+
59
+ Nested dictionaries are recursively converted to model objects.
60
+
61
+ :param m: Dictionary containing response data
62
+ :type m: dict
63
+
64
+ :return: Self reference for method chaining
65
+ :rtype: UserinfoEndpointResponse
66
+
67
+ :raises TypeError: If input is not a dictionary or field type mismatch
68
+ :raises ValueError: If nested model conversion fails
69
+ """
70
+ m = m or dict()
71
+ if m.get('sub') is not None:
72
+ self.sub = m.get('sub')
73
+ if m.get('username') is not None:
74
+ self.username = m.get('username')
75
+ if m.get('display_name') is not None:
76
+ self.display_name = m.get('display_name')
77
+ return self