
    iJ                     V    S r SSKrSSKJrJrJrJr  SSKJr  \" SSS9r	 " S S5      r
g)	zClass for backend status.    N)DictAnyTypeVarType)QiskitErrorBackendStatusTBackendStatus)boundc            
           \ rS rSrSrS\S\S\S\S\4
S jr\	S	\
\   S
\\\4   S\4S j5       rS\\\4   4S jrS\S\4S jrS\4S jrSrg)r	      z"Class representing Backend Status.backend_namebackend_versionoperationalpending_jobs
status_msgc                 b    Xl         X l        X0l        US:  a  [        S5      eX@l        XPl        g)as  Initialize a BackendStatus object

Args:
    backend_name: The backend's name
    backend_version: The backend's version of the form X.Y.Z
    operational: True if the backend is operational
    pending_jobs: The number of pending jobs on the backend
    status_msg: The status msg for the backend

Raises:
    QiskitError: If the backend version is in an invalid format
r   zPending jobs must be >=0N)r   r   r   r   r   r   )selfr   r   r   r   r   s         b/home/james-whalen/.local/lib/python3.13/site-packages/qiskit_ibm_runtime/models/backend_status.py__init__BackendStatus.__init__   s5    ( ).&!899($    clsdatareturnc                     U " S0 UD6$ )a)  Create a new BackendStatus object from a dictionary.

Args:
    data (dict): A dictionary representing the BaseBakend to create.
                 It will be in the same format as output by
                 :func:`to_dict`.

Returns:
    BackendStatus: The BackendStatus from the input dictionary.
 r   )r   r   s     r   	from_dictBackendStatus.from_dict6   s     {T{r   c                     U R                   $ )z{Return a dictionary format representation of the BackendStatus.

Returns:
    dict: The dictionary form of the QobjHeader.
)__dict__)r   s    r   to_dictBackendStatus.to_dictD   s     }}r   otherc                 d    [        U[        5      (       a  U R                  UR                  :X  a  gg)NTF)
isinstancer	   r    )r   r#   s     r   __eq__BackendStatus.__eq__L   s%    e]++}}.r   c                     [        U 5      nS[        R                  " U5       SU R                   SU R                   SU R
                   SU R                   S3nU$ )zReturn html representation of the object

Returns:
    Representation used in Jupyter notebook and other IDE's that call the method

z<pre>z</pre><b>name</b>: z<br/><b>version</b>: z, <b>pending jobs</b>: z<br/><b>status</b>: z<br/>)reprhtmlescaper   r   r   r   )r   rpr	html_codes      r   _repr_html_BackendStatus._repr_html_R   st     4jDKK$% & --. /#334 5%%)%6%6$7 8"oo.e	5 	 r   )r   r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__strboolintr   classmethodr   r   r   r   r   r!   r&   r.   __static_attributes__r   r   r   r	   r	      s    ,%% % 	%
 % %8 tN+ 4S> n  c3h C D S r   )r4   r*   typingr   r   r   r   qiskit.exceptionsr   r   r	   r   r   r   <module>r<      s/       + + ))AK Kr   