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 PublishedObject(object): 12 """ 13 The information about the published object. 14 """ 15 16 #: A constant which can be used with the model_type property of a PublishedObject. 17 #: This constant has a value of "INTEGRATION_TASK" 18 MODEL_TYPE_INTEGRATION_TASK = "INTEGRATION_TASK" 19 20 #: A constant which can be used with the model_type property of a PublishedObject. 21 #: This constant has a value of "DATA_LOADER_TASK" 22 MODEL_TYPE_DATA_LOADER_TASK = "DATA_LOADER_TASK" 23 24 #: A constant which can be used with the model_type property of a PublishedObject. 25 #: This constant has a value of "PIPELINE_TASK" 26 MODEL_TYPE_PIPELINE_TASK = "PIPELINE_TASK" 27 28 #: A constant which can be used with the model_type property of a PublishedObject. 29 #: This constant has a value of "SQL_TASK" 30 MODEL_TYPE_SQL_TASK = "SQL_TASK" 31 32 #: A constant which can be used with the model_type property of a PublishedObject. 33 #: This constant has a value of "OCI_DATAFLOW_TASK" 34 MODEL_TYPE_OCI_DATAFLOW_TASK = "OCI_DATAFLOW_TASK" 35 36 #: A constant which can be used with the model_type property of a PublishedObject. 37 #: This constant has a value of "REST_TASK" 38 MODEL_TYPE_REST_TASK = "REST_TASK" 39 40 def __init__(self, **kwargs): 41 """ 42 Initializes a new PublishedObject object with values from keyword arguments. This class has the following subclasses and if you are using this class as input 43 to a service operations then you should favor using a subclass over the base class: 44 45 * :class:`~oci.data_integration.models.PublishedObjectFromDataLoaderTask` 46 * :class:`~oci.data_integration.models.PublishedObjectFromPipelineTask` 47 * :class:`~oci.data_integration.models.PublishedObjectFromIntegrationTask` 48 49 The following keyword arguments are supported (corresponding to the getters/setters of this class): 50 51 :param model_type: 52 The value to assign to the model_type property of this PublishedObject. 53 Allowed values for this property are: "INTEGRATION_TASK", "DATA_LOADER_TASK", "PIPELINE_TASK", "SQL_TASK", "OCI_DATAFLOW_TASK", "REST_TASK", 'UNKNOWN_ENUM_VALUE'. 54 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 55 :type model_type: str 56 57 :param key: 58 The value to assign to the key property of this PublishedObject. 59 :type key: str 60 61 :param model_version: 62 The value to assign to the model_version property of this PublishedObject. 63 :type model_version: str 64 65 :param parent_ref: 66 The value to assign to the parent_ref property of this PublishedObject. 67 :type parent_ref: oci.data_integration.models.ParentReference 68 69 :param name: 70 The value to assign to the name property of this PublishedObject. 71 :type name: str 72 73 :param description: 74 The value to assign to the description property of this PublishedObject. 75 :type description: str 76 77 :param object_version: 78 The value to assign to the object_version property of this PublishedObject. 79 :type object_version: int 80 81 :param object_status: 82 The value to assign to the object_status property of this PublishedObject. 83 :type object_status: int 84 85 :param identifier: 86 The value to assign to the identifier property of this PublishedObject. 87 :type identifier: str 88 89 """ 90 self.swagger_types = { 91 'model_type': 'str', 92 'key': 'str', 93 'model_version': 'str', 94 'parent_ref': 'ParentReference', 95 'name': 'str', 96 'description': 'str', 97 'object_version': 'int', 98 'object_status': 'int', 99 'identifier': 'str' 100 } 101 102 self.attribute_map = { 103 'model_type': 'modelType', 104 'key': 'key', 105 'model_version': 'modelVersion', 106 'parent_ref': 'parentRef', 107 'name': 'name', 108 'description': 'description', 109 'object_version': 'objectVersion', 110 'object_status': 'objectStatus', 111 'identifier': 'identifier' 112 } 113 114 self._model_type = None 115 self._key = None 116 self._model_version = None 117 self._parent_ref = None 118 self._name = None 119 self._description = None 120 self._object_version = None 121 self._object_status = None 122 self._identifier = None 123 124 @staticmethod 125 def get_subtype(object_dictionary): 126 """ 127 Given the hash representation of a subtype of this class, 128 use the info in the hash to return the class of the subtype. 129 """ 130 type = object_dictionary['modelType'] 131 132 if type == 'DATA_LOADER_TASK': 133 return 'PublishedObjectFromDataLoaderTask' 134 135 if type == 'PIPELINE_TASK': 136 return 'PublishedObjectFromPipelineTask' 137 138 if type == 'INTEGRATION_TASK': 139 return 'PublishedObjectFromIntegrationTask' 140 else: 141 return 'PublishedObject' 142 143 @property 144 def model_type(self): 145 """ 146 **[Required]** Gets the model_type of this PublishedObject. 147 The type of the published object. 148 149 Allowed values for this property are: "INTEGRATION_TASK", "DATA_LOADER_TASK", "PIPELINE_TASK", "SQL_TASK", "OCI_DATAFLOW_TASK", "REST_TASK", 'UNKNOWN_ENUM_VALUE'. 150 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 151 152 153 :return: The model_type of this PublishedObject. 154 :rtype: str 155 """ 156 return self._model_type 157 158 @model_type.setter 159 def model_type(self, model_type): 160 """ 161 Sets the model_type of this PublishedObject. 162 The type of the published object. 163 164 165 :param model_type: The model_type of this PublishedObject. 166 :type: str 167 """ 168 allowed_values = ["INTEGRATION_TASK", "DATA_LOADER_TASK", "PIPELINE_TASK", "SQL_TASK", "OCI_DATAFLOW_TASK", "REST_TASK"] 169 if not value_allowed_none_or_none_sentinel(model_type, allowed_values): 170 model_type = 'UNKNOWN_ENUM_VALUE' 171 self._model_type = model_type 172 173 @property 174 def key(self): 175 """ 176 Gets the key of this PublishedObject. 177 Generated key that can be used in API calls to identify task. On scenarios where reference to the task is needed, a value can be passed in create. 178 179 180 :return: The key of this PublishedObject. 181 :rtype: str 182 """ 183 return self._key 184 185 @key.setter 186 def key(self, key): 187 """ 188 Sets the key of this PublishedObject. 189 Generated key that can be used in API calls to identify task. On scenarios where reference to the task is needed, a value can be passed in create. 190 191 192 :param key: The key of this PublishedObject. 193 :type: str 194 """ 195 self._key = key 196 197 @property 198 def model_version(self): 199 """ 200 Gets the model_version of this PublishedObject. 201 The object's model version. 202 203 204 :return: The model_version of this PublishedObject. 205 :rtype: str 206 """ 207 return self._model_version 208 209 @model_version.setter 210 def model_version(self, model_version): 211 """ 212 Sets the model_version of this PublishedObject. 213 The object's model version. 214 215 216 :param model_version: The model_version of this PublishedObject. 217 :type: str 218 """ 219 self._model_version = model_version 220 221 @property 222 def parent_ref(self): 223 """ 224 Gets the parent_ref of this PublishedObject. 225 226 :return: The parent_ref of this PublishedObject. 227 :rtype: oci.data_integration.models.ParentReference 228 """ 229 return self._parent_ref 230 231 @parent_ref.setter 232 def parent_ref(self, parent_ref): 233 """ 234 Sets the parent_ref of this PublishedObject. 235 236 :param parent_ref: The parent_ref of this PublishedObject. 237 :type: oci.data_integration.models.ParentReference 238 """ 239 self._parent_ref = parent_ref 240 241 @property 242 def name(self): 243 """ 244 Gets the name of this PublishedObject. 245 Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. 246 247 248 :return: The name of this PublishedObject. 249 :rtype: str 250 """ 251 return self._name 252 253 @name.setter 254 def name(self, name): 255 """ 256 Sets the name of this PublishedObject. 257 Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters. 258 259 260 :param name: The name of this PublishedObject. 261 :type: str 262 """ 263 self._name = name 264 265 @property 266 def description(self): 267 """ 268 Gets the description of this PublishedObject. 269 Detailed description for the object. 270 271 272 :return: The description of this PublishedObject. 273 :rtype: str 274 """ 275 return self._description 276 277 @description.setter 278 def description(self, description): 279 """ 280 Sets the description of this PublishedObject. 281 Detailed description for the object. 282 283 284 :param description: The description of this PublishedObject. 285 :type: str 286 """ 287 self._description = description 288 289 @property 290 def object_version(self): 291 """ 292 Gets the object_version of this PublishedObject. 293 The version of the object that is used to track changes in the object instance. 294 295 296 :return: The object_version of this PublishedObject. 297 :rtype: int 298 """ 299 return self._object_version 300 301 @object_version.setter 302 def object_version(self, object_version): 303 """ 304 Sets the object_version of this PublishedObject. 305 The version of the object that is used to track changes in the object instance. 306 307 308 :param object_version: The object_version of this PublishedObject. 309 :type: int 310 """ 311 self._object_version = object_version 312 313 @property 314 def object_status(self): 315 """ 316 Gets the object_status of this PublishedObject. 317 The status of an object that can be set to value 1 for shallow references across objects, other values reserved. 318 319 320 :return: The object_status of this PublishedObject. 321 :rtype: int 322 """ 323 return self._object_status 324 325 @object_status.setter 326 def object_status(self, object_status): 327 """ 328 Sets the object_status of this PublishedObject. 329 The status of an object that can be set to value 1 for shallow references across objects, other values reserved. 330 331 332 :param object_status: The object_status of this PublishedObject. 333 :type: int 334 """ 335 self._object_status = object_status 336 337 @property 338 def identifier(self): 339 """ 340 Gets the identifier of this PublishedObject. 341 Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. 342 343 344 :return: The identifier of this PublishedObject. 345 :rtype: str 346 """ 347 return self._identifier 348 349 @identifier.setter 350 def identifier(self, identifier): 351 """ 352 Sets the identifier of this PublishedObject. 353 Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified. 354 355 356 :param identifier: The identifier of this PublishedObject. 357 :type: str 358 """ 359 self._identifier = identifier 360 361 def __repr__(self): 362 return formatted_flat_dict(self) 363 364 def __eq__(self, other): 365 if other is None: 366 return False 367 368 return self.__dict__ == other.__dict__ 369 370 def __ne__(self, other): 371 return not self == other 372