o
    ɶdX                     @   s8   d dl mZmZmZ d dlmZ eG dd deZdS )    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s  e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdd Zedd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zed d! Zejd"d! Zed#d$ Zejd%d$ Zed&d' Zejd(d' Zed)d* Z e jd+d* Z ed,d- Z!e!jd.d- Z!ed/d0 Z"e"jd1d0 Z"ed2d3 Z#e#jd4d3 Z#ed5d6 Z$e$jd7d6 Z$ed8d9 Z%e%jd:d9 Z%ed;d< Z&e&jd=d< Z&ed>d? Z'e'jd@d? Z'dAdB Z(dCdD Z)dEdF Z*dGS )H
Connectionz*
    The connection for a data asset.
    ORACLE_ADWC_CONNECTIONORACLE_ATP_CONNECTION ORACLE_OBJECT_STORAGE_CONNECTIONORACLEDB_CONNECTIONMYSQL_CONNECTIONGENERIC_JDBC_CONNECTIONBICC_CONNECTIONAMAZON_S3_CONNECTIONBIP_CONNECTIONLAKE_CONNECTIONORACLE_PEOPLESOFT_CONNECTIONORACLE_EBS_CONNECTIONORACLE_SIEBEL_CONNECTIONHDFS_CONNECTIONMYSQL_HEATWAVE_CONNECTIONREST_NO_AUTH_CONNECTIONREST_BASIC_AUTH_CONNECTIONc                 K   s   ddddddddddddddd	| _ d
dddddddddddddd	| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d| _d| _d| _d| _d| _dS )a  
        Initializes a new Connection object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
        to a service operations then you should favor using a subclass over the base class:

        * :class:`~oci.data_integration.models.ConnectionFromAmazonS3`
        * :class:`~oci.data_integration.models.ConnectionFromBIP`
        * :class:`~oci.data_integration.models.ConnectionFromMySQL`
        * :class:`~oci.data_integration.models.ConnectionFromJdbc`
        * :class:`~oci.data_integration.models.ConnectionFromBICC`
        * :class:`~oci.data_integration.models.ConnectionFromMySqlHeatWave`
        * :class:`~oci.data_integration.models.ConnectionFromRestBasicAuth`
        * :class:`~oci.data_integration.models.ConnectionFromObjectStorage`
        * :class:`~oci.data_integration.models.ConnectionFromAdwc`
        * :class:`~oci.data_integration.models.ConnectionFromAtp`
        * :class:`~oci.data_integration.models.ConnectionFromOracle`
        * :class:`~oci.data_integration.models.ConnectionFromOraclePeopleSoft`
        * :class:`~oci.data_integration.models.ConnectionFromHdfs`
        * :class:`~oci.data_integration.models.ConnectionFromOracleEbs`
        * :class:`~oci.data_integration.models.ConnectionFromOracleSiebel`
        * :class:`~oci.data_integration.models.ConnectionFromRestNoAuth`
        * :class:`~oci.data_integration.models.ConnectionFromLake`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param model_type:
            The value to assign to the model_type property of this Connection.
            Allowed values for this property are: "ORACLE_ADWC_CONNECTION", "ORACLE_ATP_CONNECTION", "ORACLE_OBJECT_STORAGE_CONNECTION", "ORACLEDB_CONNECTION", "MYSQL_CONNECTION", "GENERIC_JDBC_CONNECTION", "BICC_CONNECTION", "AMAZON_S3_CONNECTION", "BIP_CONNECTION", "LAKE_CONNECTION", "ORACLE_PEOPLESOFT_CONNECTION", "ORACLE_EBS_CONNECTION", "ORACLE_SIEBEL_CONNECTION", "HDFS_CONNECTION", "MYSQL_HEATWAVE_CONNECTION", "REST_NO_AUTH_CONNECTION", "REST_BASIC_AUTH_CONNECTION", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type model_type: str

        :param key:
            The value to assign to the key property of this Connection.
        :type key: str

        :param model_version:
            The value to assign to the model_version property of this Connection.
        :type model_version: str

        :param parent_ref:
            The value to assign to the parent_ref property of this Connection.
        :type parent_ref: oci.data_integration.models.ParentReference

        :param name:
            The value to assign to the name property of this Connection.
        :type name: str

        :param description:
            The value to assign to the description property of this Connection.
        :type description: str

        :param object_version:
            The value to assign to the object_version property of this Connection.
        :type object_version: int

        :param object_status:
            The value to assign to the object_status property of this Connection.
        :type object_status: int

        :param identifier:
            The value to assign to the identifier property of this Connection.
        :type identifier: str

        :param primary_schema:
            The value to assign to the primary_schema property of this Connection.
        :type primary_schema: oci.data_integration.models.Schema

        :param connection_properties:
            The value to assign to the connection_properties property of this Connection.
        :type connection_properties: list[oci.data_integration.models.ConnectionProperty]

        :param is_default:
            The value to assign to the is_default property of this Connection.
        :type is_default: bool

        :param metadata:
            The value to assign to the metadata property of this Connection.
        :type metadata: oci.data_integration.models.ObjectMetadata

        :param key_map:
            The value to assign to the key_map property of this Connection.
        :type key_map: dict(str, str)

        strZParentReferenceintZSchemazlist[ConnectionProperty]boolZObjectMetadatazdict(str, str))
model_typekeymodel_version
parent_refnamedescriptionobject_versionobject_status
identifierprimary_schemaconnection_properties
is_defaultmetadatakey_map	modelTyper   ZmodelVersionZ	parentRefr   r    ZobjectVersionZobjectStatusr#   ZprimarySchemaZconnectionPropertiesZ	isDefaultr'   ZkeyMapN)Zswagger_typesZattribute_map_model_type_key_model_version_parent_ref_name_description_object_version_object_status_identifier_primary_schema_connection_properties_is_default	_metadata_key_map)selfkwargs r:   Jusr/lib/python3.10/site-packages/oci/data_integration/models/connection.py__init__V   sX   U
zConnection.__init__c                 C   s   | d }|dkr
dS |dkrdS |dkrdS |dkrd	S |d
kr"dS |dkr(dS |dkr.dS |dkr4dS |dkr:dS |dkr@dS |dkrFdS |dkrLdS |dkrRdS |dkrXdS |dkr^dS |d krdd!S |d"krjd#S d$S )%z
        Given the hash representation of a subtype of this class,
        use the info in the hash to return the class of the subtype.
        r)   r   ZConnectionFromAmazonS3r   ZConnectionFromBIPr   ZConnectionFromMySQLr   ZConnectionFromJdbcr   ZConnectionFromBICCr   ZConnectionFromMySqlHeatWaver   ZConnectionFromRestBasicAuthr	   ZConnectionFromObjectStorager   ZConnectionFromAdwcr   ZConnectionFromAtpr
   ZConnectionFromOracler   ZConnectionFromOraclePeopleSoftr   ZConnectionFromHdfsr   ZConnectionFromOracleEbsr   ZConnectionFromOracleSiebelr   ZConnectionFromRestNoAuthr   ZConnectionFromLaker   r:   )Zobject_dictionarytyper:   r:   r;   get_subtype   sH   zConnection.get_subtypec                 C      | j S )a  
        **[Required]** Gets the model_type of this Connection.
        The type of the connection.

        Allowed values for this property are: "ORACLE_ADWC_CONNECTION", "ORACLE_ATP_CONNECTION", "ORACLE_OBJECT_STORAGE_CONNECTION", "ORACLEDB_CONNECTION", "MYSQL_CONNECTION", "GENERIC_JDBC_CONNECTION", "BICC_CONNECTION", "AMAZON_S3_CONNECTION", "BIP_CONNECTION", "LAKE_CONNECTION", "ORACLE_PEOPLESOFT_CONNECTION", "ORACLE_EBS_CONNECTION", "ORACLE_SIEBEL_CONNECTION", "HDFS_CONNECTION", "MYSQL_HEATWAVE_CONNECTION", "REST_NO_AUTH_CONNECTION", "REST_BASIC_AUTH_CONNECTION", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The model_type of this Connection.
        :rtype: str
        )r*   r8   r:   r:   r;   r     s   zConnection.model_typec                 C   s    g d}t ||sd}|| _dS )z
        Sets the model_type of this Connection.
        The type of the connection.


        :param model_type: The model_type of this Connection.
        :type: str
        )r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   ZUNKNOWN_ENUM_VALUEN)r   r*   )r8   r   Zallowed_valuesr:   r:   r;   r   '  s   


c                 C   r?   )a  
        Gets the key of this Connection.
        Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create.


        :return: The key of this Connection.
        :rtype: str
        r+   r@   r:   r:   r;   r   6     
zConnection.keyc                 C   
   || _ dS )a  
        Sets the key of this Connection.
        Generated key that can be used in API calls to identify connection. On scenarios where reference to the connection is needed, a value can be passed in create.


        :param key: The key of this Connection.
        :type: str
        NrA   )r8   r   r:   r:   r;   r   B     

c                 C   r?   )z
        Gets the model_version of this Connection.
        The model version of an object.


        :return: The model_version of this Connection.
        :rtype: str
        r,   r@   r:   r:   r;   r   N  rB   zConnection.model_versionc                 C   rC   )z
        Sets the model_version of this Connection.
        The model version of an object.


        :param model_version: The model_version of this Connection.
        :type: str
        NrE   )r8   r   r:   r:   r;   r   Z  rD   c                 C   r?   )z
        Gets the parent_ref of this Connection.

        :return: The parent_ref of this Connection.
        :rtype: oci.data_integration.models.ParentReference
        r-   r@   r:   r:   r;   r   f     zConnection.parent_refc                 C   rC   )z
        Sets the parent_ref of this Connection.

        :param parent_ref: The parent_ref of this Connection.
        :type: oci.data_integration.models.ParentReference
        NrF   )r8   r   r:   r:   r;   r   p     
c                 C   r?   )a3  
        Gets the name of this Connection.
        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.


        :return: The name of this Connection.
        :rtype: str
        r.   r@   r:   r:   r;   r   z  rB   zConnection.namec                 C   rC   )a6  
        Sets the name of this Connection.
        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.


        :param name: The name of this Connection.
        :type: str
        NrI   )r8   r   r:   r:   r;   r     rD   c                 C   r?   )z
        Gets the description of this Connection.
        User-defined description for the connection.


        :return: The description of this Connection.
        :rtype: str
        r/   r@   r:   r:   r;   r      rB   zConnection.descriptionc                 C   rC   )z
        Sets the description of this Connection.
        User-defined description for the connection.


        :param description: The description of this Connection.
        :type: str
        NrJ   )r8   r    r:   r:   r;   r      rD   c                 C   r?   )z
        Gets the object_version of this Connection.
        The version of the object that is used to track changes in the object instance.


        :return: The object_version of this Connection.
        :rtype: int
        r0   r@   r:   r:   r;   r!     rB   zConnection.object_versionc                 C   rC   )z
        Sets the object_version of this Connection.
        The version of the object that is used to track changes in the object instance.


        :param object_version: The object_version of this Connection.
        :type: int
        NrK   )r8   r!   r:   r:   r;   r!     rD   c                 C   r?   )a  
        Gets the object_status of this Connection.
        The status of an object that can be set to value 1 for shallow references across objects, other values reserved.


        :return: The object_status of this Connection.
        :rtype: int
        r1   r@   r:   r:   r;   r"     rB   zConnection.object_statusc                 C   rC   )a  
        Sets the object_status of this Connection.
        The status of an object that can be set to value 1 for shallow references across objects, other values reserved.


        :param object_status: The object_status of this Connection.
        :type: int
        NrL   )r8   r"   r:   r:   r;   r"     rD   c                 C   r?   )a   
        Gets the identifier of this Connection.
        Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified.


        :return: The identifier of this Connection.
        :rtype: str
        r2   r@   r:   r:   r;   r#     rB   zConnection.identifierc                 C   rC   )a)  
        Sets the identifier of this Connection.
        Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified.


        :param identifier: The identifier of this Connection.
        :type: str
        NrM   )r8   r#   r:   r:   r;   r#     rD   c                 C   r?   )z
        Gets the primary_schema of this Connection.

        :return: The primary_schema of this Connection.
        :rtype: oci.data_integration.models.Schema
        r3   r@   r:   r:   r;   r$     rG   zConnection.primary_schemac                 C   rC   )z
        Sets the primary_schema of this Connection.

        :param primary_schema: The primary_schema of this Connection.
        :type: oci.data_integration.models.Schema
        NrN   )r8   r$   r:   r:   r;   r$     rH   c                 C   r?   )z
        Gets the connection_properties of this Connection.
        The properties for the connection.


        :return: The connection_properties of this Connection.
        :rtype: list[oci.data_integration.models.ConnectionProperty]
        r4   r@   r:   r:   r;   r%     rB   z Connection.connection_propertiesc                 C   rC   )a	  
        Sets the connection_properties of this Connection.
        The properties for the connection.


        :param connection_properties: The connection_properties of this Connection.
        :type: list[oci.data_integration.models.ConnectionProperty]
        NrO   )r8   r%   r:   r:   r;   r%     rD   c                 C   r?   )z
        Gets the is_default of this Connection.
        The default property for the connection.


        :return: The is_default of this Connection.
        :rtype: bool
        r5   r@   r:   r:   r;   r&     rB   zConnection.is_defaultc                 C   rC   )z
        Sets the is_default of this Connection.
        The default property for the connection.


        :param is_default: The is_default of this Connection.
        :type: bool
        NrP   )r8   r&   r:   r:   r;   r&   *  rD   c                 C   r?   )z
        Gets the metadata of this Connection.

        :return: The metadata of this Connection.
        :rtype: oci.data_integration.models.ObjectMetadata
        r6   r@   r:   r:   r;   r'   6  rG   zConnection.metadatac                 C   rC   )z
        Sets the metadata of this Connection.

        :param metadata: The metadata of this Connection.
        :type: oci.data_integration.models.ObjectMetadata
        NrQ   )r8   r'   r:   r:   r;   r'   @  rH   c                 C   r?   )a  
        Gets the key_map of this Connection.
        A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key.


        :return: The key_map of this Connection.
        :rtype: dict(str, str)
        r7   r@   r:   r:   r;   r(   J  rB   zConnection.key_mapc                 C   rC   )a  
        Sets the key_map of this Connection.
        A key map. If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key.


        :param key_map: The key_map of this Connection.
        :type: dict(str, str)
        NrR   )r8   r(   r:   r:   r;   r(   V  rD   c                 C   s   t | S N)r   r@   r:   r:   r;   __repr__b  s   zConnection.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r8   otherr:   r:   r;   __eq__e  s   zConnection.__eq__c                 C   s
   | |k S rS   r:   rV   r:   r:   r;   __ne__k  s   
zConnection.__ne__N)+__name__
__module____qualname____doc__Z!MODEL_TYPE_ORACLE_ADWC_CONNECTIONZ MODEL_TYPE_ORACLE_ATP_CONNECTIONZ+MODEL_TYPE_ORACLE_OBJECT_STORAGE_CONNECTIONZMODEL_TYPE_ORACLEDB_CONNECTIONZMODEL_TYPE_MYSQL_CONNECTIONZ"MODEL_TYPE_GENERIC_JDBC_CONNECTIONZMODEL_TYPE_BICC_CONNECTIONZMODEL_TYPE_AMAZON_S3_CONNECTIONZMODEL_TYPE_BIP_CONNECTIONZMODEL_TYPE_LAKE_CONNECTIONZ'MODEL_TYPE_ORACLE_PEOPLESOFT_CONNECTIONZ MODEL_TYPE_ORACLE_EBS_CONNECTIONZ#MODEL_TYPE_ORACLE_SIEBEL_CONNECTIONZMODEL_TYPE_HDFS_CONNECTIONZ$MODEL_TYPE_MYSQL_HEATWAVE_CONNECTIONZ"MODEL_TYPE_REST_NO_AUTH_CONNECTIONZ%MODEL_TYPE_REST_BASIC_AUTH_CONNECTIONr<   staticmethodr>   propertyr   setterr   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   rT   rX   rY   r:   r:   r:   r;   r      s     
<






	
	










	
	




	
	

r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r:   r:   r:   r;   <module>   s   