def SetVariantInfo(self, ref, discriminant, value, schema):
    """Sets variant info for the given reference."""
    if ref in self._variant_info:
      logging.warning("Base type of '%s' changed from '%s' to '%s'. "
                      "This is an indication that a variant schema is used "
                      "from multiple base schemas and may result in an "
                      "inconsistent model.",
                      ref, self._base_type[ref].wireName, schema.wireName)
    self._variant_info[ref] = {'discriminant': discriminant, 'value': value,
                               'schema': schema}