# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

class _Info(object):

  def __init__(self, name, _type=None):
    self._name = name
    self._type = _type

  @property
  def name(self):
    return self._name

  @property
  def type(self):
    return self._type


ANGLE_REVISIONS = _Info('angleRevisions', 'GenericSet')
ARCHITECTURES = _Info('architectures', 'GenericSet')
BENCHMARKS = _Info('benchmarks', 'GenericSet')
BENCHMARK_START = _Info('benchmarkStart', 'DateRange')
BOTS = _Info('bots', 'GenericSet')
BUG_COMPONENTS = _Info('bugComponents', 'GenericSet')
BUILDS = _Info('builds', 'GenericSet')
CATAPULT_REVISIONS = _Info('catapultRevisions', 'GenericSet')
CHROMIUM_COMMIT_POSITIONS = _Info('chromiumCommitPositions', 'GenericSet')
CHROMIUM_REVISIONS = _Info('chromiumRevisions', 'GenericSet')
GPUS = _Info('gpus', 'GenericSet')
GROUPING_PATH = _Info('groupingPath')
LABELS = _Info('labels', 'GenericSet')
LOG_URLS = _Info('logUrls', 'GenericSet')
MASTERS = _Info('masters', 'GenericSet')
MEMORY_AMOUNTS = _Info('memoryAmounts', 'GenericSet')
MERGED_FROM = _Info('mergedFrom', 'RelatedHistogramMap')
MERGED_TO = _Info('mergedTo', 'RelatedHistogramMap')
OS_NAMES = _Info('osNames', 'GenericSet')
OS_VERSIONS = _Info('osVersions', 'GenericSet')
OWNERS = _Info('owners', 'GenericSet')
PRODUCT_VERSIONS = _Info('productVersions', 'GenericSet')
RELATED_NAMES = _Info('relatedNames', 'GenericSet')
SKIA_REVISIONS = _Info('skiaRevisions', 'GenericSet')
STORIES = _Info('stories', 'GenericSet')
STORYSET_REPEATS = _Info('storysetRepeats', 'GenericSet')
STORY_TAGS = _Info('storyTags', 'GenericSet')
TAG_MAP = _Info('tagmap', 'TagMap')
TRACE_START = _Info('traceStart', 'DateRange')
TRACE_URLS = _Info('traceUrls', 'GenericSet')
V8_COMMIT_POSITIONS = _Info('v8CommitPositions', 'DateRange')
V8_REVISIONS = _Info('v8Revisions', 'GenericSet')
WEBRTC_REVISIONS = _Info('webrtcRevisions', 'GenericSet')

def GetTypeForName(name):
  for info in globals().itervalues():
    if isinstance(info, _Info) and info.name == name:
      return info.type

@@ -205,16 +205,33 @@
 , name, 
+_type=None, entry
 _type=No
@@ -279,16 +279,208 @@
  = _type
+%0A    if entry_type is not None and self._type != 'GenericSet':%0A      raise ValueError(%0A          'entry_type should only be specified if _type is GenericSet')%0A    self._entry_type = entry_type
 %0A%0A  @pro
@@ -579,16 +579,81 @@
 ._type%0A%0A
+  @property%0A  def entry_type(self):%0A    return self._entry_type%0A%0A
 %0AANGLE_R
@@ -699,16 +699,21 @@
 ericSet'
+, str
 )%0AARCHIT
@@ -749,32 +749,37 @@
 s', 'GenericSet'
+, str
 )%0ABENCHMARKS = _
@@ -809,16 +809,21 @@
 ericSet'
+, str
 )%0ABENCHM
@@ -900,24 +900,29 @@
 'GenericSet'
+, str
 )%0ABUG_COMPON
@@ -963,16 +963,21 @@
 ericSet'
+, str
 )%0ABUILDS
@@ -1007,16 +1007,21 @@
 ericSet'
+, int
 )%0ACATAPU
@@ -1066,32 +1066,37 @@
 s', 'GenericSet'
+, str
 )%0ACHROMIUM_COMMI
@@ -1154,16 +1154,21 @@
 ericSet'
+, int
 )%0ACHROMI
@@ -1221,16 +1221,21 @@
 ericSet'
+, str
 )%0AGPUS =
@@ -1261,16 +1261,21 @@
 ericSet'
+, str
 )%0AGROUPI
@@ -1343,16 +1343,21 @@
 ericSet'
+, str
 )%0ALOG_UR
@@ -1390,16 +1390,21 @@
 ericSet'
+, str
 )%0AMASTER
@@ -1432,24 +1432,29 @@
 'GenericSet'
+, str
 )%0AMEMORY_AMO
@@ -1495,16 +1495,21 @@
 ericSet'
+, int
 )%0AMERGED
@@ -1652,16 +1652,21 @@
 ericSet'
+, str
 )%0AOS_VER
@@ -1705,16 +1705,21 @@
 ericSet'
+, str
 )%0AOWNERS
@@ -1749,16 +1749,21 @@
 ericSet'
+, str
 )%0APRODUC
@@ -1812,16 +1812,21 @@
 ericSet'
+, str
 )%0ARELATE
@@ -1869,16 +1869,21 @@
 ericSet'
+, str
 )%0ASKIA_R
@@ -1924,24 +1924,29 @@
 'GenericSet'
+, str
 )%0ASTORIES = 
@@ -1970,24 +1970,29 @@
 'GenericSet'
+, str
 )%0ASTORYSET_R
@@ -2037,16 +2037,21 @@
 ericSet'
+, int
 )%0ASTORY_
@@ -2088,16 +2088,21 @@
 ericSet'
+, str
 )%0ATAG_MA
@@ -2222,16 +2222,21 @@
 ericSet'
+, str
 )%0AV8_COM
@@ -2339,16 +2339,21 @@
 ericSet'
+, str
 )%0AWEBRTC
@@ -2402,16 +2402,21 @@
 ericSet'
+, str
 )%0A%0Adef G

Add entry types to Python reserved infos