huaweicloudsdkgaussdbforopengauss 3.1.127__py2.py3-none-any.whl → 3.1.129__py2.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.
- huaweicloudsdkgaussdbforopengauss/v3/__init__.py +52 -0
- huaweicloudsdkgaussdbforopengauss/v3/gaussdbforopengauss_async_client.py +1315 -46
- huaweicloudsdkgaussdbforopengauss/v3/gaussdbforopengauss_client.py +1315 -46
- huaweicloudsdkgaussdbforopengauss/v3/model/__init__.py +52 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/allow_db_role_privileges_request.py +168 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/allow_db_role_privileges_request_body.py +138 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/allow_db_role_privileges_response.py +85 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/batch_show_upgrade_candidate_versions_request.py +140 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/batch_show_upgrade_candidate_versions_response.py +232 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/can_be_rollbacked_hotfix_detail.py +202 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/can_be_upgraded_hotfix_detail.py +202 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/configurations_result.py +339 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_database_instance_request.py +140 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_database_instance_request_body.py +722 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_database_instance_response.py +170 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_database_instance_result.py +544 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_db_role_request.py +168 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_db_role_request_body.py +142 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_db_role_response.py +85 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/create_instance_datastore_option.py +143 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/datastore_result.py +142 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/delete_database_schema_request.py +168 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/delete_database_schema_request_body.py +142 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/delete_database_schema_response.py +85 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/gauss_d_bfor_open_gauss_role_attributes.py +199 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/gauss_db_list_database_roles.py +197 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/gauss_db_list_database_roles_priv.py +347 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/hotfix_info_result.py +202 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_backups_details_request.py +318 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_backups_details_response.py +145 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_backups_result.py +372 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_database_instances_request.py +405 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_database_instances_response.py +145 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_database_roles_request.py +201 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_database_roles_response.py +145 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_datastores_details_request.py +115 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_datastores_details_response.py +112 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_flavors_details_request.py +260 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_flavors_details_response.py +145 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_parameter_group_templates_request.py +173 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_parameter_group_templates_response.py +145 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_recycle_instances_details_request.py +202 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_recycle_instances_details_response.py +145 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_restorable_instances_details_request.py +259 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/list_restorable_instances_details_response.py +145 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/recycle_instances_detail_result_v1.py +566 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_instance_param_group_detail_request.py +143 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_instance_param_group_detail_response.py +232 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_parameter_group_detail_request.py +143 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_parameter_group_detail_response.py +319 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_source_instance_detail_request.py +202 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_source_instance_detail_response.py +348 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_upgrade_candidate_versions_details_request.py +143 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_upgrade_candidate_versions_details_response.py +373 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/show_upgrade_candidate_versions_response.py +18 -10
- huaweicloudsdkgaussdbforopengauss/v3/model/sync_limit_data_request.py +114 -0
- huaweicloudsdkgaussdbforopengauss/v3/model/sync_limit_data_response.py +203 -0
- {huaweicloudsdkgaussdbforopengauss-3.1.127.dist-info → huaweicloudsdkgaussdbforopengauss-3.1.129.dist-info}/METADATA +2 -2
- {huaweicloudsdkgaussdbforopengauss-3.1.127.dist-info → huaweicloudsdkgaussdbforopengauss-3.1.129.dist-info}/RECORD +62 -10
- {huaweicloudsdkgaussdbforopengauss-3.1.127.dist-info → huaweicloudsdkgaussdbforopengauss-3.1.129.dist-info}/LICENSE +0 -0
- {huaweicloudsdkgaussdbforopengauss-3.1.127.dist-info → huaweicloudsdkgaussdbforopengauss-3.1.129.dist-info}/WHEEL +0 -0
- {huaweicloudsdkgaussdbforopengauss-3.1.127.dist-info → huaweicloudsdkgaussdbforopengauss-3.1.129.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,142 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class DeleteDatabaseSchemaRequestBody:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'db_name': 'str',
|
21
|
+
'schema': 'str'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'db_name': 'db_name',
|
26
|
+
'schema': 'schema'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, db_name=None, schema=None):
|
30
|
+
"""DeleteDatabaseSchemaRequestBody
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param db_name: 数据库名称。 使用已存在的数据库名称,且不能为模板库。 模板库包括postgres, template0 ,template1,templatea,template_pdb,templatem。
|
35
|
+
:type db_name: str
|
36
|
+
:param schema: SCHEMA名称。 SCHEMA名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,且不能和模板库和已存在的SCHEMA重名。 模板库包括postgres, template0 ,template1,templatea,template_pdb,templatem。 已存在的SCHEMA包括public,information_schema。
|
37
|
+
:type schema: str
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._db_name = None
|
43
|
+
self._schema = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
self.db_name = db_name
|
47
|
+
self.schema = schema
|
48
|
+
|
49
|
+
@property
|
50
|
+
def db_name(self):
|
51
|
+
"""Gets the db_name of this DeleteDatabaseSchemaRequestBody.
|
52
|
+
|
53
|
+
数据库名称。 使用已存在的数据库名称,且不能为模板库。 模板库包括postgres, template0 ,template1,templatea,template_pdb,templatem。
|
54
|
+
|
55
|
+
:return: The db_name of this DeleteDatabaseSchemaRequestBody.
|
56
|
+
:rtype: str
|
57
|
+
"""
|
58
|
+
return self._db_name
|
59
|
+
|
60
|
+
@db_name.setter
|
61
|
+
def db_name(self, db_name):
|
62
|
+
"""Sets the db_name of this DeleteDatabaseSchemaRequestBody.
|
63
|
+
|
64
|
+
数据库名称。 使用已存在的数据库名称,且不能为模板库。 模板库包括postgres, template0 ,template1,templatea,template_pdb,templatem。
|
65
|
+
|
66
|
+
:param db_name: The db_name of this DeleteDatabaseSchemaRequestBody.
|
67
|
+
:type db_name: str
|
68
|
+
"""
|
69
|
+
self._db_name = db_name
|
70
|
+
|
71
|
+
@property
|
72
|
+
def schema(self):
|
73
|
+
"""Gets the schema of this DeleteDatabaseSchemaRequestBody.
|
74
|
+
|
75
|
+
SCHEMA名称。 SCHEMA名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,且不能和模板库和已存在的SCHEMA重名。 模板库包括postgres, template0 ,template1,templatea,template_pdb,templatem。 已存在的SCHEMA包括public,information_schema。
|
76
|
+
|
77
|
+
:return: The schema of this DeleteDatabaseSchemaRequestBody.
|
78
|
+
:rtype: str
|
79
|
+
"""
|
80
|
+
return self._schema
|
81
|
+
|
82
|
+
@schema.setter
|
83
|
+
def schema(self, schema):
|
84
|
+
"""Sets the schema of this DeleteDatabaseSchemaRequestBody.
|
85
|
+
|
86
|
+
SCHEMA名称。 SCHEMA名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,且不能和模板库和已存在的SCHEMA重名。 模板库包括postgres, template0 ,template1,templatea,template_pdb,templatem。 已存在的SCHEMA包括public,information_schema。
|
87
|
+
|
88
|
+
:param schema: The schema of this DeleteDatabaseSchemaRequestBody.
|
89
|
+
:type schema: str
|
90
|
+
"""
|
91
|
+
self._schema = schema
|
92
|
+
|
93
|
+
def to_dict(self):
|
94
|
+
"""Returns the model properties as a dict"""
|
95
|
+
result = {}
|
96
|
+
|
97
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
98
|
+
value = getattr(self, attr)
|
99
|
+
if isinstance(value, list):
|
100
|
+
result[attr] = list(map(
|
101
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
102
|
+
value
|
103
|
+
))
|
104
|
+
elif hasattr(value, "to_dict"):
|
105
|
+
result[attr] = value.to_dict()
|
106
|
+
elif isinstance(value, dict):
|
107
|
+
result[attr] = dict(map(
|
108
|
+
lambda item: (item[0], item[1].to_dict())
|
109
|
+
if hasattr(item[1], "to_dict") else item,
|
110
|
+
value.items()
|
111
|
+
))
|
112
|
+
else:
|
113
|
+
if attr in self.sensitive_list:
|
114
|
+
result[attr] = "****"
|
115
|
+
else:
|
116
|
+
result[attr] = value
|
117
|
+
|
118
|
+
return result
|
119
|
+
|
120
|
+
def to_str(self):
|
121
|
+
"""Returns the string representation of the model"""
|
122
|
+
import simplejson as json
|
123
|
+
if six.PY2:
|
124
|
+
import sys
|
125
|
+
reload(sys)
|
126
|
+
sys.setdefaultencoding("utf-8")
|
127
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
128
|
+
|
129
|
+
def __repr__(self):
|
130
|
+
"""For `print`"""
|
131
|
+
return self.to_str()
|
132
|
+
|
133
|
+
def __eq__(self, other):
|
134
|
+
"""Returns true if both objects are equal"""
|
135
|
+
if not isinstance(other, DeleteDatabaseSchemaRequestBody):
|
136
|
+
return False
|
137
|
+
|
138
|
+
return self.__dict__ == other.__dict__
|
139
|
+
|
140
|
+
def __ne__(self, other):
|
141
|
+
"""Returns true if both objects are not equal"""
|
142
|
+
return not self == other
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
6
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
7
|
+
|
8
|
+
|
9
|
+
class DeleteDatabaseSchemaResponse(SdkResponse):
|
10
|
+
|
11
|
+
"""
|
12
|
+
Attributes:
|
13
|
+
openapi_types (dict): The key is attribute name
|
14
|
+
and the value is attribute type.
|
15
|
+
attribute_map (dict): The key is attribute name
|
16
|
+
and the value is json key in definition.
|
17
|
+
"""
|
18
|
+
sensitive_list = []
|
19
|
+
|
20
|
+
openapi_types = {
|
21
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
}
|
25
|
+
|
26
|
+
def __init__(self):
|
27
|
+
"""DeleteDatabaseSchemaResponse
|
28
|
+
|
29
|
+
The model defined in huaweicloud sdk
|
30
|
+
|
31
|
+
"""
|
32
|
+
|
33
|
+
super(DeleteDatabaseSchemaResponse, self).__init__()
|
34
|
+
self.discriminator = None
|
35
|
+
|
36
|
+
def to_dict(self):
|
37
|
+
"""Returns the model properties as a dict"""
|
38
|
+
result = {}
|
39
|
+
|
40
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
41
|
+
value = getattr(self, attr)
|
42
|
+
if isinstance(value, list):
|
43
|
+
result[attr] = list(map(
|
44
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
45
|
+
value
|
46
|
+
))
|
47
|
+
elif hasattr(value, "to_dict"):
|
48
|
+
result[attr] = value.to_dict()
|
49
|
+
elif isinstance(value, dict):
|
50
|
+
result[attr] = dict(map(
|
51
|
+
lambda item: (item[0], item[1].to_dict())
|
52
|
+
if hasattr(item[1], "to_dict") else item,
|
53
|
+
value.items()
|
54
|
+
))
|
55
|
+
else:
|
56
|
+
if attr in self.sensitive_list:
|
57
|
+
result[attr] = "****"
|
58
|
+
else:
|
59
|
+
result[attr] = value
|
60
|
+
|
61
|
+
return result
|
62
|
+
|
63
|
+
def to_str(self):
|
64
|
+
"""Returns the string representation of the model"""
|
65
|
+
import simplejson as json
|
66
|
+
if six.PY2:
|
67
|
+
import sys
|
68
|
+
reload(sys)
|
69
|
+
sys.setdefaultencoding("utf-8")
|
70
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
71
|
+
|
72
|
+
def __repr__(self):
|
73
|
+
"""For `print`"""
|
74
|
+
return self.to_str()
|
75
|
+
|
76
|
+
def __eq__(self, other):
|
77
|
+
"""Returns true if both objects are equal"""
|
78
|
+
if not isinstance(other, DeleteDatabaseSchemaResponse):
|
79
|
+
return False
|
80
|
+
|
81
|
+
return self.__dict__ == other.__dict__
|
82
|
+
|
83
|
+
def __ne__(self, other):
|
84
|
+
"""Returns true if both objects are not equal"""
|
85
|
+
return not self == other
|
@@ -0,0 +1,199 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class GaussDBforOpenGaussRoleAttributes:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'name': 'str',
|
21
|
+
'schema': 'str',
|
22
|
+
'readonly': 'bool',
|
23
|
+
'default_privilege_grantee': 'str'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'name': 'name',
|
28
|
+
'schema': 'schema',
|
29
|
+
'readonly': 'readonly',
|
30
|
+
'default_privilege_grantee': 'default_privilege_grantee'
|
31
|
+
}
|
32
|
+
|
33
|
+
def __init__(self, name=None, schema=None, readonly=None, default_privilege_grantee=None):
|
34
|
+
"""GaussDBforOpenGaussRoleAttributes
|
35
|
+
|
36
|
+
The model defined in huaweicloud sdk
|
37
|
+
|
38
|
+
:param name: 数据库角色名称。 不能使用系统用户或角色,且名称必须存在。 系统用户/角色包括“rdsAdmin”,“rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。
|
39
|
+
:type name: str
|
40
|
+
:param schema: SCHEMA名称。 不能和模板库以及系统内schema重名,且schema名称必须存在。 模板库包括postgres, template0 ,template1, 系统内schema包括public,information_schema。
|
41
|
+
:type schema: str
|
42
|
+
:param readonly: 数据库角色权限。 - true:只读。 - false:可读可写。
|
43
|
+
:type readonly: bool
|
44
|
+
:param default_privilege_grantee: 数据库用户/角色名称。 该字段的含义是将此用户/角色的权限授予给name字段指定的角色,通过readonly字段判断是否授予只读权限。 不能和系统用户/角色名称相同,且用户/角色名称必须存在,系统用户/角色包括“rdsAdmin”,“ rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。
|
45
|
+
:type default_privilege_grantee: str
|
46
|
+
"""
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
self._name = None
|
51
|
+
self._schema = None
|
52
|
+
self._readonly = None
|
53
|
+
self._default_privilege_grantee = None
|
54
|
+
self.discriminator = None
|
55
|
+
|
56
|
+
self.name = name
|
57
|
+
self.schema = schema
|
58
|
+
self.readonly = readonly
|
59
|
+
if default_privilege_grantee is not None:
|
60
|
+
self.default_privilege_grantee = default_privilege_grantee
|
61
|
+
|
62
|
+
@property
|
63
|
+
def name(self):
|
64
|
+
"""Gets the name of this GaussDBforOpenGaussRoleAttributes.
|
65
|
+
|
66
|
+
数据库角色名称。 不能使用系统用户或角色,且名称必须存在。 系统用户/角色包括“rdsAdmin”,“rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。
|
67
|
+
|
68
|
+
:return: The name of this GaussDBforOpenGaussRoleAttributes.
|
69
|
+
:rtype: str
|
70
|
+
"""
|
71
|
+
return self._name
|
72
|
+
|
73
|
+
@name.setter
|
74
|
+
def name(self, name):
|
75
|
+
"""Sets the name of this GaussDBforOpenGaussRoleAttributes.
|
76
|
+
|
77
|
+
数据库角色名称。 不能使用系统用户或角色,且名称必须存在。 系统用户/角色包括“rdsAdmin”,“rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。
|
78
|
+
|
79
|
+
:param name: The name of this GaussDBforOpenGaussRoleAttributes.
|
80
|
+
:type name: str
|
81
|
+
"""
|
82
|
+
self._name = name
|
83
|
+
|
84
|
+
@property
|
85
|
+
def schema(self):
|
86
|
+
"""Gets the schema of this GaussDBforOpenGaussRoleAttributes.
|
87
|
+
|
88
|
+
SCHEMA名称。 不能和模板库以及系统内schema重名,且schema名称必须存在。 模板库包括postgres, template0 ,template1, 系统内schema包括public,information_schema。
|
89
|
+
|
90
|
+
:return: The schema of this GaussDBforOpenGaussRoleAttributes.
|
91
|
+
:rtype: str
|
92
|
+
"""
|
93
|
+
return self._schema
|
94
|
+
|
95
|
+
@schema.setter
|
96
|
+
def schema(self, schema):
|
97
|
+
"""Sets the schema of this GaussDBforOpenGaussRoleAttributes.
|
98
|
+
|
99
|
+
SCHEMA名称。 不能和模板库以及系统内schema重名,且schema名称必须存在。 模板库包括postgres, template0 ,template1, 系统内schema包括public,information_schema。
|
100
|
+
|
101
|
+
:param schema: The schema of this GaussDBforOpenGaussRoleAttributes.
|
102
|
+
:type schema: str
|
103
|
+
"""
|
104
|
+
self._schema = schema
|
105
|
+
|
106
|
+
@property
|
107
|
+
def readonly(self):
|
108
|
+
"""Gets the readonly of this GaussDBforOpenGaussRoleAttributes.
|
109
|
+
|
110
|
+
数据库角色权限。 - true:只读。 - false:可读可写。
|
111
|
+
|
112
|
+
:return: The readonly of this GaussDBforOpenGaussRoleAttributes.
|
113
|
+
:rtype: bool
|
114
|
+
"""
|
115
|
+
return self._readonly
|
116
|
+
|
117
|
+
@readonly.setter
|
118
|
+
def readonly(self, readonly):
|
119
|
+
"""Sets the readonly of this GaussDBforOpenGaussRoleAttributes.
|
120
|
+
|
121
|
+
数据库角色权限。 - true:只读。 - false:可读可写。
|
122
|
+
|
123
|
+
:param readonly: The readonly of this GaussDBforOpenGaussRoleAttributes.
|
124
|
+
:type readonly: bool
|
125
|
+
"""
|
126
|
+
self._readonly = readonly
|
127
|
+
|
128
|
+
@property
|
129
|
+
def default_privilege_grantee(self):
|
130
|
+
"""Gets the default_privilege_grantee of this GaussDBforOpenGaussRoleAttributes.
|
131
|
+
|
132
|
+
数据库用户/角色名称。 该字段的含义是将此用户/角色的权限授予给name字段指定的角色,通过readonly字段判断是否授予只读权限。 不能和系统用户/角色名称相同,且用户/角色名称必须存在,系统用户/角色包括“rdsAdmin”,“ rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。
|
133
|
+
|
134
|
+
:return: The default_privilege_grantee of this GaussDBforOpenGaussRoleAttributes.
|
135
|
+
:rtype: str
|
136
|
+
"""
|
137
|
+
return self._default_privilege_grantee
|
138
|
+
|
139
|
+
@default_privilege_grantee.setter
|
140
|
+
def default_privilege_grantee(self, default_privilege_grantee):
|
141
|
+
"""Sets the default_privilege_grantee of this GaussDBforOpenGaussRoleAttributes.
|
142
|
+
|
143
|
+
数据库用户/角色名称。 该字段的含义是将此用户/角色的权限授予给name字段指定的角色,通过readonly字段判断是否授予只读权限。 不能和系统用户/角色名称相同,且用户/角色名称必须存在,系统用户/角色包括“rdsAdmin”,“ rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。
|
144
|
+
|
145
|
+
:param default_privilege_grantee: The default_privilege_grantee of this GaussDBforOpenGaussRoleAttributes.
|
146
|
+
:type default_privilege_grantee: str
|
147
|
+
"""
|
148
|
+
self._default_privilege_grantee = default_privilege_grantee
|
149
|
+
|
150
|
+
def to_dict(self):
|
151
|
+
"""Returns the model properties as a dict"""
|
152
|
+
result = {}
|
153
|
+
|
154
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
155
|
+
value = getattr(self, attr)
|
156
|
+
if isinstance(value, list):
|
157
|
+
result[attr] = list(map(
|
158
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
159
|
+
value
|
160
|
+
))
|
161
|
+
elif hasattr(value, "to_dict"):
|
162
|
+
result[attr] = value.to_dict()
|
163
|
+
elif isinstance(value, dict):
|
164
|
+
result[attr] = dict(map(
|
165
|
+
lambda item: (item[0], item[1].to_dict())
|
166
|
+
if hasattr(item[1], "to_dict") else item,
|
167
|
+
value.items()
|
168
|
+
))
|
169
|
+
else:
|
170
|
+
if attr in self.sensitive_list:
|
171
|
+
result[attr] = "****"
|
172
|
+
else:
|
173
|
+
result[attr] = value
|
174
|
+
|
175
|
+
return result
|
176
|
+
|
177
|
+
def to_str(self):
|
178
|
+
"""Returns the string representation of the model"""
|
179
|
+
import simplejson as json
|
180
|
+
if six.PY2:
|
181
|
+
import sys
|
182
|
+
reload(sys)
|
183
|
+
sys.setdefaultencoding("utf-8")
|
184
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
185
|
+
|
186
|
+
def __repr__(self):
|
187
|
+
"""For `print`"""
|
188
|
+
return self.to_str()
|
189
|
+
|
190
|
+
def __eq__(self, other):
|
191
|
+
"""Returns true if both objects are equal"""
|
192
|
+
if not isinstance(other, GaussDBforOpenGaussRoleAttributes):
|
193
|
+
return False
|
194
|
+
|
195
|
+
return self.__dict__ == other.__dict__
|
196
|
+
|
197
|
+
def __ne__(self, other):
|
198
|
+
"""Returns true if both objects are not equal"""
|
199
|
+
return not self == other
|
@@ -0,0 +1,197 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class GaussDBListDatabaseRoles:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'name': 'str',
|
21
|
+
'memberof': 'str',
|
22
|
+
'lock_status': 'bool',
|
23
|
+
'attribute': 'GaussDBListDatabaseRolesPriv'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'name': 'name',
|
28
|
+
'memberof': 'memberof',
|
29
|
+
'lock_status': 'lock_status',
|
30
|
+
'attribute': 'attribute'
|
31
|
+
}
|
32
|
+
|
33
|
+
def __init__(self, name=None, memberof=None, lock_status=None, attribute=None):
|
34
|
+
"""GaussDBListDatabaseRoles
|
35
|
+
|
36
|
+
The model defined in huaweicloud sdk
|
37
|
+
|
38
|
+
:param name: 数据库用户/角色名。
|
39
|
+
:type name: str
|
40
|
+
:param memberof: 用户/角色的默认权限。
|
41
|
+
:type memberof: str
|
42
|
+
:param lock_status: 用户/角色是否被锁。
|
43
|
+
:type lock_status: bool
|
44
|
+
:param attribute:
|
45
|
+
:type attribute: :class:`huaweicloudsdkgaussdbforopengauss.v3.GaussDBListDatabaseRolesPriv`
|
46
|
+
"""
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
self._name = None
|
51
|
+
self._memberof = None
|
52
|
+
self._lock_status = None
|
53
|
+
self._attribute = None
|
54
|
+
self.discriminator = None
|
55
|
+
|
56
|
+
self.name = name
|
57
|
+
if memberof is not None:
|
58
|
+
self.memberof = memberof
|
59
|
+
if lock_status is not None:
|
60
|
+
self.lock_status = lock_status
|
61
|
+
if attribute is not None:
|
62
|
+
self.attribute = attribute
|
63
|
+
|
64
|
+
@property
|
65
|
+
def name(self):
|
66
|
+
"""Gets the name of this GaussDBListDatabaseRoles.
|
67
|
+
|
68
|
+
数据库用户/角色名。
|
69
|
+
|
70
|
+
:return: The name of this GaussDBListDatabaseRoles.
|
71
|
+
:rtype: str
|
72
|
+
"""
|
73
|
+
return self._name
|
74
|
+
|
75
|
+
@name.setter
|
76
|
+
def name(self, name):
|
77
|
+
"""Sets the name of this GaussDBListDatabaseRoles.
|
78
|
+
|
79
|
+
数据库用户/角色名。
|
80
|
+
|
81
|
+
:param name: The name of this GaussDBListDatabaseRoles.
|
82
|
+
:type name: str
|
83
|
+
"""
|
84
|
+
self._name = name
|
85
|
+
|
86
|
+
@property
|
87
|
+
def memberof(self):
|
88
|
+
"""Gets the memberof of this GaussDBListDatabaseRoles.
|
89
|
+
|
90
|
+
用户/角色的默认权限。
|
91
|
+
|
92
|
+
:return: The memberof of this GaussDBListDatabaseRoles.
|
93
|
+
:rtype: str
|
94
|
+
"""
|
95
|
+
return self._memberof
|
96
|
+
|
97
|
+
@memberof.setter
|
98
|
+
def memberof(self, memberof):
|
99
|
+
"""Sets the memberof of this GaussDBListDatabaseRoles.
|
100
|
+
|
101
|
+
用户/角色的默认权限。
|
102
|
+
|
103
|
+
:param memberof: The memberof of this GaussDBListDatabaseRoles.
|
104
|
+
:type memberof: str
|
105
|
+
"""
|
106
|
+
self._memberof = memberof
|
107
|
+
|
108
|
+
@property
|
109
|
+
def lock_status(self):
|
110
|
+
"""Gets the lock_status of this GaussDBListDatabaseRoles.
|
111
|
+
|
112
|
+
用户/角色是否被锁。
|
113
|
+
|
114
|
+
:return: The lock_status of this GaussDBListDatabaseRoles.
|
115
|
+
:rtype: bool
|
116
|
+
"""
|
117
|
+
return self._lock_status
|
118
|
+
|
119
|
+
@lock_status.setter
|
120
|
+
def lock_status(self, lock_status):
|
121
|
+
"""Sets the lock_status of this GaussDBListDatabaseRoles.
|
122
|
+
|
123
|
+
用户/角色是否被锁。
|
124
|
+
|
125
|
+
:param lock_status: The lock_status of this GaussDBListDatabaseRoles.
|
126
|
+
:type lock_status: bool
|
127
|
+
"""
|
128
|
+
self._lock_status = lock_status
|
129
|
+
|
130
|
+
@property
|
131
|
+
def attribute(self):
|
132
|
+
"""Gets the attribute of this GaussDBListDatabaseRoles.
|
133
|
+
|
134
|
+
:return: The attribute of this GaussDBListDatabaseRoles.
|
135
|
+
:rtype: :class:`huaweicloudsdkgaussdbforopengauss.v3.GaussDBListDatabaseRolesPriv`
|
136
|
+
"""
|
137
|
+
return self._attribute
|
138
|
+
|
139
|
+
@attribute.setter
|
140
|
+
def attribute(self, attribute):
|
141
|
+
"""Sets the attribute of this GaussDBListDatabaseRoles.
|
142
|
+
|
143
|
+
:param attribute: The attribute of this GaussDBListDatabaseRoles.
|
144
|
+
:type attribute: :class:`huaweicloudsdkgaussdbforopengauss.v3.GaussDBListDatabaseRolesPriv`
|
145
|
+
"""
|
146
|
+
self._attribute = attribute
|
147
|
+
|
148
|
+
def to_dict(self):
|
149
|
+
"""Returns the model properties as a dict"""
|
150
|
+
result = {}
|
151
|
+
|
152
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
153
|
+
value = getattr(self, attr)
|
154
|
+
if isinstance(value, list):
|
155
|
+
result[attr] = list(map(
|
156
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
157
|
+
value
|
158
|
+
))
|
159
|
+
elif hasattr(value, "to_dict"):
|
160
|
+
result[attr] = value.to_dict()
|
161
|
+
elif isinstance(value, dict):
|
162
|
+
result[attr] = dict(map(
|
163
|
+
lambda item: (item[0], item[1].to_dict())
|
164
|
+
if hasattr(item[1], "to_dict") else item,
|
165
|
+
value.items()
|
166
|
+
))
|
167
|
+
else:
|
168
|
+
if attr in self.sensitive_list:
|
169
|
+
result[attr] = "****"
|
170
|
+
else:
|
171
|
+
result[attr] = value
|
172
|
+
|
173
|
+
return result
|
174
|
+
|
175
|
+
def to_str(self):
|
176
|
+
"""Returns the string representation of the model"""
|
177
|
+
import simplejson as json
|
178
|
+
if six.PY2:
|
179
|
+
import sys
|
180
|
+
reload(sys)
|
181
|
+
sys.setdefaultencoding("utf-8")
|
182
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
183
|
+
|
184
|
+
def __repr__(self):
|
185
|
+
"""For `print`"""
|
186
|
+
return self.to_str()
|
187
|
+
|
188
|
+
def __eq__(self, other):
|
189
|
+
"""Returns true if both objects are equal"""
|
190
|
+
if not isinstance(other, GaussDBListDatabaseRoles):
|
191
|
+
return False
|
192
|
+
|
193
|
+
return self.__dict__ == other.__dict__
|
194
|
+
|
195
|
+
def __ne__(self, other):
|
196
|
+
"""Returns true if both objects are not equal"""
|
197
|
+
return not self == other
|