
    5iB                     ^    d Z ddlmZmZmZmZ ddlZddlmZ ddl	m
Z
 ddZ G d	 d
e      Zy)z
Records are the most basic data object and do not store additional data beyond those available in
all data objects (details, properties, etc.).
    )print_functionunicode_literalsdivisionabsolute_importN   )DXDataObject   )DXErrorc                 B    t               } |j                  dd| i| |S )a  
    :rtype: :class:`DXRecord`

    :param details: The contents of the record to be created.
    :type details: dict

    Additional optional parameters not listed: all those under
    :func:`dxpy.bindings.DXDataObject.new`, except `details`.

    Creates a new remote record object with project set to *project*
    and returns the appropriate handler.

    Example:

        r = dxpy.new_dxrecord({"x": 1, "y": 2})

    Note that this function is shorthand for::

        dxrecord = DXRecord()
        dxrecord.new(**kwargs)

    details )DXRecordnew)r   kwargsdxrecords      x/home/marpiech/ifpan-abm-pgxpred/analysis/marpiech-gwas-test/venv/lib/python3.12/site-packages/dxpy/bindings/dxrecord.pynew_dxrecordr       s&    . zHHLL++F+O    c                      e Zd ZdZdZ eej                  j                        Z	 eej                  j                        Z eej                  j                        Z eej                  j                        Z eej                  j                         Z eej                  j$                        Z eej                  j(                        Z eej                  j,                        Z eej                  j0                        Z eej                  j4                        Z eej                  j8                        Z eej                  j<                        ZddZ y)r   z'
    Remote record object handler.
    recordc                 *   d|v rP|d   Ht        |d   t              st        d      |d   j                         |d   j	                         d|d<   |d= |rd|d<   t        j                  j                  |fi |}| j                  |d   |d	          y)
a  
        :param dx_hash: Standard hash populated in :func:`dxpy.bindings.DXDataObject.new()` containing attributes common to all data object classes.
        :type dx_hash: dict
        :param init_from: Record from which to initialize the metadata
        :type init_from: :class:`DXRecord`
        :param close: Whether or not to close the record immediately after creating it
        :type close: boolean

        Create a new remote record object.

        	init_fromNz*Expected instance of DXRecord to init_from)idprojectinitializeFromTcloser   r   )	
isinstancer   r
   get_idget_proj_iddxpyapi
record_newset_ids)selfdx_hashr   r   resps        r   _newzDXRecord._newO   s     & k".!&"5x@!"NOO!+.557 &{ 3 ? ? AC () {##GGxx""75f5T$Z!34r   N)F)!__name__
__module____qualname____doc___classstaticmethodr    r!   record_describe	_describerecord_add_types
_add_typesrecord_remove_types_remove_typesrecord_get_details_get_detailsrecord_set_details_set_detailsrecord_set_visibility_set_visibilityrecord_rename_renamerecord_set_properties_set_propertiesrecord_add_tags	_add_tagsrecord_remove_tags_remove_tagsrecord_close_closerecord_list_projects_list_projectsr'   r   r   r   r   r   ;   s    FTXX556Idhh778J !=!=>M ; ;<L ; ;<L"488#A#ABO488112G"488#A#ABOTXX556I ; ;<L$((//0F!$(("?"?@N5r   r   )N)r+   
__future__r   r   r   r   r     r   
exceptionsr
   r   r   r   r   r   <module>rI      s-   "
 S R    6.5| .5r   