code: def _to_dict(self):
          
          _dict = {}
          if hasattr(self, 'credentials') and self.credentials is not None:
              _dict['credentials'] = [x._to_dict() for x in self.credentials]
          return _dict
docs: Return a json dictionary representing this model.