def __frontend_limit_rules_descriptor(self, api_info):
    """Builds a frontend limit rules descriptor from API info.

    Args:
      api_info: An _ApiInfo object.

    Returns:
      A list of dictionaries with frontend limit rules information.
    """
    if not api_info.frontend_limits.rules:
      return None

    rules = []
    for rule in api_info.frontend_limits.rules:
      descriptor = {}
      for propname, descname in (('match', 'match'),
                                 ('qps', 'qps'),
                                 ('user_qps', 'userQps'),
                                 ('daily', 'daily'),
                                 ('analytics_id', 'analyticsId')):
        if getattr(rule, propname) is not None:
          descriptor[descname] = getattr(rule, propname)
      if descriptor:
        rules.append(descriptor)

    return rules
Builds a frontend limit rules descriptor from API info.

    Args:
      api_info: An _ApiInfo object.

    Returns:
      A list of dictionaries with frontend limit rules information.