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 .typed_object import TypedObject
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 OutputPort(TypedObject):
12    """
13    The output port details.
14    """
15
16    #: A constant which can be used with the port_type property of a OutputPort.
17    #: This constant has a value of "DATA"
18    PORT_TYPE_DATA = "DATA"
19
20    #: A constant which can be used with the port_type property of a OutputPort.
21    #: This constant has a value of "CONTROL"
22    PORT_TYPE_CONTROL = "CONTROL"
23
24    #: A constant which can be used with the port_type property of a OutputPort.
25    #: This constant has a value of "MODEL"
26    PORT_TYPE_MODEL = "MODEL"
27
28    def __init__(self, **kwargs):
29        """
30        Initializes a new OutputPort object with values from keyword arguments. The default value of the :py:attr:`~oci.data_integration.models.OutputPort.model_type` attribute
31        of this class is ``OUTPUT_PORT`` and it should not be changed.
32        The following keyword arguments are supported (corresponding to the getters/setters of this class):
33
34        :param model_type:
35            The value to assign to the model_type property of this OutputPort.
36            Allowed values for this property are: "SHAPE", "INPUT_PORT", "SHAPE_FIELD", "INPUT_FIELD", "DERIVED_FIELD", "MACRO_FIELD", "OUTPUT_FIELD", "DYNAMIC_PROXY_FIELD", "OUTPUT_PORT", "DYNAMIC_INPUT_FIELD", "PROXY_FIELD", "PARAMETER", 'UNKNOWN_ENUM_VALUE'.
37            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
38        :type model_type: str
39
40        :param key:
41            The value to assign to the key property of this OutputPort.
42        :type key: str
43
44        :param model_version:
45            The value to assign to the model_version property of this OutputPort.
46        :type model_version: str
47
48        :param parent_ref:
49            The value to assign to the parent_ref property of this OutputPort.
50        :type parent_ref: oci.data_integration.models.ParentReference
51
52        :param config_values:
53            The value to assign to the config_values property of this OutputPort.
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 OutputPort.
58        :type object_status: int
59
60        :param name:
61            The value to assign to the name property of this OutputPort.
62        :type name: str
63
64        :param description:
65            The value to assign to the description property of this OutputPort.
66        :type description: str
67
68        :param port_type:
69            The value to assign to the port_type property of this OutputPort.
70            Allowed values for this property are: "DATA", "CONTROL", "MODEL", 'UNKNOWN_ENUM_VALUE'.
71            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
72        :type port_type: str
73
74        :param fields:
75            The value to assign to the fields property of this OutputPort.
76        :type fields: list[oci.data_integration.models.TypedObject]
77
78        """
79        self.swagger_types = {
80            'model_type': 'str',
81            'key': 'str',
82            'model_version': 'str',
83            'parent_ref': 'ParentReference',
84            'config_values': 'ConfigValues',
85            'object_status': 'int',
86            'name': 'str',
87            'description': 'str',
88            'port_type': 'str',
89            'fields': 'list[TypedObject]'
90        }
91
92        self.attribute_map = {
93            'model_type': 'modelType',
94            'key': 'key',
95            'model_version': 'modelVersion',
96            'parent_ref': 'parentRef',
97            'config_values': 'configValues',
98            'object_status': 'objectStatus',
99            'name': 'name',
100            'description': 'description',
101            'port_type': 'portType',
102            'fields': 'fields'
103        }
104
105        self._model_type = None
106        self._key = None
107        self._model_version = None
108        self._parent_ref = None
109        self._config_values = None
110        self._object_status = None
111        self._name = None
112        self._description = None
113        self._port_type = None
114        self._fields = None
115        self._model_type = 'OUTPUT_PORT'
116
117    @property
118    def port_type(self):
119        """
120        Gets the port_type of this OutputPort.
121        The port details for the data asset.Type.
122
123        Allowed values for this property are: "DATA", "CONTROL", "MODEL", 'UNKNOWN_ENUM_VALUE'.
124        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
125
126
127        :return: The port_type of this OutputPort.
128        :rtype: str
129        """
130        return self._port_type
131
132    @port_type.setter
133    def port_type(self, port_type):
134        """
135        Sets the port_type of this OutputPort.
136        The port details for the data asset.Type.
137
138
139        :param port_type: The port_type of this OutputPort.
140        :type: str
141        """
142        allowed_values = ["DATA", "CONTROL", "MODEL"]
143        if not value_allowed_none_or_none_sentinel(port_type, allowed_values):
144            port_type = 'UNKNOWN_ENUM_VALUE'
145        self._port_type = port_type
146
147    @property
148    def fields(self):
149        """
150        Gets the fields of this OutputPort.
151        An array of fields.
152
153
154        :return: The fields of this OutputPort.
155        :rtype: list[oci.data_integration.models.TypedObject]
156        """
157        return self._fields
158
159    @fields.setter
160    def fields(self, fields):
161        """
162        Sets the fields of this OutputPort.
163        An array of fields.
164
165
166        :param fields: The fields of this OutputPort.
167        :type: list[oci.data_integration.models.TypedObject]
168        """
169        self._fields = fields
170
171    def __repr__(self):
172        return formatted_flat_dict(self)
173
174    def __eq__(self, other):
175        if other is None:
176            return False
177
178        return self.__dict__ == other.__dict__
179
180    def __ne__(self, other):
181        return not self == other
182