@classmethod
def _from_dict(cls, _dict):
    """Initialize a DocumentCounts object from a json dictionary."""
    args = {}
    if 'available' in _dict:
        args['available'] = _dict.get('available')
    if 'processing' in _dict:
        args['processing'] = _dict.get('processing')
    if 'failed' in _dict:
        args['failed'] = _dict.get('failed')
    if 'pending' in _dict:
        args['pending'] = _dict.get('pending')
    return cls(**args)
