1# coding: utf-8
2# Copyright (c) 2016, 2021, Oracle and/or its affiliates.  All rights reserved.
3# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
5
6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel  # noqa: F401
7from oci.decorators import init_model_state_from_kwargs
8
9
10@init_model_state_from_kwargs
11class CreateStreamDetails(object):
12    """
13    Object used to create a stream.
14    """
15
16    def __init__(self, **kwargs):
17        """
18        Initializes a new CreateStreamDetails object with values from keyword arguments.
19        The following keyword arguments are supported (corresponding to the getters/setters of this class):
20
21        :param name:
22            The value to assign to the name property of this CreateStreamDetails.
23        :type name: str
24
25        :param partitions:
26            The value to assign to the partitions property of this CreateStreamDetails.
27        :type partitions: int
28
29        :param compartment_id:
30            The value to assign to the compartment_id property of this CreateStreamDetails.
31        :type compartment_id: str
32
33        :param stream_pool_id:
34            The value to assign to the stream_pool_id property of this CreateStreamDetails.
35        :type stream_pool_id: str
36
37        :param retention_in_hours:
38            The value to assign to the retention_in_hours property of this CreateStreamDetails.
39        :type retention_in_hours: int
40
41        :param freeform_tags:
42            The value to assign to the freeform_tags property of this CreateStreamDetails.
43        :type freeform_tags: dict(str, str)
44
45        :param defined_tags:
46            The value to assign to the defined_tags property of this CreateStreamDetails.
47        :type defined_tags: dict(str, dict(str, object))
48
49        """
50        self.swagger_types = {
51            'name': 'str',
52            'partitions': 'int',
53            'compartment_id': 'str',
54            'stream_pool_id': 'str',
55            'retention_in_hours': 'int',
56            'freeform_tags': 'dict(str, str)',
57            'defined_tags': 'dict(str, dict(str, object))'
58        }
59
60        self.attribute_map = {
61            'name': 'name',
62            'partitions': 'partitions',
63            'compartment_id': 'compartmentId',
64            'stream_pool_id': 'streamPoolId',
65            'retention_in_hours': 'retentionInHours',
66            'freeform_tags': 'freeformTags',
67            'defined_tags': 'definedTags'
68        }
69
70        self._name = None
71        self._partitions = None
72        self._compartment_id = None
73        self._stream_pool_id = None
74        self._retention_in_hours = None
75        self._freeform_tags = None
76        self._defined_tags = None
77
78    @property
79    def name(self):
80        """
81        **[Required]** Gets the name of this CreateStreamDetails.
82        The name of the stream. Avoid entering confidential information.
83
84        Example: `TelemetryEvents`
85
86
87        :return: The name of this CreateStreamDetails.
88        :rtype: str
89        """
90        return self._name
91
92    @name.setter
93    def name(self, name):
94        """
95        Sets the name of this CreateStreamDetails.
96        The name of the stream. Avoid entering confidential information.
97
98        Example: `TelemetryEvents`
99
100
101        :param name: The name of this CreateStreamDetails.
102        :type: str
103        """
104        self._name = name
105
106    @property
107    def partitions(self):
108        """
109        **[Required]** Gets the partitions of this CreateStreamDetails.
110        The number of partitions in the stream.
111
112
113        :return: The partitions of this CreateStreamDetails.
114        :rtype: int
115        """
116        return self._partitions
117
118    @partitions.setter
119    def partitions(self, partitions):
120        """
121        Sets the partitions of this CreateStreamDetails.
122        The number of partitions in the stream.
123
124
125        :param partitions: The partitions of this CreateStreamDetails.
126        :type: int
127        """
128        self._partitions = partitions
129
130    @property
131    def compartment_id(self):
132        """
133        Gets the compartment_id of this CreateStreamDetails.
134        The OCID of the compartment that contains the stream.
135
136
137        :return: The compartment_id of this CreateStreamDetails.
138        :rtype: str
139        """
140        return self._compartment_id
141
142    @compartment_id.setter
143    def compartment_id(self, compartment_id):
144        """
145        Sets the compartment_id of this CreateStreamDetails.
146        The OCID of the compartment that contains the stream.
147
148
149        :param compartment_id: The compartment_id of this CreateStreamDetails.
150        :type: str
151        """
152        self._compartment_id = compartment_id
153
154    @property
155    def stream_pool_id(self):
156        """
157        Gets the stream_pool_id of this CreateStreamDetails.
158        The OCID of the stream pool that contains the stream.
159
160
161        :return: The stream_pool_id of this CreateStreamDetails.
162        :rtype: str
163        """
164        return self._stream_pool_id
165
166    @stream_pool_id.setter
167    def stream_pool_id(self, stream_pool_id):
168        """
169        Sets the stream_pool_id of this CreateStreamDetails.
170        The OCID of the stream pool that contains the stream.
171
172
173        :param stream_pool_id: The stream_pool_id of this CreateStreamDetails.
174        :type: str
175        """
176        self._stream_pool_id = stream_pool_id
177
178    @property
179    def retention_in_hours(self):
180        """
181        Gets the retention_in_hours of this CreateStreamDetails.
182        The retention period of the stream, in hours. Accepted values are between 24 and 168 (7 days).
183        If not specified, the stream will have a retention period of 24 hours.
184
185
186        :return: The retention_in_hours of this CreateStreamDetails.
187        :rtype: int
188        """
189        return self._retention_in_hours
190
191    @retention_in_hours.setter
192    def retention_in_hours(self, retention_in_hours):
193        """
194        Sets the retention_in_hours of this CreateStreamDetails.
195        The retention period of the stream, in hours. Accepted values are between 24 and 168 (7 days).
196        If not specified, the stream will have a retention period of 24 hours.
197
198
199        :param retention_in_hours: The retention_in_hours of this CreateStreamDetails.
200        :type: int
201        """
202        self._retention_in_hours = retention_in_hours
203
204    @property
205    def freeform_tags(self):
206        """
207        Gets the freeform_tags of this CreateStreamDetails.
208        Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only.
209        For more information, see `Resource Tags`__.
210
211        Example: `{\"Department\": \"Finance\"}`
212
213        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
214
215
216        :return: The freeform_tags of this CreateStreamDetails.
217        :rtype: dict(str, str)
218        """
219        return self._freeform_tags
220
221    @freeform_tags.setter
222    def freeform_tags(self, freeform_tags):
223        """
224        Sets the freeform_tags of this CreateStreamDetails.
225        Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only.
226        For more information, see `Resource Tags`__.
227
228        Example: `{\"Department\": \"Finance\"}`
229
230        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
231
232
233        :param freeform_tags: The freeform_tags of this CreateStreamDetails.
234        :type: dict(str, str)
235        """
236        self._freeform_tags = freeform_tags
237
238    @property
239    def defined_tags(self):
240        """
241        Gets the defined_tags of this CreateStreamDetails.
242        Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__.
243
244        Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
245
246        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
247
248
249        :return: The defined_tags of this CreateStreamDetails.
250        :rtype: dict(str, dict(str, object))
251        """
252        return self._defined_tags
253
254    @defined_tags.setter
255    def defined_tags(self, defined_tags):
256        """
257        Sets the defined_tags of this CreateStreamDetails.
258        Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__.
259
260        Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
261
262        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
263
264
265        :param defined_tags: The defined_tags of this CreateStreamDetails.
266        :type: dict(str, dict(str, object))
267        """
268        self._defined_tags = defined_tags
269
270    def __repr__(self):
271        return formatted_flat_dict(self)
272
273    def __eq__(self, other):
274        if other is None:
275            return False
276
277        return self.__dict__ == other.__dict__
278
279    def __ne__(self, other):
280        return not self == other
281