huaweicloudsdkobs 3.1.160__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 (72) hide show
  1. huaweicloudsdkobs/__init__.py +0 -0
  2. huaweicloudsdkobs/v1/__init__.py +66 -0
  3. huaweicloudsdkobs/v1/model/__init__.py +63 -0
  4. huaweicloudsdkobs/v1/model/access_control_list.py +113 -0
  5. huaweicloudsdkobs/v1/model/bucket.py +233 -0
  6. huaweicloudsdkobs/v1/model/buckets.py +117 -0
  7. huaweicloudsdkobs/v1/model/common_prefixes.py +113 -0
  8. huaweicloudsdkobs/v1/model/contents.py +287 -0
  9. huaweicloudsdkobs/v1/model/copy_object_request.py +839 -0
  10. huaweicloudsdkobs/v1/model/copy_object_response.py +443 -0
  11. huaweicloudsdkobs/v1/model/create_bucket_request.py +605 -0
  12. huaweicloudsdkobs/v1/model/create_bucket_request_body.py +117 -0
  13. huaweicloudsdkobs/v1/model/create_bucket_response.py +239 -0
  14. huaweicloudsdkobs/v1/model/delete_bucket_customdomain_request.py +173 -0
  15. huaweicloudsdkobs/v1/model/delete_bucket_customdomain_response.py +239 -0
  16. huaweicloudsdkobs/v1/model/delete_bucket_request.py +145 -0
  17. huaweicloudsdkobs/v1/model/delete_bucket_response.py +239 -0
  18. huaweicloudsdkobs/v1/model/delete_object.py +146 -0
  19. huaweicloudsdkobs/v1/model/delete_object_request.py +202 -0
  20. huaweicloudsdkobs/v1/model/delete_object_response.py +289 -0
  21. huaweicloudsdkobs/v1/model/delete_objects_request.py +226 -0
  22. huaweicloudsdkobs/v1/model/delete_objects_request_body.py +171 -0
  23. huaweicloudsdkobs/v1/model/delete_objects_response.py +318 -0
  24. huaweicloudsdkobs/v1/model/delete_result_deleted.py +204 -0
  25. huaweicloudsdkobs/v1/model/delete_result_error.py +175 -0
  26. huaweicloudsdkobs/v1/model/domains.py +173 -0
  27. huaweicloudsdkobs/v1/model/filter_object.py +113 -0
  28. huaweicloudsdkobs/v1/model/filter_rule.py +146 -0
  29. huaweicloudsdkobs/v1/model/function_stage_configuration.py +229 -0
  30. huaweicloudsdkobs/v1/model/get_bucket_acl_request.py +173 -0
  31. huaweicloudsdkobs/v1/model/get_bucket_acl_response.py +289 -0
  32. huaweicloudsdkobs/v1/model/get_bucket_customdomain_request.py +173 -0
  33. huaweicloudsdkobs/v1/model/get_bucket_customdomain_response.py +264 -0
  34. huaweicloudsdkobs/v1/model/get_bucket_metadata_request.py +203 -0
  35. huaweicloudsdkobs/v1/model/get_bucket_metadata_response.py +539 -0
  36. huaweicloudsdkobs/v1/model/get_bucket_notification_request.py +173 -0
  37. huaweicloudsdkobs/v1/model/get_bucket_notification_response.py +264 -0
  38. huaweicloudsdkobs/v1/model/get_object_metadata_request.py +405 -0
  39. huaweicloudsdkobs/v1/model/get_object_metadata_response.py +689 -0
  40. huaweicloudsdkobs/v1/model/get_object_request.py +666 -0
  41. huaweicloudsdkobs/v1/model/get_object_response.py +489 -0
  42. huaweicloudsdkobs/v1/model/grant.py +171 -0
  43. huaweicloudsdkobs/v1/model/grantee.py +146 -0
  44. huaweicloudsdkobs/v1/model/list_buckets_request.py +146 -0
  45. huaweicloudsdkobs/v1/model/list_buckets_response.py +314 -0
  46. huaweicloudsdkobs/v1/model/list_objects_request.py +348 -0
  47. huaweicloudsdkobs/v1/model/list_objects_response.py +546 -0
  48. huaweicloudsdkobs/v1/model/owner.py +117 -0
  49. huaweicloudsdkobs/v1/model/put_object_request.py +667 -0
  50. huaweicloudsdkobs/v1/model/put_object_response.py +389 -0
  51. huaweicloudsdkobs/v1/model/set_bucket_acl_request.py +227 -0
  52. huaweicloudsdkobs/v1/model/set_bucket_acl_request_body.py +138 -0
  53. huaweicloudsdkobs/v1/model/set_bucket_acl_response.py +239 -0
  54. huaweicloudsdkobs/v1/model/set_bucket_custom_domain_body.py +230 -0
  55. huaweicloudsdkobs/v1/model/set_bucket_customedomain_request.py +198 -0
  56. huaweicloudsdkobs/v1/model/set_bucket_customedomain_response.py +239 -0
  57. huaweicloudsdkobs/v1/model/set_bucket_notification_request.py +198 -0
  58. huaweicloudsdkobs/v1/model/set_bucket_notification_request_body.py +138 -0
  59. huaweicloudsdkobs/v1/model/set_bucket_notification_response.py +239 -0
  60. huaweicloudsdkobs/v1/model/topic_configuration.py +200 -0
  61. huaweicloudsdkobs/v1/model/topic_configuration_filter.py +113 -0
  62. huaweicloudsdkobs/v1/obs_async_client.py +1600 -0
  63. huaweicloudsdkobs/v1/obs_client.py +1597 -0
  64. huaweicloudsdkobs/v1/obs_credentials.py +69 -0
  65. huaweicloudsdkobs/v1/obs_signer.py +298 -0
  66. huaweicloudsdkobs/v1/region/__init__.py +0 -0
  67. huaweicloudsdkobs/v1/region/obs_region.py +88 -0
  68. huaweicloudsdkobs-3.1.160.dist-info/LICENSE +13 -0
  69. huaweicloudsdkobs-3.1.160.dist-info/METADATA +26 -0
  70. huaweicloudsdkobs-3.1.160.dist-info/RECORD +72 -0
  71. huaweicloudsdkobs-3.1.160.dist-info/WHEEL +5 -0
  72. huaweicloudsdkobs-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,138 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class SetBucketNotificationRequestBody:
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
+ xml_name = "NotificationConfiguration"
18
+
19
+ sensitive_list = []
20
+
21
+ openapi_types = {
22
+ 'topic_configuration': 'list[TopicConfiguration]',
23
+ 'function_stage_configuration': 'list[FunctionStageConfiguration]'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'topic_configuration': 'TopicConfiguration',
28
+ 'function_stage_configuration': 'FunctionStageConfiguration'
29
+ }
30
+
31
+ def __init__(self, topic_configuration=None, function_stage_configuration=None):
32
+ r"""SetBucketNotificationRequestBody
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param topic_configuration:
37
+ :type topic_configuration: list[:class:`huaweicloudsdkobs.v1.TopicConfiguration`]
38
+ :param function_stage_configuration:
39
+ :type function_stage_configuration: list[:class:`huaweicloudsdkobs.v1.FunctionStageConfiguration`]
40
+ """
41
+
42
+
43
+
44
+ self._topic_configuration = None
45
+ self._function_stage_configuration = None
46
+ self.discriminator = None
47
+
48
+ if topic_configuration is not None:
49
+ self.topic_configuration = topic_configuration
50
+ if function_stage_configuration is not None:
51
+ self.function_stage_configuration = function_stage_configuration
52
+
53
+ @property
54
+ def topic_configuration(self):
55
+ r"""Gets the topic_configuration of this SetBucketNotificationRequestBody.
56
+
57
+ :return: The topic_configuration of this SetBucketNotificationRequestBody.
58
+ :rtype: list[:class:`huaweicloudsdkobs.v1.TopicConfiguration`]
59
+ """
60
+ return self._topic_configuration
61
+
62
+ @topic_configuration.setter
63
+ def topic_configuration(self, topic_configuration):
64
+ r"""Sets the topic_configuration of this SetBucketNotificationRequestBody.
65
+
66
+ :param topic_configuration: The topic_configuration of this SetBucketNotificationRequestBody.
67
+ :type topic_configuration: list[:class:`huaweicloudsdkobs.v1.TopicConfiguration`]
68
+ """
69
+ self._topic_configuration = topic_configuration
70
+
71
+ @property
72
+ def function_stage_configuration(self):
73
+ r"""Gets the function_stage_configuration of this SetBucketNotificationRequestBody.
74
+
75
+ :return: The function_stage_configuration of this SetBucketNotificationRequestBody.
76
+ :rtype: list[:class:`huaweicloudsdkobs.v1.FunctionStageConfiguration`]
77
+ """
78
+ return self._function_stage_configuration
79
+
80
+ @function_stage_configuration.setter
81
+ def function_stage_configuration(self, function_stage_configuration):
82
+ r"""Sets the function_stage_configuration of this SetBucketNotificationRequestBody.
83
+
84
+ :param function_stage_configuration: The function_stage_configuration of this SetBucketNotificationRequestBody.
85
+ :type function_stage_configuration: list[:class:`huaweicloudsdkobs.v1.FunctionStageConfiguration`]
86
+ """
87
+ self._function_stage_configuration = function_stage_configuration
88
+
89
+ def to_dict(self):
90
+ """Returns the model properties as a dict"""
91
+ result = {}
92
+
93
+ for attr, _ in six.iteritems(self.openapi_types):
94
+ value = getattr(self, attr)
95
+ if isinstance(value, list):
96
+ result[attr] = list(map(
97
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
98
+ value
99
+ ))
100
+ elif hasattr(value, "to_dict"):
101
+ result[attr] = value.to_dict()
102
+ elif isinstance(value, dict):
103
+ result[attr] = dict(map(
104
+ lambda item: (item[0], item[1].to_dict())
105
+ if hasattr(item[1], "to_dict") else item,
106
+ value.items()
107
+ ))
108
+ else:
109
+ if attr in self.sensitive_list:
110
+ result[attr] = "****"
111
+ else:
112
+ result[attr] = value
113
+
114
+ return result
115
+
116
+ def to_str(self):
117
+ """Returns the string representation of the model"""
118
+ import simplejson as json
119
+ if six.PY2:
120
+ import sys
121
+ reload(sys)
122
+ sys.setdefaultencoding("utf-8")
123
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
124
+
125
+ def __repr__(self):
126
+ """For `print`"""
127
+ return self.to_str()
128
+
129
+ def __eq__(self, other):
130
+ """Returns true if both objects are equal"""
131
+ if not isinstance(other, SetBucketNotificationRequestBody):
132
+ return False
133
+
134
+ return self.__dict__ == other.__dict__
135
+
136
+ def __ne__(self, other):
137
+ """Returns true if both objects are not equal"""
138
+ return not self == other
@@ -0,0 +1,239 @@
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 SetBucketNotificationResponse(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
+ xml_name = "SetBucketNotificationResponse"
19
+
20
+ sensitive_list = []
21
+
22
+ openapi_types = {
23
+ 'x_obs_id_2': 'str',
24
+ 'x_obs_request_id': 'str',
25
+ 'e_tag': 'str',
26
+ 'connection': 'str',
27
+ 'content_length': 'str',
28
+ 'date': 'str'
29
+ }
30
+
31
+ attribute_map = {
32
+ 'x_obs_id_2': 'x-obs-id-2',
33
+ 'x_obs_request_id': 'x-obs-request-id',
34
+ 'e_tag': 'ETag',
35
+ 'connection': 'Connection',
36
+ 'content_length': 'Content-Length',
37
+ 'date': 'Date'
38
+ }
39
+
40
+ def __init__(self, x_obs_id_2=None, x_obs_request_id=None, e_tag=None, connection=None, content_length=None, date=None):
41
+ r"""SetBucketNotificationResponse
42
+
43
+ The model defined in huaweicloud sdk
44
+
45
+ :param x_obs_id_2:
46
+ :type x_obs_id_2: str
47
+ :param x_obs_request_id:
48
+ :type x_obs_request_id: str
49
+ :param e_tag:
50
+ :type e_tag: str
51
+ :param connection:
52
+ :type connection: str
53
+ :param content_length:
54
+ :type content_length: str
55
+ :param date:
56
+ :type date: str
57
+ """
58
+
59
+ super(SetBucketNotificationResponse, self).__init__()
60
+
61
+ self._x_obs_id_2 = None
62
+ self._x_obs_request_id = None
63
+ self._e_tag = None
64
+ self._connection = None
65
+ self._content_length = None
66
+ self._date = None
67
+ self.discriminator = None
68
+
69
+ if x_obs_id_2 is not None:
70
+ self.x_obs_id_2 = x_obs_id_2
71
+ if x_obs_request_id is not None:
72
+ self.x_obs_request_id = x_obs_request_id
73
+ if e_tag is not None:
74
+ self.e_tag = e_tag
75
+ if connection is not None:
76
+ self.connection = connection
77
+ if content_length is not None:
78
+ self.content_length = content_length
79
+ if date is not None:
80
+ self.date = date
81
+
82
+ @property
83
+ def x_obs_id_2(self):
84
+ r"""Gets the x_obs_id_2 of this SetBucketNotificationResponse.
85
+
86
+ :return: The x_obs_id_2 of this SetBucketNotificationResponse.
87
+ :rtype: str
88
+ """
89
+ return self._x_obs_id_2
90
+
91
+ @x_obs_id_2.setter
92
+ def x_obs_id_2(self, x_obs_id_2):
93
+ r"""Sets the x_obs_id_2 of this SetBucketNotificationResponse.
94
+
95
+ :param x_obs_id_2: The x_obs_id_2 of this SetBucketNotificationResponse.
96
+ :type x_obs_id_2: str
97
+ """
98
+ self._x_obs_id_2 = x_obs_id_2
99
+
100
+ @property
101
+ def x_obs_request_id(self):
102
+ r"""Gets the x_obs_request_id of this SetBucketNotificationResponse.
103
+
104
+ :return: The x_obs_request_id of this SetBucketNotificationResponse.
105
+ :rtype: str
106
+ """
107
+ return self._x_obs_request_id
108
+
109
+ @x_obs_request_id.setter
110
+ def x_obs_request_id(self, x_obs_request_id):
111
+ r"""Sets the x_obs_request_id of this SetBucketNotificationResponse.
112
+
113
+ :param x_obs_request_id: The x_obs_request_id of this SetBucketNotificationResponse.
114
+ :type x_obs_request_id: str
115
+ """
116
+ self._x_obs_request_id = x_obs_request_id
117
+
118
+ @property
119
+ def e_tag(self):
120
+ r"""Gets the e_tag of this SetBucketNotificationResponse.
121
+
122
+ :return: The e_tag of this SetBucketNotificationResponse.
123
+ :rtype: str
124
+ """
125
+ return self._e_tag
126
+
127
+ @e_tag.setter
128
+ def e_tag(self, e_tag):
129
+ r"""Sets the e_tag of this SetBucketNotificationResponse.
130
+
131
+ :param e_tag: The e_tag of this SetBucketNotificationResponse.
132
+ :type e_tag: str
133
+ """
134
+ self._e_tag = e_tag
135
+
136
+ @property
137
+ def connection(self):
138
+ r"""Gets the connection of this SetBucketNotificationResponse.
139
+
140
+ :return: The connection of this SetBucketNotificationResponse.
141
+ :rtype: str
142
+ """
143
+ return self._connection
144
+
145
+ @connection.setter
146
+ def connection(self, connection):
147
+ r"""Sets the connection of this SetBucketNotificationResponse.
148
+
149
+ :param connection: The connection of this SetBucketNotificationResponse.
150
+ :type connection: str
151
+ """
152
+ self._connection = connection
153
+
154
+ @property
155
+ def content_length(self):
156
+ r"""Gets the content_length of this SetBucketNotificationResponse.
157
+
158
+ :return: The content_length of this SetBucketNotificationResponse.
159
+ :rtype: str
160
+ """
161
+ return self._content_length
162
+
163
+ @content_length.setter
164
+ def content_length(self, content_length):
165
+ r"""Sets the content_length of this SetBucketNotificationResponse.
166
+
167
+ :param content_length: The content_length of this SetBucketNotificationResponse.
168
+ :type content_length: str
169
+ """
170
+ self._content_length = content_length
171
+
172
+ @property
173
+ def date(self):
174
+ r"""Gets the date of this SetBucketNotificationResponse.
175
+
176
+ :return: The date of this SetBucketNotificationResponse.
177
+ :rtype: str
178
+ """
179
+ return self._date
180
+
181
+ @date.setter
182
+ def date(self, date):
183
+ r"""Sets the date of this SetBucketNotificationResponse.
184
+
185
+ :param date: The date of this SetBucketNotificationResponse.
186
+ :type date: str
187
+ """
188
+ self._date = date
189
+
190
+ def to_dict(self):
191
+ """Returns the model properties as a dict"""
192
+ result = {}
193
+
194
+ for attr, _ in six.iteritems(self.openapi_types):
195
+ value = getattr(self, attr)
196
+ if isinstance(value, list):
197
+ result[attr] = list(map(
198
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
199
+ value
200
+ ))
201
+ elif hasattr(value, "to_dict"):
202
+ result[attr] = value.to_dict()
203
+ elif isinstance(value, dict):
204
+ result[attr] = dict(map(
205
+ lambda item: (item[0], item[1].to_dict())
206
+ if hasattr(item[1], "to_dict") else item,
207
+ value.items()
208
+ ))
209
+ else:
210
+ if attr in self.sensitive_list:
211
+ result[attr] = "****"
212
+ else:
213
+ result[attr] = value
214
+
215
+ return result
216
+
217
+ def to_str(self):
218
+ """Returns the string representation of the model"""
219
+ import simplejson as json
220
+ if six.PY2:
221
+ import sys
222
+ reload(sys)
223
+ sys.setdefaultencoding("utf-8")
224
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
225
+
226
+ def __repr__(self):
227
+ """For `print`"""
228
+ return self.to_str()
229
+
230
+ def __eq__(self, other):
231
+ """Returns true if both objects are equal"""
232
+ if not isinstance(other, SetBucketNotificationResponse):
233
+ return False
234
+
235
+ return self.__dict__ == other.__dict__
236
+
237
+ def __ne__(self, other):
238
+ """Returns true if both objects are not equal"""
239
+ return not self == other
@@ -0,0 +1,200 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class TopicConfiguration:
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
+ xml_name = "TopicConfiguration"
18
+
19
+ sensitive_list = []
20
+
21
+ openapi_types = {
22
+ 'id': 'str',
23
+ 'filter': 'TopicConfigurationFilter',
24
+ 'topic': 'str',
25
+ 'event': 'str'
26
+ }
27
+
28
+ attribute_map = {
29
+ 'id': 'Id',
30
+ 'filter': 'Filter',
31
+ 'topic': 'Topic',
32
+ 'event': 'Event'
33
+ }
34
+
35
+ def __init__(self, id=None, filter=None, topic=None, event=None):
36
+ r"""TopicConfiguration
37
+
38
+ The model defined in huaweicloud sdk
39
+
40
+ :param id: Unique ID of each event notification. If you do not specify an ID, the system assigns one.
41
+ :type id: str
42
+ :param filter:
43
+ :type filter: :class:`huaweicloudsdkobs.v1.TopicConfigurationFilter`
44
+ :param topic: URN of the event notification topic. When OBS detects a specific event in a bucket, it publishes a notification message to this topic. You can find the topic's URN on the [Topics](https://console-intl.huaweicloud.com/smn/?agencyId=7b00025342f14bcabb245478269c6593&region=cn-east-3&locale=en-us#/topics/list) page of the SMN console. Template: <Topic>urn:smn:region:project_id:smn_topic</Topic>
45
+ :type topic: str
46
+ :param event: Event types for which OBS sends notifications. Multiple event types can be added in one **TopicConfiguration** or **FunctionGraphConfiguration** item. Value options: Choose from the following for object upload operations: ObjectCreated:Put ObjectCreated:Post ObjectCreated:Copy ObjectCreated:CompleteMultipartUpload Or use a wildcard character to support all upload operations: ObjectCreated:* Choose from the following for object delete operations: ObjectRemoved:Delete ObjectRemoved:DeleteMarkerCreated Or use a wildcard character to support all delete operations: ObjectRemoved:*
47
+ :type event: str
48
+ """
49
+
50
+
51
+
52
+ self._id = None
53
+ self._filter = None
54
+ self._topic = None
55
+ self._event = None
56
+ self.discriminator = None
57
+
58
+ if id is not None:
59
+ self.id = id
60
+ if filter is not None:
61
+ self.filter = filter
62
+ if topic is not None:
63
+ self.topic = topic
64
+ if event is not None:
65
+ self.event = event
66
+
67
+ @property
68
+ def id(self):
69
+ r"""Gets the id of this TopicConfiguration.
70
+
71
+ Unique ID of each event notification. If you do not specify an ID, the system assigns one.
72
+
73
+ :return: The id of this TopicConfiguration.
74
+ :rtype: str
75
+ """
76
+ return self._id
77
+
78
+ @id.setter
79
+ def id(self, id):
80
+ r"""Sets the id of this TopicConfiguration.
81
+
82
+ Unique ID of each event notification. If you do not specify an ID, the system assigns one.
83
+
84
+ :param id: The id of this TopicConfiguration.
85
+ :type id: str
86
+ """
87
+ self._id = id
88
+
89
+ @property
90
+ def filter(self):
91
+ r"""Gets the filter of this TopicConfiguration.
92
+
93
+ :return: The filter of this TopicConfiguration.
94
+ :rtype: :class:`huaweicloudsdkobs.v1.TopicConfigurationFilter`
95
+ """
96
+ return self._filter
97
+
98
+ @filter.setter
99
+ def filter(self, filter):
100
+ r"""Sets the filter of this TopicConfiguration.
101
+
102
+ :param filter: The filter of this TopicConfiguration.
103
+ :type filter: :class:`huaweicloudsdkobs.v1.TopicConfigurationFilter`
104
+ """
105
+ self._filter = filter
106
+
107
+ @property
108
+ def topic(self):
109
+ r"""Gets the topic of this TopicConfiguration.
110
+
111
+ URN of the event notification topic. When OBS detects a specific event in a bucket, it publishes a notification message to this topic. You can find the topic's URN on the [Topics](https://console-intl.huaweicloud.com/smn/?agencyId=7b00025342f14bcabb245478269c6593&region=cn-east-3&locale=en-us#/topics/list) page of the SMN console. Template: <Topic>urn:smn:region:project_id:smn_topic</Topic>
112
+
113
+ :return: The topic of this TopicConfiguration.
114
+ :rtype: str
115
+ """
116
+ return self._topic
117
+
118
+ @topic.setter
119
+ def topic(self, topic):
120
+ r"""Sets the topic of this TopicConfiguration.
121
+
122
+ URN of the event notification topic. When OBS detects a specific event in a bucket, it publishes a notification message to this topic. You can find the topic's URN on the [Topics](https://console-intl.huaweicloud.com/smn/?agencyId=7b00025342f14bcabb245478269c6593&region=cn-east-3&locale=en-us#/topics/list) page of the SMN console. Template: <Topic>urn:smn:region:project_id:smn_topic</Topic>
123
+
124
+ :param topic: The topic of this TopicConfiguration.
125
+ :type topic: str
126
+ """
127
+ self._topic = topic
128
+
129
+ @property
130
+ def event(self):
131
+ r"""Gets the event of this TopicConfiguration.
132
+
133
+ Event types for which OBS sends notifications. Multiple event types can be added in one **TopicConfiguration** or **FunctionGraphConfiguration** item. Value options: Choose from the following for object upload operations: ObjectCreated:Put ObjectCreated:Post ObjectCreated:Copy ObjectCreated:CompleteMultipartUpload Or use a wildcard character to support all upload operations: ObjectCreated:* Choose from the following for object delete operations: ObjectRemoved:Delete ObjectRemoved:DeleteMarkerCreated Or use a wildcard character to support all delete operations: ObjectRemoved:*
134
+
135
+ :return: The event of this TopicConfiguration.
136
+ :rtype: str
137
+ """
138
+ return self._event
139
+
140
+ @event.setter
141
+ def event(self, event):
142
+ r"""Sets the event of this TopicConfiguration.
143
+
144
+ Event types for which OBS sends notifications. Multiple event types can be added in one **TopicConfiguration** or **FunctionGraphConfiguration** item. Value options: Choose from the following for object upload operations: ObjectCreated:Put ObjectCreated:Post ObjectCreated:Copy ObjectCreated:CompleteMultipartUpload Or use a wildcard character to support all upload operations: ObjectCreated:* Choose from the following for object delete operations: ObjectRemoved:Delete ObjectRemoved:DeleteMarkerCreated Or use a wildcard character to support all delete operations: ObjectRemoved:*
145
+
146
+ :param event: The event of this TopicConfiguration.
147
+ :type event: str
148
+ """
149
+ self._event = event
150
+
151
+ def to_dict(self):
152
+ """Returns the model properties as a dict"""
153
+ result = {}
154
+
155
+ for attr, _ in six.iteritems(self.openapi_types):
156
+ value = getattr(self, attr)
157
+ if isinstance(value, list):
158
+ result[attr] = list(map(
159
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
160
+ value
161
+ ))
162
+ elif hasattr(value, "to_dict"):
163
+ result[attr] = value.to_dict()
164
+ elif isinstance(value, dict):
165
+ result[attr] = dict(map(
166
+ lambda item: (item[0], item[1].to_dict())
167
+ if hasattr(item[1], "to_dict") else item,
168
+ value.items()
169
+ ))
170
+ else:
171
+ if attr in self.sensitive_list:
172
+ result[attr] = "****"
173
+ else:
174
+ result[attr] = value
175
+
176
+ return result
177
+
178
+ def to_str(self):
179
+ """Returns the string representation of the model"""
180
+ import simplejson as json
181
+ if six.PY2:
182
+ import sys
183
+ reload(sys)
184
+ sys.setdefaultencoding("utf-8")
185
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
186
+
187
+ def __repr__(self):
188
+ """For `print`"""
189
+ return self.to_str()
190
+
191
+ def __eq__(self, other):
192
+ """Returns true if both objects are equal"""
193
+ if not isinstance(other, TopicConfiguration):
194
+ return False
195
+
196
+ return self.__dict__ == other.__dict__
197
+
198
+ def __ne__(self, other):
199
+ """Returns true if both objects are not equal"""
200
+ return not self == other
@@ -0,0 +1,113 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class TopicConfigurationFilter:
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
+ xml_name = "TopicConfigurationFilter"
18
+
19
+ sensitive_list = []
20
+
21
+ openapi_types = {
22
+ 'object': 'FilterObject'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'object': 'Object'
27
+ }
28
+
29
+ def __init__(self, object=None):
30
+ r"""TopicConfigurationFilter
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param object:
35
+ :type object: :class:`huaweicloudsdkobs.v1.FilterObject`
36
+ """
37
+
38
+
39
+
40
+ self._object = None
41
+ self.discriminator = None
42
+
43
+ if object is not None:
44
+ self.object = object
45
+
46
+ @property
47
+ def object(self):
48
+ r"""Gets the object of this TopicConfigurationFilter.
49
+
50
+ :return: The object of this TopicConfigurationFilter.
51
+ :rtype: :class:`huaweicloudsdkobs.v1.FilterObject`
52
+ """
53
+ return self._object
54
+
55
+ @object.setter
56
+ def object(self, object):
57
+ r"""Sets the object of this TopicConfigurationFilter.
58
+
59
+ :param object: The object of this TopicConfigurationFilter.
60
+ :type object: :class:`huaweicloudsdkobs.v1.FilterObject`
61
+ """
62
+ self._object = object
63
+
64
+ def to_dict(self):
65
+ """Returns the model properties as a dict"""
66
+ result = {}
67
+
68
+ for attr, _ in six.iteritems(self.openapi_types):
69
+ value = getattr(self, attr)
70
+ if isinstance(value, list):
71
+ result[attr] = list(map(
72
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
73
+ value
74
+ ))
75
+ elif hasattr(value, "to_dict"):
76
+ result[attr] = value.to_dict()
77
+ elif isinstance(value, dict):
78
+ result[attr] = dict(map(
79
+ lambda item: (item[0], item[1].to_dict())
80
+ if hasattr(item[1], "to_dict") else item,
81
+ value.items()
82
+ ))
83
+ else:
84
+ if attr in self.sensitive_list:
85
+ result[attr] = "****"
86
+ else:
87
+ result[attr] = value
88
+
89
+ return result
90
+
91
+ def to_str(self):
92
+ """Returns the string representation of the model"""
93
+ import simplejson as json
94
+ if six.PY2:
95
+ import sys
96
+ reload(sys)
97
+ sys.setdefaultencoding("utf-8")
98
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
99
+
100
+ def __repr__(self):
101
+ """For `print`"""
102
+ return self.to_str()
103
+
104
+ def __eq__(self, other):
105
+ """Returns true if both objects are equal"""
106
+ if not isinstance(other, TopicConfigurationFilter):
107
+ return False
108
+
109
+ return self.__dict__ == other.__dict__
110
+
111
+ def __ne__(self, other):
112
+ """Returns true if both objects are not equal"""
113
+ return not self == other