baiducloud-python-sdk-iam 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 (88) hide show
  1. baiducloud_python_sdk_iam/__init__.py +5 -0
  2. baiducloud_python_sdk_iam/api/__init__.py +0 -0
  3. baiducloud_python_sdk_iam/api/iam_client.py +1507 -0
  4. baiducloud_python_sdk_iam/models/__init__.py +83 -0
  5. baiducloud_python_sdk_iam/models/access_key.py +82 -0
  6. baiducloud_python_sdk_iam/models/account_count_info.py +74 -0
  7. baiducloud_python_sdk_iam/models/account_limit_info.py +142 -0
  8. baiducloud_python_sdk_iam/models/add_user_to_group_request.py +64 -0
  9. baiducloud_python_sdk_iam/models/associate_group_permissions_request.py +70 -0
  10. baiducloud_python_sdk_iam/models/associate_role_permissions_request.py +70 -0
  11. baiducloud_python_sdk_iam/models/associate_user_permissions_request.py +70 -0
  12. baiducloud_python_sdk_iam/models/attached_entities.py +82 -0
  13. baiducloud_python_sdk_iam/models/change_sub_user_password_request.py +66 -0
  14. baiducloud_python_sdk_iam/models/create_access_key_request.py +58 -0
  15. baiducloud_python_sdk_iam/models/create_apikey_permanently_valid_request.py +76 -0
  16. baiducloud_python_sdk_iam/models/create_group_request.py +68 -0
  17. baiducloud_python_sdk_iam/models/create_role_request.py +76 -0
  18. baiducloud_python_sdk_iam/models/create_strategy_request.py +76 -0
  19. baiducloud_python_sdk_iam/models/create_user_request.py +68 -0
  20. baiducloud_python_sdk_iam/models/decoding_apikey_permanently_valid_request.py +68 -0
  21. baiducloud_python_sdk_iam/models/delete_access_key_request.py +64 -0
  22. baiducloud_python_sdk_iam/models/delete_apikey_permanently_valid_request.py +68 -0
  23. baiducloud_python_sdk_iam/models/delete_group_request.py +58 -0
  24. baiducloud_python_sdk_iam/models/delete_login_profile_request.py +58 -0
  25. baiducloud_python_sdk_iam/models/delete_role_request.py +58 -0
  26. baiducloud_python_sdk_iam/models/delete_strategy_request.py +58 -0
  27. baiducloud_python_sdk_iam/models/delete_user_request.py +58 -0
  28. baiducloud_python_sdk_iam/models/disable_access_key_request.py +64 -0
  29. baiducloud_python_sdk_iam/models/enable_access_key_request.py +64 -0
  30. baiducloud_python_sdk_iam/models/get_login_profile_request.py +58 -0
  31. baiducloud_python_sdk_iam/models/get_session_api_key_request.py +64 -0
  32. baiducloud_python_sdk_iam/models/get_user_request.py +58 -0
  33. baiducloud_python_sdk_iam/models/group_model.py +82 -0
  34. baiducloud_python_sdk_iam/models/idp.py +90 -0
  35. baiducloud_python_sdk_iam/models/list_access_key_request.py +58 -0
  36. baiducloud_python_sdk_iam/models/list_access_key_response.py +62 -0
  37. baiducloud_python_sdk_iam/models/list_all_subjects_granted_permissions_request.py +58 -0
  38. baiducloud_python_sdk_iam/models/list_all_subjects_granted_permissions_response.py +94 -0
  39. baiducloud_python_sdk_iam/models/list_groups_response.py +62 -0
  40. baiducloud_python_sdk_iam/models/list_roles_response.py +62 -0
  41. baiducloud_python_sdk_iam/models/list_strategies_request.py +64 -0
  42. baiducloud_python_sdk_iam/models/list_strategies_response.py +64 -0
  43. baiducloud_python_sdk_iam/models/list_the_permissions_of_roles_request.py +58 -0
  44. baiducloud_python_sdk_iam/models/list_the_permissions_of_roles_response.py +64 -0
  45. baiducloud_python_sdk_iam/models/list_the_permissions_of_the_group_request.py +58 -0
  46. baiducloud_python_sdk_iam/models/list_the_permissions_of_the_group_response.py +62 -0
  47. baiducloud_python_sdk_iam/models/list_the_subjects_granted_permissions_request.py +64 -0
  48. baiducloud_python_sdk_iam/models/list_the_subjects_granted_permissions_response.py +94 -0
  49. baiducloud_python_sdk_iam/models/list_the_user_s_permissions_request.py +58 -0
  50. baiducloud_python_sdk_iam/models/list_the_user_s_permissions_response.py +64 -0
  51. baiducloud_python_sdk_iam/models/list_user_groups_request.py +58 -0
  52. baiducloud_python_sdk_iam/models/list_user_groups_response.py +64 -0
  53. baiducloud_python_sdk_iam/models/list_user_response.py +64 -0
  54. baiducloud_python_sdk_iam/models/list_users_within_the_group_request.py +58 -0
  55. baiducloud_python_sdk_iam/models/list_users_within_the_group_response.py +62 -0
  56. baiducloud_python_sdk_iam/models/modify_sub_user_operation_protection_request.py +76 -0
  57. baiducloud_python_sdk_iam/models/obtain_a_list_of_permanently_valid_apikeys_request.py +84 -0
  58. baiducloud_python_sdk_iam/models/policy_model.py +108 -0
  59. baiducloud_python_sdk_iam/models/query_apikey_details_permanently_valid_request.py +68 -0
  60. baiducloud_python_sdk_iam/models/query_group_request.py +58 -0
  61. baiducloud_python_sdk_iam/models/query_role_request.py +58 -0
  62. baiducloud_python_sdk_iam/models/query_strategy_request.py +64 -0
  63. baiducloud_python_sdk_iam/models/query_sub_user_idp_response.py +64 -0
  64. baiducloud_python_sdk_iam/models/query_summary_of_main_account_response.py +79 -0
  65. baiducloud_python_sdk_iam/models/query_the_last_usage_time_of_accesskey_request.py +58 -0
  66. baiducloud_python_sdk_iam/models/query_the_last_usage_time_of_accesskey_response.py +69 -0
  67. baiducloud_python_sdk_iam/models/remove_group_permissions_request.py +70 -0
  68. baiducloud_python_sdk_iam/models/remove_role_permissions_request.py +70 -0
  69. baiducloud_python_sdk_iam/models/remove_user_from_the_group_request.py +64 -0
  70. baiducloud_python_sdk_iam/models/remove_user_permissions_request.py +70 -0
  71. baiducloud_python_sdk_iam/models/role_model.py +90 -0
  72. baiducloud_python_sdk_iam/models/unbind_sub_user_virtual_mfa_request.py +64 -0
  73. baiducloud_python_sdk_iam/models/update_apikey_permanently_valid_request.py +76 -0
  74. baiducloud_python_sdk_iam/models/update_group_request.py +74 -0
  75. baiducloud_python_sdk_iam/models/update_login_profile_request.py +124 -0
  76. baiducloud_python_sdk_iam/models/update_role_request.py +82 -0
  77. baiducloud_python_sdk_iam/models/update_strategy_request.py +82 -0
  78. baiducloud_python_sdk_iam/models/update_sub_user_idp_request.py +76 -0
  79. baiducloud_python_sdk_iam/models/update_sub_user_idp_response.py +64 -0
  80. baiducloud_python_sdk_iam/models/update_sub_user_idp_status_request.py +58 -0
  81. baiducloud_python_sdk_iam/models/update_sub_user_idp_status_response.py +62 -0
  82. baiducloud_python_sdk_iam/models/update_user_request.py +82 -0
  83. baiducloud_python_sdk_iam/models/user_model.py +115 -0
  84. baiducloud_python_sdk_iam-0.0.1.dist-info/LICENSE +177 -0
  85. baiducloud_python_sdk_iam-0.0.1.dist-info/METADATA +76 -0
  86. baiducloud_python_sdk_iam-0.0.1.dist-info/RECORD +88 -0
  87. baiducloud_python_sdk_iam-0.0.1.dist-info/WHEEL +5 -0
  88. baiducloud_python_sdk_iam-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for QueryRoleRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class QueryRoleRequest(AbstractModel):
9
+ """
10
+ Request entity for QueryRoleRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, role_name):
16
+ """
17
+ Initialize QueryRoleRequest request entity.
18
+
19
+ :param role_name: role_name parameter
20
+ :type role_name: str (required)
21
+ """
22
+ super().__init__()
23
+ self.role_name = role_name
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: QueryRoleRequest
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('roleName') is not None:
57
+ self.role_name = m.get('roleName')
58
+ return self
@@ -0,0 +1,64 @@
1
+ """
2
+ Request entity for QueryStrategyRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class QueryStrategyRequest(AbstractModel):
9
+ """
10
+ Request entity for QueryStrategyRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, policy_name, policy_type=None):
16
+ """
17
+ Initialize QueryStrategyRequest request entity.
18
+
19
+ :param policy_name: policy_name parameter
20
+ :type policy_name: str (required)
21
+
22
+ :param policy_type: policy_type parameter
23
+ :type policy_type: str (optional)
24
+ """
25
+ super().__init__()
26
+ self.policy_name = policy_name
27
+ self.policy_type = policy_type
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
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the request entity from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing request data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: QueryStrategyRequest
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('policyName') is not None:
61
+ self.policy_name = m.get('policyName')
62
+ if m.get('policyType') is not None:
63
+ self.policy_type = m.get('policyType')
64
+ return self
@@ -0,0 +1,64 @@
1
+ """
2
+ QuerySubUserIdpResponse information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+ from baiducloud_python_sdk_iam.models.idp import Idp
8
+
9
+
10
+ class QuerySubUserIdpResponse(BceResponse):
11
+ """
12
+ QuerySubUserIdpResponse
13
+ """
14
+
15
+ def __init__(self, idp=None):
16
+ """
17
+ Initialize QuerySubUserIdpResponse instance.
18
+
19
+ :param idp: idp attribute
20
+ :type idp: Idp (optional)
21
+ """
22
+ super().__init__()
23
+ self.idp = idp
24
+
25
+ def to_dict(self):
26
+ """
27
+ Convert the model instance to a dictionary representation.
28
+
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ Includes metadata from the parent BceResponse class.
32
+
33
+ :return: Dictionary representation of the model
34
+ :rtype: dict
35
+ """
36
+ _map = super().to_dict()
37
+ if _map is not None:
38
+ return _map
39
+ result = dict()
40
+ if self.metadata is not None:
41
+ result['metadata'] = dict(self.metadata)
42
+ if self.idp is not None:
43
+ result['idp'] = self.idp.to_dict()
44
+ return result
45
+
46
+ def from_dict(self, m):
47
+ """
48
+ Populate the model instance from a dictionary.
49
+
50
+ Nested dictionaries are recursively converted to model objects.
51
+
52
+ :param m: Dictionary containing model data
53
+ :type m: dict
54
+
55
+ :return: Self reference for method chaining
56
+ :rtype: QuerySubUserIdpResponse
57
+
58
+ :raises TypeError: If input is not a dictionary type
59
+ :raises ValueError: If nested model conversion fails
60
+ """
61
+ m = m or dict()
62
+ if m.get('idp') is not None:
63
+ self.idp = Idp().from_dict(m.get('idp'))
64
+ return self
@@ -0,0 +1,79 @@
1
+ """
2
+ Request entity for QuerySummaryOfMainAccountResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_iam.models.account_limit_info import AccountLimitInfo
7
+ from baiducloud_python_sdk_iam.models.account_count_info import AccountCountInfo
8
+
9
+
10
+ class QuerySummaryOfMainAccountResponse(BceResponse):
11
+ """
12
+ QuerySummaryOfMainAccountResponse
13
+ """
14
+
15
+ def __init__(self, account_id=None, limit_info=None, count_info=None):
16
+ """
17
+ Initialize QuerySummaryOfMainAccountResponse response.
18
+
19
+ :param account_id: 主账号id
20
+ :type account_id: str (optional)
21
+
22
+ :param limit_info: limit_info field
23
+ :type limit_info: AccountLimitInfo (optional)
24
+
25
+ :param count_info: count_info field
26
+ :type count_info: AccountCountInfo (optional)
27
+ """
28
+ super().__init__()
29
+ self.account_id = account_id
30
+ self.limit_info = limit_info
31
+ self.count_info = count_info
32
+
33
+ def to_dict(self):
34
+ """
35
+ Convert the response instance to a dictionary representation.
36
+
37
+ Includes metadata from the parent BceResponse class.
38
+ Nested model objects are recursively converted to dictionaries.
39
+
40
+ :return: Dictionary representation of the response
41
+ :rtype: dict
42
+ """
43
+ _map = super().to_dict()
44
+ if _map is not None:
45
+ return _map
46
+ result = dict()
47
+ if self.metadata is not None:
48
+ result['metadata'] = dict(self.metadata)
49
+ if self.account_id is not None:
50
+ result['accountId'] = self.account_id
51
+ if self.limit_info is not None:
52
+ result['limitInfo'] = self.limit_info.to_dict()
53
+ if self.count_info is not None:
54
+ result['countInfo'] = self.count_info.to_dict()
55
+ return result
56
+
57
+ def from_dict(self, m):
58
+ """
59
+ Populate the response instance from a dictionary.
60
+
61
+ Nested dictionaries are recursively converted to model objects.
62
+
63
+ :param m: Dictionary containing response data
64
+ :type m: dict
65
+
66
+ :return: Self reference for method chaining
67
+ :rtype: QuerySummaryOfMainAccountResponse
68
+
69
+ :raises TypeError: If input is not a dictionary or field type mismatch
70
+ :raises ValueError: If nested model conversion fails
71
+ """
72
+ m = m or dict()
73
+ if m.get('accountId') is not None:
74
+ self.account_id = m.get('accountId')
75
+ if m.get('limitInfo') is not None:
76
+ self.limit_info = AccountLimitInfo().from_dict(m.get('limitInfo'))
77
+ if m.get('countInfo') is not None:
78
+ self.count_info = AccountCountInfo().from_dict(m.get('countInfo'))
79
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for QueryTheLastUsageTimeOfAccesskeyRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class QueryTheLastUsageTimeOfAccesskeyRequest(AbstractModel):
9
+ """
10
+ Request entity for QueryTheLastUsageTimeOfAccesskeyRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, access_key_id):
16
+ """
17
+ Initialize QueryTheLastUsageTimeOfAccesskeyRequest request entity.
18
+
19
+ :param access_key_id: access_key_id parameter
20
+ :type access_key_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.access_key_id = access_key_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: QueryTheLastUsageTimeOfAccesskeyRequest
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('accessKeyId') is not None:
57
+ self.access_key_id = m.get('accessKeyId')
58
+ return self
@@ -0,0 +1,69 @@
1
+ """
2
+ Request entity for QueryTheLastUsageTimeOfAccesskeyResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class QueryTheLastUsageTimeOfAccesskeyResponse(BceResponse):
9
+ """
10
+ QueryTheLastUsageTimeOfAccesskeyResponse
11
+ """
12
+
13
+ def __init__(self, access_key_id=None, last_used_time=None):
14
+ """
15
+ Initialize QueryTheLastUsageTimeOfAccesskeyResponse response.
16
+
17
+ :param access_key_id: 访问密钥id
18
+ :type access_key_id: str (optional)
19
+
20
+ :param last_used_time: 访问密钥id的上次使用时间
21
+ :type last_used_time: str (optional)
22
+ """
23
+ super().__init__()
24
+ self.access_key_id = access_key_id
25
+ self.last_used_time = last_used_time
26
+
27
+ def to_dict(self):
28
+ """
29
+ Convert the response instance to a dictionary representation.
30
+
31
+ Includes metadata from the parent BceResponse class.
32
+ Nested model objects are recursively converted to dictionaries.
33
+
34
+ :return: Dictionary representation of the response
35
+ :rtype: dict
36
+ """
37
+ _map = super().to_dict()
38
+ if _map is not None:
39
+ return _map
40
+ result = dict()
41
+ if self.metadata is not None:
42
+ result['metadata'] = dict(self.metadata)
43
+ if self.access_key_id is not None:
44
+ result['accessKeyId'] = self.access_key_id
45
+ if self.last_used_time is not None:
46
+ result['lastUsedTime'] = self.last_used_time
47
+ return result
48
+
49
+ def from_dict(self, m):
50
+ """
51
+ Populate the response instance from a dictionary.
52
+
53
+ Nested dictionaries are recursively converted to model objects.
54
+
55
+ :param m: Dictionary containing response data
56
+ :type m: dict
57
+
58
+ :return: Self reference for method chaining
59
+ :rtype: QueryTheLastUsageTimeOfAccesskeyResponse
60
+
61
+ :raises TypeError: If input is not a dictionary or field type mismatch
62
+ :raises ValueError: If nested model conversion fails
63
+ """
64
+ m = m or dict()
65
+ if m.get('accessKeyId') is not None:
66
+ self.access_key_id = m.get('accessKeyId')
67
+ if m.get('lastUsedTime') is not None:
68
+ self.last_used_time = m.get('lastUsedTime')
69
+ return self
@@ -0,0 +1,70 @@
1
+ """
2
+ Request entity for RemoveGroupPermissionsRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class RemoveGroupPermissionsRequest(AbstractModel):
9
+ """
10
+ Request entity for RemoveGroupPermissionsRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, group_name, policy_name, policy_type=None):
16
+ """
17
+ Initialize RemoveGroupPermissionsRequest request entity.
18
+
19
+ :param group_name: group_name parameter
20
+ :type group_name: str (required)
21
+
22
+ :param policy_name: policy_name parameter
23
+ :type policy_name: str (required)
24
+
25
+ :param policy_type: policy_type parameter
26
+ :type policy_type: str (optional)
27
+ """
28
+ super().__init__()
29
+ self.group_name = group_name
30
+ self.policy_name = policy_name
31
+ self.policy_type = policy_type
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: RemoveGroupPermissionsRequest
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('groupName') is not None:
65
+ self.group_name = m.get('groupName')
66
+ if m.get('policyName') is not None:
67
+ self.policy_name = m.get('policyName')
68
+ if m.get('policyType') is not None:
69
+ self.policy_type = m.get('policyType')
70
+ return self
@@ -0,0 +1,70 @@
1
+ """
2
+ Request entity for RemoveRolePermissionsRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class RemoveRolePermissionsRequest(AbstractModel):
9
+ """
10
+ Request entity for RemoveRolePermissionsRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, role_name, policy_name, policy_type=None):
16
+ """
17
+ Initialize RemoveRolePermissionsRequest request entity.
18
+
19
+ :param role_name: role_name parameter
20
+ :type role_name: str (required)
21
+
22
+ :param policy_name: policy_name parameter
23
+ :type policy_name: str (required)
24
+
25
+ :param policy_type: policy_type parameter
26
+ :type policy_type: str (optional)
27
+ """
28
+ super().__init__()
29
+ self.role_name = role_name
30
+ self.policy_name = policy_name
31
+ self.policy_type = policy_type
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: RemoveRolePermissionsRequest
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('roleName') is not None:
65
+ self.role_name = m.get('roleName')
66
+ if m.get('policyName') is not None:
67
+ self.policy_name = m.get('policyName')
68
+ if m.get('policyType') is not None:
69
+ self.policy_type = m.get('policyType')
70
+ return self
@@ -0,0 +1,64 @@
1
+ """
2
+ Request entity for RemoveUserFromTheGroupRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class RemoveUserFromTheGroupRequest(AbstractModel):
9
+ """
10
+ Request entity for RemoveUserFromTheGroupRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, user_name, group_name):
16
+ """
17
+ Initialize RemoveUserFromTheGroupRequest request entity.
18
+
19
+ :param user_name: user_name parameter
20
+ :type user_name: str (required)
21
+
22
+ :param group_name: group_name parameter
23
+ :type group_name: str (required)
24
+ """
25
+ super().__init__()
26
+ self.user_name = user_name
27
+ self.group_name = group_name
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
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the request entity from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing request data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: RemoveUserFromTheGroupRequest
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('userName') is not None:
61
+ self.user_name = m.get('userName')
62
+ if m.get('groupName') is not None:
63
+ self.group_name = m.get('groupName')
64
+ return self
@@ -0,0 +1,70 @@
1
+ """
2
+ Request entity for RemoveUserPermissionsRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class RemoveUserPermissionsRequest(AbstractModel):
9
+ """
10
+ Request entity for RemoveUserPermissionsRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, user_name, policy_name, policy_type=None):
16
+ """
17
+ Initialize RemoveUserPermissionsRequest request entity.
18
+
19
+ :param user_name: user_name parameter
20
+ :type user_name: str (required)
21
+
22
+ :param policy_name: policy_name parameter
23
+ :type policy_name: str (required)
24
+
25
+ :param policy_type: policy_type parameter
26
+ :type policy_type: str (optional)
27
+ """
28
+ super().__init__()
29
+ self.user_name = user_name
30
+ self.policy_name = policy_name
31
+ self.policy_type = policy_type
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: RemoveUserPermissionsRequest
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('userName') is not None:
65
+ self.user_name = m.get('userName')
66
+ if m.get('policyName') is not None:
67
+ self.policy_name = m.get('policyName')
68
+ if m.get('policyType') is not None:
69
+ self.policy_type = m.get('policyType')
70
+ return self