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
5from .dynamic_type_handler import DynamicTypeHandler
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 RuleTypeConfig(DynamicTypeHandler):
12    """
13    The rule type config.
14    """
15
16    def __init__(self, **kwargs):
17        """
18        Initializes a new RuleTypeConfig object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.RuleTypeConfig.model_type` attribute
19        of this class is ``RULE_TYPE_CONFIGS`` and it should not be changed.
20        The following keyword arguments are supported (corresponding to the getters/setters of this class):
21
22        :param model_type:
23            The value to assign to the model_type property of this RuleTypeConfig.
24            Allowed values for this property are: "RULE_TYPE_CONFIGS", 'UNKNOWN_ENUM_VALUE'.
25            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
26        :type model_type: str
27
28        :param key:
29            The value to assign to the key property of this RuleTypeConfig.
30        :type key: str
31
32        :param model_version:
33            The value to assign to the model_version property of this RuleTypeConfig.
34        :type model_version: str
35
36        :param parent_ref:
37            The value to assign to the parent_ref property of this RuleTypeConfig.
38        :type parent_ref: oci.data_integration.models.ParentReference
39
40        :param scope:
41            The value to assign to the scope property of this RuleTypeConfig.
42        :type scope: object
43
44        :param is_order_by_rule:
45            The value to assign to the is_order_by_rule property of this RuleTypeConfig.
46        :type is_order_by_rule: bool
47
48        :param projection_rules:
49            The value to assign to the projection_rules property of this RuleTypeConfig.
50        :type projection_rules: list[oci.data_integration.models.ProjectionRule]
51
52        :param config_values:
53            The value to assign to the config_values property of this RuleTypeConfig.
54        :type config_values: oci.data_integration.models.ConfigValues
55
56        :param object_status:
57            The value to assign to the object_status property of this RuleTypeConfig.
58        :type object_status: int
59
60        """
61        self.swagger_types = {
62            'model_type': 'str',
63            'key': 'str',
64            'model_version': 'str',
65            'parent_ref': 'ParentReference',
66            'scope': 'object',
67            'is_order_by_rule': 'bool',
68            'projection_rules': 'list[ProjectionRule]',
69            'config_values': 'ConfigValues',
70            'object_status': 'int'
71        }
72
73        self.attribute_map = {
74            'model_type': 'modelType',
75            'key': 'key',
76            'model_version': 'modelVersion',
77            'parent_ref': 'parentRef',
78            'scope': 'scope',
79            'is_order_by_rule': 'isOrderByRule',
80            'projection_rules': 'projectionRules',
81            'config_values': 'configValues',
82            'object_status': 'objectStatus'
83        }
84
85        self._model_type = None
86        self._key = None
87        self._model_version = None
88        self._parent_ref = None
89        self._scope = None
90        self._is_order_by_rule = None
91        self._projection_rules = None
92        self._config_values = None
93        self._object_status = None
94        self._model_type = 'RULE_TYPE_CONFIGS'
95
96    @property
97    def key(self):
98        """
99        Gets the key of this RuleTypeConfig.
100        The key of the object.
101
102
103        :return: The key of this RuleTypeConfig.
104        :rtype: str
105        """
106        return self._key
107
108    @key.setter
109    def key(self, key):
110        """
111        Sets the key of this RuleTypeConfig.
112        The key of the object.
113
114
115        :param key: The key of this RuleTypeConfig.
116        :type: str
117        """
118        self._key = key
119
120    @property
121    def model_version(self):
122        """
123        Gets the model_version of this RuleTypeConfig.
124        The model version of an object.
125
126
127        :return: The model_version of this RuleTypeConfig.
128        :rtype: str
129        """
130        return self._model_version
131
132    @model_version.setter
133    def model_version(self, model_version):
134        """
135        Sets the model_version of this RuleTypeConfig.
136        The model version of an object.
137
138
139        :param model_version: The model_version of this RuleTypeConfig.
140        :type: str
141        """
142        self._model_version = model_version
143
144    @property
145    def parent_ref(self):
146        """
147        Gets the parent_ref of this RuleTypeConfig.
148
149        :return: The parent_ref of this RuleTypeConfig.
150        :rtype: oci.data_integration.models.ParentReference
151        """
152        return self._parent_ref
153
154    @parent_ref.setter
155    def parent_ref(self, parent_ref):
156        """
157        Sets the parent_ref of this RuleTypeConfig.
158
159        :param parent_ref: The parent_ref of this RuleTypeConfig.
160        :type: oci.data_integration.models.ParentReference
161        """
162        self._parent_ref = parent_ref
163
164    @property
165    def scope(self):
166        """
167        Gets the scope of this RuleTypeConfig.
168        Reference to a typed object, this can be either a key value to an object within the document, a shall referenced to a `TypedObject` or a full `TypedObject` definition.
169
170
171        :return: The scope of this RuleTypeConfig.
172        :rtype: object
173        """
174        return self._scope
175
176    @scope.setter
177    def scope(self, scope):
178        """
179        Sets the scope of this RuleTypeConfig.
180        Reference to a typed object, this can be either a key value to an object within the document, a shall referenced to a `TypedObject` or a full `TypedObject` definition.
181
182
183        :param scope: The scope of this RuleTypeConfig.
184        :type: object
185        """
186        self._scope = scope
187
188    @property
189    def is_order_by_rule(self):
190        """
191        Gets the is_order_by_rule of this RuleTypeConfig.
192        Specifies whether it is ordered by rule.
193
194
195        :return: The is_order_by_rule of this RuleTypeConfig.
196        :rtype: bool
197        """
198        return self._is_order_by_rule
199
200    @is_order_by_rule.setter
201    def is_order_by_rule(self, is_order_by_rule):
202        """
203        Sets the is_order_by_rule of this RuleTypeConfig.
204        Specifies whether it is ordered by rule.
205
206
207        :param is_order_by_rule: The is_order_by_rule of this RuleTypeConfig.
208        :type: bool
209        """
210        self._is_order_by_rule = is_order_by_rule
211
212    @property
213    def projection_rules(self):
214        """
215        Gets the projection_rules of this RuleTypeConfig.
216        The projection rules.
217
218
219        :return: The projection_rules of this RuleTypeConfig.
220        :rtype: list[oci.data_integration.models.ProjectionRule]
221        """
222        return self._projection_rules
223
224    @projection_rules.setter
225    def projection_rules(self, projection_rules):
226        """
227        Sets the projection_rules of this RuleTypeConfig.
228        The projection rules.
229
230
231        :param projection_rules: The projection_rules of this RuleTypeConfig.
232        :type: list[oci.data_integration.models.ProjectionRule]
233        """
234        self._projection_rules = projection_rules
235
236    @property
237    def config_values(self):
238        """
239        Gets the config_values of this RuleTypeConfig.
240
241        :return: The config_values of this RuleTypeConfig.
242        :rtype: oci.data_integration.models.ConfigValues
243        """
244        return self._config_values
245
246    @config_values.setter
247    def config_values(self, config_values):
248        """
249        Sets the config_values of this RuleTypeConfig.
250
251        :param config_values: The config_values of this RuleTypeConfig.
252        :type: oci.data_integration.models.ConfigValues
253        """
254        self._config_values = config_values
255
256    @property
257    def object_status(self):
258        """
259        Gets the object_status of this RuleTypeConfig.
260        The status of an object that can be set to value 1 for shallow references across objects, other values reserved.
261
262
263        :return: The object_status of this RuleTypeConfig.
264        :rtype: int
265        """
266        return self._object_status
267
268    @object_status.setter
269    def object_status(self, object_status):
270        """
271        Sets the object_status of this RuleTypeConfig.
272        The status of an object that can be set to value 1 for shallow references across objects, other values reserved.
273
274
275        :param object_status: The object_status of this RuleTypeConfig.
276        :type: int
277        """
278        self._object_status = object_status
279
280    def __repr__(self):
281        return formatted_flat_dict(self)
282
283    def __eq__(self, other):
284        if other is None:
285            return False
286
287        return self.__dict__ == other.__dict__
288
289    def __ne__(self, other):
290        return not self == other
291