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,68 @@
1
+ """
2
+ Request entity for DeleteUserRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class DeleteUserRequest(AbstractModel):
9
+ """
10
+ Request entity for DeleteUserRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, user_pool_id, id):
16
+ """
17
+ Initialize DeleteUserRequest request entity.
18
+
19
+ :param user_pool_id: 用户池 ID
20
+ :type user_pool_id: str (required)
21
+
22
+ :param id: 用户 ID
23
+ :type id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.user_pool_id = user_pool_id
27
+ self.id = id
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.user_pool_id is not None:
43
+ result['userPoolId'] = self.user_pool_id
44
+ if self.id is not None:
45
+ result['id'] = self.id
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: DeleteUserRequest
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('userPoolId') is not None:
65
+ self.user_pool_id = m.get('userPoolId')
66
+ if m.get('id') is not None:
67
+ self.id = m.get('id')
68
+ return self
@@ -0,0 +1,68 @@
1
+ """
2
+ Request entity for DisableIdpConfigurationRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class DisableIdpConfigurationRequest(AbstractModel):
9
+ """
10
+ Request entity for DisableIdpConfigurationRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, user_pool_id, id):
16
+ """
17
+ Initialize DisableIdpConfigurationRequest request entity.
18
+
19
+ :param user_pool_id: 用户池 ID
20
+ :type user_pool_id: str (required)
21
+
22
+ :param id: IdP 配置 ID
23
+ :type id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.user_pool_id = user_pool_id
27
+ self.id = id
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.user_pool_id is not None:
43
+ result['userPoolId'] = self.user_pool_id
44
+ if self.id is not None:
45
+ result['id'] = self.id
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: DisableIdpConfigurationRequest
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('userPoolId') is not None:
65
+ self.user_pool_id = m.get('userPoolId')
66
+ if m.get('id') is not None:
67
+ self.id = m.get('id')
68
+ return self
@@ -0,0 +1,68 @@
1
+ """
2
+ Request entity for EnableIdpConfigurationRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class EnableIdpConfigurationRequest(AbstractModel):
9
+ """
10
+ Request entity for EnableIdpConfigurationRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, user_pool_id, id):
16
+ """
17
+ Initialize EnableIdpConfigurationRequest request entity.
18
+
19
+ :param user_pool_id: 用户池 ID
20
+ :type user_pool_id: str (required)
21
+
22
+ :param id: IdP 配置 ID
23
+ :type id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.user_pool_id = user_pool_id
27
+ self.id = id
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.user_pool_id is not None:
43
+ result['userPoolId'] = self.user_pool_id
44
+ if self.id is not None:
45
+ result['id'] = self.id
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: EnableIdpConfigurationRequest
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('userPoolId') is not None:
65
+ self.user_pool_id = m.get('userPoolId')
66
+ if m.get('id') is not None:
67
+ self.id = m.get('id')
68
+ return self
@@ -0,0 +1,60 @@
1
+ """
2
+ Request entity for GetAgentRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetAgentRequest(AbstractModel):
9
+ """
10
+ Request entity for GetAgentRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, agent_id):
16
+ """
17
+ Initialize GetAgentRequest request entity.
18
+
19
+ :param agent_id: Agent ID
20
+ :type agent_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.agent_id = agent_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
+ if self.agent_id is not None:
39
+ result['agentId'] = self.agent_id
40
+ return result
41
+
42
+ def from_dict(self, m):
43
+ """
44
+ Populate the request entity from a dictionary.
45
+
46
+ Nested dictionaries are recursively converted to model objects.
47
+
48
+ :param m: Dictionary containing request data
49
+ :type m: dict
50
+
51
+ :return: Self reference for method chaining
52
+ :rtype: GetAgentRequest
53
+
54
+ :raises TypeError: If input is not a dictionary or field type mismatch
55
+ :raises ValueError: If nested model conversion fails
56
+ """
57
+ m = m or dict()
58
+ if m.get('agentId') is not None:
59
+ self.agent_id = m.get('agentId')
60
+ return self
@@ -0,0 +1,60 @@
1
+ """
2
+ Request entity for GetCredentialProviderRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetCredentialProviderRequest(AbstractModel):
9
+ """
10
+ Request entity for GetCredentialProviderRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, credential_provider_id):
16
+ """
17
+ Initialize GetCredentialProviderRequest request entity.
18
+
19
+ :param credential_provider_id: 凭证提供方 ID
20
+ :type credential_provider_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.credential_provider_id = credential_provider_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
+ if self.credential_provider_id is not None:
39
+ result['credentialProviderId'] = self.credential_provider_id
40
+ return result
41
+
42
+ def from_dict(self, m):
43
+ """
44
+ Populate the request entity from a dictionary.
45
+
46
+ Nested dictionaries are recursively converted to model objects.
47
+
48
+ :param m: Dictionary containing request data
49
+ :type m: dict
50
+
51
+ :return: Self reference for method chaining
52
+ :rtype: GetCredentialProviderRequest
53
+
54
+ :raises TypeError: If input is not a dictionary or field type mismatch
55
+ :raises ValueError: If nested model conversion fails
56
+ """
57
+ m = m or dict()
58
+ if m.get('credentialProviderId') is not None:
59
+ self.credential_provider_id = m.get('credentialProviderId')
60
+ return self
@@ -0,0 +1,68 @@
1
+ """
2
+ Request entity for GetIdpConfigurationRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetIdpConfigurationRequest(AbstractModel):
9
+ """
10
+ Request entity for GetIdpConfigurationRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, user_pool_id, id):
16
+ """
17
+ Initialize GetIdpConfigurationRequest request entity.
18
+
19
+ :param user_pool_id: 用户池 ID
20
+ :type user_pool_id: str (required)
21
+
22
+ :param id: IdP 配置 ID
23
+ :type id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.user_pool_id = user_pool_id
27
+ self.id = id
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.user_pool_id is not None:
43
+ result['userPoolId'] = self.user_pool_id
44
+ if self.id is not None:
45
+ result['id'] = self.id
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: GetIdpConfigurationRequest
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('userPoolId') is not None:
65
+ self.user_pool_id = m.get('userPoolId')
66
+ if m.get('id') is not None:
67
+ self.id = m.get('id')
68
+ return self
@@ -0,0 +1,68 @@
1
+ """
2
+ Request entity for GetOauth2ClientRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetOauth2ClientRequest(AbstractModel):
9
+ """
10
+ Request entity for GetOauth2ClientRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, user_pool_id, id):
16
+ """
17
+ Initialize GetOauth2ClientRequest request entity.
18
+
19
+ :param user_pool_id: 用户池 ID
20
+ :type user_pool_id: str (required)
21
+
22
+ :param id: 客户端记录 ID
23
+ :type id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.user_pool_id = user_pool_id
27
+ self.id = id
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.user_pool_id is not None:
43
+ result['userPoolId'] = self.user_pool_id
44
+ if self.id is not None:
45
+ result['id'] = self.id
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: GetOauth2ClientRequest
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('userPoolId') is not None:
65
+ self.user_pool_id = m.get('userPoolId')
66
+ if m.get('id') is not None:
67
+ self.id = m.get('id')
68
+ return self
@@ -0,0 +1,86 @@
1
+ """
2
+ Request entity for GetResourceApikeyRequest 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 GetResourceApikeyRequest(AbstractModel):
10
+ """
11
+ Request entity for GetResourceApikeyRequest operation.
12
+
13
+ This class encapsulates all parameters for the API request.
14
+ """
15
+
16
+ def __init__(self, x_bce_workload_access_token, name, workload_access_token=None):
17
+ """
18
+ Initialize GetResourceApikeyRequest request entity.
19
+
20
+ :param x_bce_workload_access_token: x_bce_workload_access_token parameter
21
+ :type x_bce_workload_access_token: str (required)
22
+
23
+ :param name: 凭证提供方名称
24
+ :type name: str (required)
25
+
26
+ :param workload_access_token: WAT 令牌,也可通过 Header 传递
27
+ :type workload_access_token: str (optional)
28
+ """
29
+ super().__init__()
30
+ self._x_bce_workload_access_token = x_bce_workload_access_token
31
+ self.name = name
32
+ self.workload_access_token = workload_access_token
33
+
34
+ @property
35
+ @host
36
+ def x_bce_workload_access_token(self):
37
+ """x_bce_workload_access_token property"""
38
+ return self._x_bce_workload_access_token
39
+
40
+ @x_bce_workload_access_token.setter
41
+ def x_bce_workload_access_token(self, value):
42
+ """Set x_bce_workload_access_token value"""
43
+ self._x_bce_workload_access_token = value
44
+
45
+ def to_dict(self):
46
+ """
47
+ Convert the request entity to a dictionary representation.
48
+
49
+ Nested model objects are recursively converted to dictionaries.
50
+
51
+ :return: Dictionary representation of the request
52
+ :rtype: dict
53
+ """
54
+ _map = super().to_dict()
55
+ if _map is not None:
56
+ return _map
57
+ result = dict()
58
+ if self.name is not None:
59
+ result['name'] = self.name
60
+ if self.workload_access_token is not None:
61
+ result['workloadAccessToken'] = self.workload_access_token
62
+ return result
63
+
64
+ def from_dict(self, m):
65
+ """
66
+ Populate the request entity from a dictionary.
67
+
68
+ Nested dictionaries are recursively converted to model objects.
69
+
70
+ :param m: Dictionary containing request data
71
+ :type m: dict
72
+
73
+ :return: Self reference for method chaining
74
+ :rtype: GetResourceApikeyRequest
75
+
76
+ :raises TypeError: If input is not a dictionary or field type mismatch
77
+ :raises ValueError: If nested model conversion fails
78
+ """
79
+ m = m or dict()
80
+ if m.get('xBceWorkloadAccessToken') is not None:
81
+ self.x_bce_workload_access_token = m.get('xBceWorkloadAccessToken')
82
+ if m.get('name') is not None:
83
+ self.name = m.get('name')
84
+ if m.get('workloadAccessToken') is not None:
85
+ self.workload_access_token = m.get('workloadAccessToken')
86
+ return self
@@ -0,0 +1,136 @@
1
+ """
2
+ Request entity for GetResourceOauth2tokenRequest 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 GetResourceOauth2tokenRequest(AbstractModel):
10
+ """
11
+ Request entity for GetResourceOauth2tokenRequest operation.
12
+
13
+ This class encapsulates all parameters for the API request.
14
+ """
15
+
16
+ def __init__(
17
+ self,
18
+ x_bce_workload_access_token,
19
+ workload_access_token,
20
+ resource_credential_provider_name=None,
21
+ scopes=None,
22
+ oauth2_flow=None,
23
+ resource_oauth2_return_url=None,
24
+ session_uri=None,
25
+ force_authentication=None,
26
+ ):
27
+ """
28
+ Initialize GetResourceOauth2tokenRequest request entity.
29
+
30
+ :param x_bce_workload_access_token: x_bce_workload_access_token parameter
31
+ :type x_bce_workload_access_token: str (required)
32
+
33
+ :param resource_credential_provider_name: (首次调用必填)凭证提供方名称
34
+ :type resource_credential_provider_name: str (optional)
35
+
36
+ :param scopes: OAuth2 scope 列表,不传则使用 provider 默认值
37
+ :type scopes: List[str] (optional)
38
+
39
+ :param oauth2_flow: 默认 USER_FEDERATION(3LO)
40
+ :type oauth2_flow: str (optional)
41
+
42
+ :param resource_oauth2_return_url: (首次调用必填)客户端回调 URL,需在 Agent 白名单中注册
43
+ :type resource_oauth2_return_url: str (optional)
44
+
45
+ :param session_uri: (轮询时必填)首次请求返回的 sessionUri
46
+ :type session_uri: str (optional)
47
+
48
+ :param force_authentication: 默认 false,true 时跳过缓存强制重新授权
49
+ :type force_authentication: bool (optional)
50
+
51
+ :param workload_access_token: WAT(Body 传递,也可通过 Header 传递)
52
+ :type workload_access_token: str (required)
53
+ """
54
+ super().__init__()
55
+ self._x_bce_workload_access_token = x_bce_workload_access_token
56
+ self.resource_credential_provider_name = resource_credential_provider_name
57
+ self.scopes = scopes
58
+ self.oauth2_flow = oauth2_flow
59
+ self.resource_oauth2_return_url = resource_oauth2_return_url
60
+ self.session_uri = session_uri
61
+ self.force_authentication = force_authentication
62
+ self.workload_access_token = workload_access_token
63
+
64
+ @property
65
+ @host
66
+ def x_bce_workload_access_token(self):
67
+ """x_bce_workload_access_token property"""
68
+ return self._x_bce_workload_access_token
69
+
70
+ @x_bce_workload_access_token.setter
71
+ def x_bce_workload_access_token(self, value):
72
+ """Set x_bce_workload_access_token value"""
73
+ self._x_bce_workload_access_token = value
74
+
75
+ def to_dict(self):
76
+ """
77
+ Convert the request entity to a dictionary representation.
78
+
79
+ Nested model objects are recursively converted to dictionaries.
80
+
81
+ :return: Dictionary representation of the request
82
+ :rtype: dict
83
+ """
84
+ _map = super().to_dict()
85
+ if _map is not None:
86
+ return _map
87
+ result = dict()
88
+ if self.resource_credential_provider_name is not None:
89
+ result['resourceCredentialProviderName'] = self.resource_credential_provider_name
90
+ if self.scopes is not None:
91
+ result['scopes'] = self.scopes
92
+ if self.oauth2_flow is not None:
93
+ result['oauth2Flow'] = self.oauth2_flow
94
+ if self.resource_oauth2_return_url is not None:
95
+ result['resourceOauth2ReturnUrl'] = self.resource_oauth2_return_url
96
+ if self.session_uri is not None:
97
+ result['sessionUri'] = self.session_uri
98
+ if self.force_authentication is not None:
99
+ result['forceAuthentication'] = self.force_authentication
100
+ if self.workload_access_token is not None:
101
+ result['workloadAccessToken'] = self.workload_access_token
102
+ return result
103
+
104
+ def from_dict(self, m):
105
+ """
106
+ Populate the request entity from a dictionary.
107
+
108
+ Nested dictionaries are recursively converted to model objects.
109
+
110
+ :param m: Dictionary containing request data
111
+ :type m: dict
112
+
113
+ :return: Self reference for method chaining
114
+ :rtype: GetResourceOauth2tokenRequest
115
+
116
+ :raises TypeError: If input is not a dictionary or field type mismatch
117
+ :raises ValueError: If nested model conversion fails
118
+ """
119
+ m = m or dict()
120
+ if m.get('xBceWorkloadAccessToken') is not None:
121
+ self.x_bce_workload_access_token = m.get('xBceWorkloadAccessToken')
122
+ if m.get('resourceCredentialProviderName') is not None:
123
+ self.resource_credential_provider_name = m.get('resourceCredentialProviderName')
124
+ if m.get('scopes') is not None:
125
+ self.scopes = m.get('scopes')
126
+ if m.get('oauth2Flow') is not None:
127
+ self.oauth2_flow = m.get('oauth2Flow')
128
+ if m.get('resourceOauth2ReturnUrl') is not None:
129
+ self.resource_oauth2_return_url = m.get('resourceOauth2ReturnUrl')
130
+ if m.get('sessionUri') is not None:
131
+ self.session_uri = m.get('sessionUri')
132
+ if m.get('forceAuthentication') is not None:
133
+ self.force_authentication = m.get('forceAuthentication')
134
+ if m.get('workloadAccessToken') is not None:
135
+ self.workload_access_token = m.get('workloadAccessToken')
136
+ return self