Edit File: models.cpython-37.pyc
B �et � @ s" d dl mZ d dl mZ d dl mZ d dlmZmZmZmZ G dd� d�Z G dd� de �Z ed d efdefdefd efg�Zeddefdeeee f fg�Z G dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd� de�ZG dd� de �ZG dd� de �ZG dd � d e �Zd!S )"� )�absolute_import)�division)�print_function)� NamedTuple�Dict�List�Optionalc @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� ZdS ) �_Base)�_received_fieldsZ_apic C s t |�� �| _dS )z` Initializes class by given dictionary and api object. :type opts: dict N)�set�keysr )�self�opts� r ��/builddir/build/BUILDROOT/alt-python27-cllib-3.3.5-1.el8.cloudlinux.x86_64/opt/alt/python37/lib/python3.7/site-packages/vendors_api/models.py�__init__ s z_Base.__init__c C s8 |dks|| j ks|| jkr(t�| |�S td| ��dS )a� When parsing data in __init__, we save list of received fields. When accesing any of those fields, we must check that is was received first. This is needed for dynamic instances of "user" which can be different depending on 'fields' argument passed to the integration script. :type item: str :return: object or raise exception � __slots__z%s is not set, but used in codeN)r r �object�__getattribute__�AttributeError)r �itemr r r r s z_Base.__getattribute__c s d� j j� fdd�� jD �f S )Nz%s (%s)c s i | ]}t � |�|�qS r )�getattr)�.0�k)r r r � <dictcomp>. s z"_Base.__repr__.<locals>.<dictcomp>)� __class__�__name__r )r r )r r �__repr__- s z_Base.__repr__c C sV | j |j krdS | j|jkr dS x0t| j �| j@ D ]}t| |�t||�kr2dS q2W dS )NFT)r r r r )r �otherZslotr r r �__eq__0 s z_Base.__eq__c C s | |k S )Nr )r r r r r �__ne__>