docs: def _model_to_dict(obj):
          """
          Convert object model to dict.
  
          Args:
              obj: Object model.
  
          Returns:
              dict: Converted model.
          """
          result = _properties_model_to_dict(obj.properties)
          for attribute in ('metadata', 'snapshot'):
              try:
                  value = getattr(obj, attribute)
              except AttributeError:
                  continue
              if value:
                  result[attribute] = value
          return result