title: Protocol Buffers 3: Enums as keys in a map
body: <p>Enums are not allowed to be used as keys in map. PaxType here is an enum and not allowed to be used as key.</p>
  
  <pre><code>enum PaxType {
      ADULT = 0 ;
      CHILD = 1 ;
      INFANT = 2 ;
  }
  
  message FlightData {
      map&lt;PaxType, FareType&gt; fareType = 1;
  }
  </code></pre>